Commit Graph

10 Commits

Author SHA1 Message Date
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
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
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
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
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
blfletcher
7c56bd3034 Added delete endpoint (#8)
* Added a files endpoint, corrected a documents bug in answers requests, added error messages to API error handling

* Added file upload endpoint

* Added DeleteFile endpoint

Co-authored-by: eyelevelai <33876565+eyelevelai@users.noreply.github.com>
2021-08-05 10:59:34 +03:00
blfletcher
3dfb5bd804 File upload endpoint (#7) 2021-08-03 18:51:23 +03:00
blfletcher
6297de371c Added a files endpoint, corrected a documents bug in answers requests, added error messages to API error handling (#6)
Co-authored-by: eyelevelai <33876565+eyelevelai@users.noreply.github.com>
2021-07-18 23:32:20 +03:00
Tor Hagemann
8b3c0d0c52 api.go: add constructor variant for organizations 2021-06-03 14:24:15 -07:00
Alexander Baranov
f5b3ec4ffe Add api client code 2020-08-19 12:57:32 +03:00