This is happening to me for all streamed assistant responses that invoke function calls, the function itself appears in one delta, and the next delta then shows the empty function above.
The current implementation is expecting these delta objects to have ID and name fields, which it seems the empty functions don't have.
What:
Description:
Fixes an error when OpenAI's API returns a delta object which has empty tool calls:
Undefined array key "id" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"id\" at /var/www/html/vendor/openai-php/client/src/Responses/Threads/Runs/Steps/ThreadRunStepResponseFunctionToolCall.php:41)
This is happening to me for all streamed assistant responses that invoke function calls, the function itself appears in one delta, and the next delta then shows the empty function above.
The current implementation is expecting these delta objects to have ID and name fields, which it seems the empty functions don't have.
This is related to the assistants streaming functionality merged in earlier today: https://github.com/openai-php/client/pull/367/