-
Notifications
You must be signed in to change notification settings - Fork 148
v2 ChatCompletionMessage.ToParams() returns an empty slice of ToolCalls #309
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
Comments
@jacobzim-stl please take a look at this v2 issue. The code was working fine in v1. Thanks! |
Thanks for the report, working on shipping a fix now. |
just saw your commit:
just for your info: Maybe you have to set something like: if r.Content != "" { before the JSON Blocks; or ensure the JSON Values are actual set (they are all empty) r.JSON.Content => Empty I am using a a openai.ChatCompletionAccumulator{} |
Thanks for the catch |
ciao @jacobzim-stl, thanks a ton for your fast hacking! maybe another hint for the relase notes: |
The ToParam issue should be resolved. @adrianliechti I appreciate the feedback, I'll add a note to the migration guide. |
Uh oh!
There was an error while loading. Please reload this page.
When no tool call is present, ToParams returns an empty slice. This causes an issue when continuing the conversation, as the chat completion API expects tool_calls to contain at least one element.
Trace:
The text was updated successfully, but these errors were encountered: