We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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)
array:1 [ 0 => OpenAI\Responses\Chat\CreateStreamedResponseToolCall^ {#202 +id: "call_lzS2i19jrpRSCKftKDLoRa2G" +type: "function" +function: OpenAI\Responses\Chat\CreateStreamedResponseToolCallFunction^ {#178 +name: "sendMail" +arguments: "" } } ]
array:1 [ 0 => OpenAI\Responses\Chat\CreateStreamedResponseToolCall^ {#86 +id: null +type: null +function: OpenAI\Responses\Chat\CreateStreamedResponseToolCallFunction^ {#400 +name: null +arguments: "{\n" } } ]
...
array:1 [ 0 => OpenAI\Responses\Chat\CreateStreamedResponseToolCall^ {#414 +id: null +type: null +function: OpenAI\Responses\Chat\CreateStreamedResponseToolCallFunction^ {#413 +name: null +arguments: "}" } } ]
[]
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:
Hey @arnaudgoulpeau, thanks for having spotted this. I'll have a look at it when I have a bit of time.
Can you write me the code you used to get this so I can use it as a test?
Sorry, something went wrong.
No branches or pull requests
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: