-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Feat Support tools and tools choice new fileds #526
Feat Support tools and tools choice new fileds #526
Conversation
…s-and-tool_choice
Codecov Report
@@ Coverage Diff @@
## master #526 +/- ##
=======================================
Coverage 97.59% 97.59%
=======================================
Files 19 19
Lines 872 872
=======================================
Hits 851 851
Misses 15 15
Partials 6 6
|
Thank you for the PR! |
@@ -9,6 +9,7 @@ type ChatCompletionStreamChoiceDelta struct { | |||
Content string `json:"content,omitempty"` | |||
Role string `json:"role,omitempty"` | |||
FunctionCall *FunctionCall `json:"function_call,omitempty"` | |||
ToolCalls []ToolCall `json:"tool_calls,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this field in the docs, is it undocumented yet? https://platform.openai.com/docs/api-reference/chat/streaming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes documented here: "The chat completion chunk object" -> choices -> delta -> tool_calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Also noted: lots of things are marked as deprecated now, we should probably reflect those too #540
FunctionCall any `json:"function_call,omitempty"` | ||
Tools []Tool `json:"tools,omitempty"` | ||
// This can be either a string or an ToolChoice object. | ||
ToolChoiche any `json:"tool_choice,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix included here #543
Describe the change
This branch adds support for new fields
tools
andtool_choice
Describe your solution
New types have been added to support new features