forked from sashabaranov/go-openai
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Leizhenpeng
wants to merge
256
commits into
ConnectAI-E:master
Choose a base branch
from
sashabaranov:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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.
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
* 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
* 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.