Skip to content

merge main branch #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 256 commits into
base: master
Choose a base branch
from
Open

Conversation

Leizhenpeng
Copy link
Member

No description provided.

appleboy and others added 30 commits May 27, 2023 14:13
* move request_builder into internal pkg (#304)

* add some test for internal.RequestBuilder

* add a test for openai.GetEngine
* 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
* move error_accumulator into internal pkg (#304)

* move error_accumulator into internal pkg (#304)

* add a test for ErrTooManyEmptyStreamMessages in stream_reader (#304)
* Support Retrieve model API (#340)

* Test for GetModel error cases. (#340)

* Reduce the cognitive complexity of TestClientReturnsRequestBuilderErrors (#340)
#339)

* 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.
* fix json marshaling error response of azure openai (#343)

* add a test case for handleErrorResp func (#343)
* Support Retrieve file content API (#347)

* add timeout test for GetFileContent (#347)
Added GPT3Dot5Turbo0613, GPT3Dot5Turbo16K, GPT40613, and GPT432K0613
models from June update
(https://openai.com/blog/function-calling-and-other-api-updates)

Issue #360
* Improve (#356) to support registration of wildcard URLs

* Add TestAzureChatCompletions & TestAzureChatCompletionsWithCustomDeploymentName

* Remove TestAzureChatCompletionsWithCustomDeploymentName

---------

Co-authored-by: coggsflod <richard.coggins@officedepot.com>
* add 16k_0613 model

* add 16k_0613 model

* add model:
* feat(chat): support function call api

* rename struct & add const ChatMessageRoleFunction
* add items, which is required for array type

* use JSONSchemaDefine directly
* audio: add items to AudioResponseFormat enum

* audio: expand AudioResponse struct to accommodate verbose json response

---------

Co-authored-by: Roman Zubov <rzubov@aintsys.com>
* fix: chat stream resp has 'data: ' prefix

* fix: lint error

* fix: lint error

* fix: lint error
* 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>
* 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.
* move json schema to directory/package

* added jsonschema to README
bakatz and others added 30 commits May 3, 2025 21:44
* add tests for config

* add audio tests

* lint

* lint

* lint
* Upgrade golangci-lint to 2.1.5

* update action
* feat: add gpt-image-1 support

* feat: add example to generate image using gpt-image-1 model

* style: missing period in comments

* feat: add missing fields to example

* docs: add GPT Image 1 to README

* revert: keep `examples/images/main.go` unchanged

* docs: remove unnecessary newline from example in README file
Co-authored-by: Justa <justa.cai@akuvox.com>
* update image api *os.File to io.Reader

* update code style

* add reader test

* supplementary reader test

* update the reader in the form builder test

* add commnet

* update comment

* update code style
* skip json field

* backfill some coverage and tests
* fix image api missing filename bug

* add test

* add test

* update test
…r tests (#999)

* test: enhance error accumulator and form builder tests, add marshaller tests

* test: fix some issue form golangci-lint

* test: gofmt form builder test

* fix

* fix

* fix lint
* Fix for #1021:
1. Make Usage field in completions Response to pointer.

* Fix for #1021:
1. Make Usage field in completions Response to pointer.
2. Add omitempty to json tag

Signed-off-by: Hritik003 <hritik.raj@nutanix.com>

---------

Signed-off-by: Hritik003 <hritik.raj@nutanix.com>
…ONSchema.schema (#1028)

* feat: #1027

* add tests

* feat: #1027

* feat: #1027

* feat: #1027

* update chat_test.go

* feat: #1027

* add test cases
* Add support for Chat Completion Service Tier

* Add priority service tier
* support $ref and $defs in JSON Schema

* update
* Add unit tests to improve coverage

* Fix type assertion checks in tests
* support $ref and $defs in JSON Schema

* update

* removed root $ref from JSON Schema

* Update json.go

* Update json_test.go

* Update jsonschema/json.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update jsonschema/json.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* support for extra_body parameter for embeddings API

* done linting

* added unit tests

* improved code coverage and removed unnecessary checks

* test cleanup

* updated body map creation code

* code coverage

* minor change

* updated testcase comment
* test: expand jsonschema coverage

* test: fix package name for containsref tests
* Add unit tests for internal test utilities

* Fix lint issues in internal tests
* Add GuidedChoice to ChatCompletionRequest

* made separate NonOpenAIExtensions

* fixed lint issue

* renamed struct and removed inline json tag

* Update chat.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update chat.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Alex Baranov <677093+sashabaranov@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.