forked from sashabaranov/go-openai
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from sashabaranov:master #40
Open
pull
wants to merge
39
commits into
Mu-L: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.
+1,805
−257
Conversation
This file contains 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
* feat: Add DeleteMessage function to API client * fix: linter nolint : Deprecated method split function: cognitive complexity 21 * rename func name for unit-test
* feat: add jsonschema.Validate and jsonschema.Unmarshal * fix Sanity check * remove slices.Contains * fix Sanity check * add SchemaWrapper * update api_integration_test.go * update method 'reflectSchema' to support 'omitempty' in JSON tag * add GenerateSchemaForType * update json_test.go * update `Warp` to `Wrap` * fix Sanity check * fix Sanity check * update api_internal_test.go * update README.md * update README.md * remove jsonschema.SchemaWrapper * remove jsonschema.SchemaWrapper * fix Sanity check * optimize code formatting
* depricated model GPT3Ada changed to GPT3Babbage002 * Delete test.mp3
* add custom marshaller, documentation and isolate tests * fix linter * add missing field
These model strings are now available for use. More info: https://openai.com/index/introducing-openai-o1-preview/ https://platform.openai.com/docs/guides/reasoning
* add max_completions_tokens for o1 series models * add validation for o1 series models validataion + beta limitations
Filter messages by the run ID that generated them. Co-authored-by: wappi <[email protected]>
* update client error return * update client_test.go * update client_test.go * update file_api_test.go * update client_test.go * update client_test.go
The json tag is incorrect, and results in an error from the API when using the o1 model. I didn't modify the struct field name to maintain compatibility if anyone else had started using it, but it wouldn't work for them either.
* fix spelling error * fix lint * Update chat.go * Update chat.go
* add jailbreak filter result * add content filter results on completion output * add profanity content filter
* Completion API: add 'store' param This param allows you to opt a completion request in to being stored, for use in distillations and evals. * Add cached and audio tokens to usage structs These have been added to the completions API recently: https://platform.openai.com/docs/api-reference/chat/object#chat/object-usage
* removed handling for non-json response * added response body in RequestError.Error() and updated tests * done linting
…#885) * updated checkPromptType function to handle prompt list in completions * removed generated test file * added corresponding unit testcases * Updated to use less nesting with early returns
* add chatcompletion stream refusal and logprobs * fix slice to struct * add integration test * fix lint * fix lint * fix: the object should be pointer --------- Co-authored-by: genglixia <[email protected]>
* add attachments in MessageRequest * Move tools const to message * remove const, just use assistanttool const
* updated client_test to solve lint error * modified golangci yml to solve linter issues * minor change
* make user optional in embedding request * fix unit test
The ID field is not always present for streaming responses. Without omitempty, the entire ToolCall struct will be missing.
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.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )