* fix: invalid schema for function 'func_name': None is not of type 'object' (#429)(#432)
* test: add integration test for function call (#429)(#432)
* style: remove duplicate import (#429)(#432)
* Allow raw tokens to be used as embedding input
* fix linting issues (lines too long)
* add endpoint test for embedding from tokens
* remove redundant comments
* fix comment to match new param name
* change interface to any
* Rename methods and implement convert for base req
* add comments to CreateEmbeddings
* update tests
* shorten line length
* rename parameter
* 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.
* feat: use json.rawMessage, test functions
* chore: lint
* fix: tests
the ChatCompletion mock server doesn't actually run otherwise. N=0
is the default request but the server will treat it as n=1
* fix: tests should default to n=1 completions
* chore: add back removed interfaces, custom marshal
* chore: lint
* chore: lint
* chore: add some tests
* chore: appease lint
* clean up JSON schema + tests
* chore: lint
* feat: remove backwards compatible functions
for illustrative purposes
* fix: revert params change
* chore: use interface{}
* chore: add test
* chore: add back FunctionDefine
* chore: /s/interface{}/any
* chore: add back jsonschemadefinition
* chore: testcov
* chore: lint
* chore: remove pointers
* chore: update comment
* chore: address CR
added test for compatibility as well
---------
Co-authored-by: James <jmacwhyte@MacBooger-II.local>
* 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.
* Support Retrieve model API (#340)
* Test for GetModel error cases. (#340)
* Reduce the cognitive complexity of TestClientReturnsRequestBuilderErrors (#340)
* move error_accumulator into internal pkg (#304)
* move error_accumulator into internal pkg (#304)
* add a test for ErrTooManyEmptyStreamMessages in stream_reader (#304)
* Implement optional io.Reader in AudioRequest (#303) (#265)
* Fix err shadowing
* Add test to cover AudioRequest io.Reader usage
* Add additional test cases to cover AudioRequest io.Reader usage
* Add test to cover opening the file specified in an AudioRequest
* chore(config.go): update Azure API version to 2023-05-15 to use the latest version available
* chore(api_internal_test.go): update Azure API version to 2023-05-15 to match the latest version