* refactoring http request creation and sending
* fix lint error
* increase the test coverage of client.go
* refactor: Change the style of HTTPRequestBuilder.Build func to one-argument-per-line.
* test: Add tests for improved coverage before refactoring
This commit adds tests to improve coverage before refactoring
to ensure that the changes do not break anything.
* refactor: replace goto statement with loop
This commit introduces a refactor to improve the clarity of the control flow within the method.
The goto statement can sometimes make the code hard to understand and maintain, hence this refactor aims to resolve that.
* refactor: extract for-loop from Recv to another method
This commit improves code readability and maintainability
by making the Recv method simpler.
* move error_accumulator into internal pkg (#304)
* move error_accumulator into internal pkg (#304)
* add a test for ErrTooManyEmptyStreamMessages in stream_reader (#304)
* Add model check for chat stream
* Sync model checks
* Fix typo
* Fix functino
* refactor: Refactor endpoint and model compatibility check
* apply review suggestions
* minor fix
* invert return boolean flag
* fix test
* 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>
* 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>