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
Tool calls in streamed responses #93
Labels
bug
Something isn't working
Comments
Hey @arnaudgoulpeau, Can you write me the code you used to get this so I can use it as a test? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi !
I tried to use the OpenAIChat::createStreamedResponse with a function.
The finishReason is not function_call but tool_calls
It is not the only issue I faced.
Since it is a stream, when hitting the finishReason="tool_class", the array $toolsCalled is empty.
Here is the cinematic of $partialResponse->choices[0]->delta->toolCalls (note that $toolsCalled = []; for each piece of stream)
...
Note the empty array
I honnestly don't know how to "merge" the buidling $toolsCalled for each piece of stream.
The text was updated successfully, but these errors were encountered: