Commit Graph

203 Commits

Author SHA1 Message Date
sashabaranov
c34bc77f1a Add testable request builder (#162)
* Add testable request builder

* improve tests
2023-03-15 13:16:33 +04:00
sashabaranov
53d195cf5a add testable json marshaller (#161) 2023-03-15 12:16:47 +04:00
sashabaranov
ba77a6476e Update README.md (#160) 2023-03-15 11:47:36 +04:00
sashabaranov
ec4aeedd76 Delete codeball.yml (#159) 2023-03-15 11:44:28 +04:00
jooyyy.eth
98807ecba6 Feat: Add support for gpt-4 models (#157) 2023-03-15 11:43:08 +04:00
itegel
1a123fe221 Add image variation implementation and fix #149 (#153)
* Compatible with the situation where the mask is empty in CreateEditImage.

* Fix the test for the unnecessary removal of the mask.png file.

* add image variation implementation

* fix image variation bugs

* fix ci-lint problem with max line character limit

* add offitial doc link
2023-03-15 10:46:03 +04:00
sashabaranov
f4a6a99d06 Create .github/workflows/codeball.yml (#156) 2023-03-15 01:02:30 +04:00
sashabaranov
97db82ee4c Update pr.yml (#155) 2023-03-14 23:15:35 +04:00
sashabaranov
25eecf41f4 Update pr.yml 2023-03-14 23:10:09 +04:00
sashabaranov
d911278514 Revert "fix issue #149 (#150)" (#151)
This reverts commit 00eac3cb02.
2023-03-13 15:42:51 +04:00
itegel
00eac3cb02 fix issue #149 (#150)
* Compatible with the situation where the mask is empty in CreateEditImage.

* Fix the test for the unnecessary removal of the mask.png file.

* add image variation implementation
2023-03-13 15:39:29 +04:00
Qihang Hu
6580bd7289 readme example print error (#147) 2023-03-11 11:32:39 +04:00
sashabaranov
9428f6cc3d add more tests (#140)
* test models endpoint

* simplify

* add fine tune tests
2023-03-09 23:56:23 +04:00
jooyyy.eth
11052c6106 udpate some type to optimize usage (#139) 2023-03-09 18:53:50 +04:00
sashabaranov
34e1e10b5f add chatgpt logic tests (#135)
* add chatgpt logic tests

* lint
2023-03-08 19:50:41 +04:00
sashabaranov
14e1943c20 add code coverage github action (#134) 2023-03-08 19:14:34 +04:00
Matt Trefilek
c380d5031b Implement the fine-tunes API (#130)
- Add FineTune Structs and Requests
- Add CRUD Methods
2023-03-08 14:09:08 +04:00
sashabaranov
c46ebb2f08 use float32 in embeddings (#133) 2023-03-08 14:08:08 +04:00
sashabaranov
522ae20999 Warn about GPT3.5-turbo models in regular completion (#127) 2023-03-06 12:55:21 +04:00
Constantine A
c5fe8742cc add "name" property for ChatCompletionMessage (#123) 2023-03-06 10:52:56 +04:00
Afeyer
71f9f15e9e Correction of incorrect function names in comments (#125) 2023-03-06 10:51:20 +04:00
sashabaranov
ba6fd510c9 Update README.md 2023-03-05 10:56:28 +04:00
Hoani Bryson
ee9424e6b9 Add speech to text example in docs (#124) 2023-03-05 10:49:49 +04:00
sashabaranov
8be4dfe746 Update README.md 2023-03-04 20:59:37 +04:00
Alexander Baranov
d0294641ce bump go.mod to Go 1.18 2023-03-04 15:29:59 +04:00
Alexander Baranov
9eea94730a rename internally 2023-03-04 15:29:42 +04:00
sashabaranov
d59ab48c58 Update README.md 2023-03-04 15:23:39 +04:00
sashabaranov
114a7d14b2 Update README.md 2023-03-04 15:22:48 +04:00
sashabaranov
90bb5e47e8 Update README.md 2023-03-04 15:21:16 +04:00
sashabaranov
f89133c6e0 Update README.md 2023-03-04 15:19:54 +04:00
sashabaranov
656f6b174c Update README.md 2023-03-04 15:19:19 +04:00
sashabaranov
47887bf123 Rename and update docs (#120) 2023-03-04 15:18:43 +04:00
sashabaranov
202b629bc1 Update README.md 2023-03-04 14:57:43 +04:00
Hoani Bryson
0d3e887246 Add whisper 1 support (#117)
* Add whisper 1 support

* Resolve linting issues for audio source files
2023-03-04 14:54:48 +04:00
bestgopher
d668221b9c fix json tag (#116)
* remove pointer

* fix(models): change created_at to created
2023-03-04 14:51:59 +04:00
bestgopher
575c4e4adb remove pointer (#113) 2023-03-03 15:59:30 +04:00
fishcg
d1a81205bf Add chat message role const (#111) 2023-03-03 13:07:09 +04:00
sashabaranov
4e1be7d99f remove deprecated answers API (#108) 2023-03-03 11:07:40 +04:00
Afeyer
39ca4e9488 Implement chat completion streaming (#101)
* Implement chat completion streaming

* Optimize the implementation of chat completion stream

* Fix linter error
2023-03-03 09:52:02 +04:00
bestgopher
58d99eb220 refactor: use http.NewRequestWithContext instead of http.NewRequest (#97) 2023-03-02 10:27:09 +04:00
Parham Negahdar
de9a632138 Add the rest of the Chat Completion fields (#92)
Per https://platform.openai.com/docs/api-reference/chat/create
2023-03-02 10:06:24 +04:00
sashabaranov
b0b26afd50 Update README.md 2023-03-02 00:56:50 +04:00
sashabaranov
f5fc232415 Update README.md 2023-03-02 00:53:48 +04:00
sashabaranov
c8261c5638 Add chat completions (#90) 2023-03-02 00:47:25 +04:00
sashabaranov
ae05ed976f handle stream completion (#86)
* handle stream completion

* fix tests
2023-02-22 12:33:25 +04:00
sashabaranov
1eb5d625f8 Better configuration (#79)
* Configurable Transport (#75)

* new functions to allow HTTPClient configuration

* updated go.mod for testing from remote

* updated go.mod for remote testing

* revert go.mod replace directives

* Fixed NewOrgClientWithTransport comment

* Make client fully configurable

* make empty messages limit configurable #70 #71

* make auth token private in config

* add docs

* lint

---------

Co-authored-by: Michael Fox <m.will.fox@gmail.com>
2023-02-21 00:16:44 +04:00
Frank Yang
133d2c9184 fix dead loop while network error (#77) 2023-02-18 13:13:23 +04:00
sashabaranov
67a43e6392 bump empty messages limit (#72) 2023-02-14 21:26:33 +04:00
Marc Haisenko
ee3df71880 Improve error reporting (#68)
* Provide APIError and use Go's error wrapping

* Add generic request error

* Fix code formatting
2023-02-13 20:43:06 +04:00
sashabaranov
8fd81bc29a Break infinite loops in case [DONE] is missing (#67)
* Break infinite loops in case [DONE] is missing

* lint
2023-02-12 16:21:43 +04:00