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
Rascal0814
5191ea6f55
Modify the test module, add the file upload test, and add the image edit api ( #63 )
...
* Modify the test module, add the file upload test, and add the image editing api
* fix golangci-lint
* fix golangci-lint
* Static file deletion, file directory name modification
* fix
* test-server-related logic encapsulated in a single tidy
struct
---------
Co-authored-by: julian_huang <julian.huang@yuansuan.com >
2023-02-11 22:51:53 +04:00
sashabaranov
ae06df7d9f
Update README.md
2023-02-07 20:43:39 +04:00
sashabaranov
6758ec4d96
Streaming support ( #61 )
...
* Add streaming support feature (#54 )
* Add streaming support feature
removes golangci linting deprecation warnings
See: [Issue #49 ](https://github.com/sashabaranov/go-gpt3/issues/49 )
* remove dead token
* Remove the goroutines from previous implementation
Set up separate test and file for streaming support
Add client code under cmd dir
* Supress CI errors
Need to update import path to test under feature/streaming-support
branch
* suppress linting errors
---------
Co-authored-by: sashabaranov <677093+sashabaranov@users.noreply.github.com >
* remove main.go
* remove code duplication
* use int64
* finalize streaming support
* lint
* fix tests
---------
Co-authored-by: e. alvarez <55966724+ealvar3z@users.noreply.github.com >
2023-02-07 20:42:53 +04:00
sashabaranov
3695eb3ade
use int64 timestamps everywhere ( #59 )
2023-01-28 23:18:59 +04:00
Jason Chavannes
8dac9408c1
List models ( #58 )
2023-01-28 23:14:34 +04:00
sashabaranov
b6e0908977
Run tests on PR ( #57 )
...
* run tests on PR
* fix tests+lint
* update linter config
2023-01-28 22:32:23 +04:00
sm2642
794a5512f6
-Added moderation endpoint test ( #56 )
...
-Rearrange some code
Co-authored-by: Shalin <shalinmehta85@gmail.com >
2023-01-28 22:25:38 +04:00
sashabaranov
81b5788cd6
Update README.md
2023-01-12 12:02:07 +04:00
sashabaranov
cf013d3eb5
Remove default timeout and search API ( #51 )
...
* remove 1 minute timeout
* remove deprecated search api test
* remove search api
2023-01-07 00:22:39 +04:00
Andrew Poydence
2c55a49a34
Add Image generation API ( #48 )
2023-01-03 17:15:50 +04:00
Matt Trefilek
1c20931ead
Fix for Ada Model Name ( #45 )
...
* Fix for Ada Model Name
* Refactoring ADA embeddings naming
2022-12-16 13:56:10 +04:00
Matt Trefilek
9ada7ea8e1
New Ada Similarity ( #44 )
2022-12-16 00:54:42 +04:00
Matt Trefilek
23925ad36e
Add Token Usage to Embeddings ( #43 )
2022-12-15 22:15:28 +04:00
James Καρεφυλάκης
fa5319e59a
Remove deprecated code ( #40 )
2022-12-15 12:13:16 +04:00
zacherystuart
0f9f4aa343
Add Suffix to CompletionRequest for insert mode ( #36 )
...
Add "Suffix" to "CompletionRequest" to support the new insert mode.
Insert mode info: https://openai.com/blog/gpt-3-edit-insert/
New Completion Request API Reference: https://beta.openai.com/docs/api-reference/completions/create#completions/create-prompt
2022-12-02 14:54:56 +04:00
Matt Trefilek
3697bf4a97
Add new text-davinci-003 model to constants ( #35 )
2022-11-30 13:07:31 +04:00
Alexander Baranov
be08f204f0
Skip production API test by default
2022-08-11 15:41:37 +06:00
Oleg
d63df93c65
Add OpenAI Mock Server ( #31 )
...
* add constants for completions, refactor usage, add test server
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
* append v1 endpoint to test
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
* add makefile for easy targets
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
* lint files & add linter
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
* disable real API tests in short mode
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
2022-08-11 15:29:23 +06:00
nya~
8b463ceb2b
Update moderation.go ( #29 )
2022-08-03 11:41:36 +06:00
Oleg
53212c71df
Migrate From Old Completions + Embedding Endpoint ( #28 )
...
* migrate away from deprecated OpenAI endpoints
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
* test embedding correctness
Signed-off-by: Oleg <97077423+RobotSail@users.noreply.github.com >
2022-08-02 14:16:54 +06:00
noona
51f94a6ab3
rev-1: Added some fixes & improvements ( #26 )
...
* Added support for Moderations API
* gofmt moderation.go
* support for edits endpoint & other improvements
* fix: Choice redeclared in this block
* Added more parameters for the Search endpoint. (#3 )
2022-07-03 23:51:02 +06:00
noona
1f716381cd
Added support for Edits endpoint & other minor changes ( #22 )
...
* Added support for Moderations API
* gofmt moderation.go
* support for edits endpoint & other improvements
2022-07-01 21:14:01 +06:00
Alexander Baranov
277071e0f7
proper naming
2022-07-01 21:13:12 +06:00
Alexander Baranov
21410bda2c
use only golangci-lint
2022-07-01 21:09:54 +06:00
Alexander Baranov
28c1997dfa
fix actions
2022-07-01 21:05:28 +06:00
Alexander Baranov
7c22be5d3e
enable github actions
2022-07-01 21:04:19 +06:00
noona
11649c54c2
rev: added a file to support moderations endpoint ( #21 )
...
* Added support for Moderations API
* gofmt moderation.go
2022-07-01 15:57:01 +06:00
Andy Day
260ef874de
Update model names ( #16 )
2022-03-15 02:10:30 +04:00
Viacheslav Kovalevskyi
eecd212963
logit_bias field added to the completion request ( #14 )
2022-01-10 10:05:23 +03:00