Commit Graph
10 Commits
Author SHA1 Message Date
Liu Shuang 6af32202d1 feat: support stream_options (#736)
* feat: support stream_options

* fix lint

* fix lint
2024-05-07 16:42:24 +04:00
Liu Shuang e0d0801ac7 feat: add GPT4Turbo and GPT4Turbo20240409 (#703) 2024-04-11 12:39:10 +04:00
Liu Shuang bc8cdd33d1 add GPT3Dot5Turbo0125 model (#648) 2024-02-02 14:30:24 +04:00
Liu Shuang b77d01edca Support get http header and x-ratelimit-* headers (#507)
* feat: add headers to http response

* feat: support rate limit headers

* fix: go lint

* fix: test coverage

* refactor streamReader

* refactor streamReader

* refactor: NewRateLimitHeaders to newRateLimitHeaders

* refactor: RateLimitHeaders Resets filed

* refactor: move RateLimitHeaders struct
2023-10-10 19:29:41 +04:00
Liu Shuang 7b22898f5d Implement OpenAI July 2023 Updates (#427)
* Implement OpenAI July 2023 Updates

* fix: golangci-lint

* add comment

* fix: remove some model Deprecated
2023-07-09 12:09:50 +03:00
Liu Shuang e948150829 fix: chat stream returns an error response with a 'data: ' prefix (#396)
* fix: chat stream resp has 'data: ' prefix

* fix: lint error

* fix: lint error

* fix: lint error
2023-06-20 19:39:19 +04:00
Liu Shuang 0bd14f9584 refactor: ChatCompletionStreamChoice.FinishReason from string to FinishReason (#372) 2023-06-15 13:58:26 +04:00
Liu Shuang cacd976a0c feat: RequestError print status code (#285) 2023-05-01 01:18:43 +04:00
Liu Shuang d6ab1b3a4f fix: chat stream resp error (#259) 2023-04-19 13:05:00 +01:00
Liu Shuang a5a945ad14 fix: stream return EOF when openai return error (#184)
* fix: stream return EOF when openai return error

* perf: add error accumulator

* fix: golangci-lint

* fix: unmarshal error possibly null

* fix: error accumulator

* test: error accumulator use interface and add test code

* test: error accumulator add test code

* refactor: use stream reader to re-use stream code

* refactor: stream reader use generics
2023-03-22 09:32:47 +04:00