-
-
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
Add SystemFingerprint and chatMsg.ToolCallID field #543
Add SystemFingerprint and chatMsg.ToolCallID field #543
Conversation
Codecov Report
@@ Coverage Diff @@
## master #543 +/- ##
=======================================
Coverage 97.88% 97.88%
=======================================
Files 20 20
Lines 991 991
=======================================
Hits 970 970
Misses 15 15
Partials 6 6
|
and add omitempty for tool_call_id
@gburt thank you for the PR! Seems like there's a conflicting change here |
you're welcome! thanks for the great library |
ToolCalls []ToolCall `json:"tool_calls,omitempty"` | ||
|
||
// For Role=ASSISTANT prompts this may be set to the tool calls generated by the model, such as function calls. | ||
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.
Could you please point out this field in the documentation?
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.
also, could we please de-capslock the Role=ASSISTANT
and Role=TOOL
here? :)
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.
Ah yeah good call re: caps (we use SCREAMING enums internally...). Here are the docs for CreateChatRequest.messages.tool_calls:
* fix ToolChoiche typo * add tool_call_id to ChatCompletionMessage * add /chat system_fingerprint response field * check empty ToolCallID JSON marshaling and add omitempty for tool_call_id * messages also required; don't omitempty * add Type to ToolCall, required by the API * fix test, omitempty for response_format ptr * fix casing of role values in comments
A few small improvements:
system_fingerprint
response field to chat callstool_call_id
that needs to be set for role=TOOL prompts