openai-php / client

⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
MIT License
4.7k stars 483 forks source link

Streamed Response With Functions #202

Closed jbainpro closed 12 months ago

jbainpro commented 12 months ago

When using Functions with chat()->createStreamed the function call name and argument is not returned. I see on the OpenAI docs that it should be returned in the stream as well. Can anyone offer some guidance as to why it isn't being returned. It works fine with chat()->create or when the second call is made but I want the response of the first call to be streamed back if no function is called.

jbainpro commented 12 months ago

Figured it out, it was my mistake.