-
Notifications
You must be signed in to change notification settings - Fork 294
Description
We are encountering an issue with function calls where the assistant responds prematurely, before the function has a chance to complete its execution and return the correct data.
This behavior occurs:
- Locally, when running the repository from this GitHub repo.
- On our own staging servers.
- Also, here is an example of the bug on the "Developers Digest" YouTube channel showcasing this repo: Video link at 4:25 mark.
Example scenario:
- I ask:
"What's the weather in Seattle?" - The assistant responds prematurely:
"It seems I'm having a little trouble fetching the weather right now. How about I try something else for you? Is there anything else I can help you with?"
However, the function call is triggered correctly and returns the weather. - I ask again:
"What's the weather in Seattle?" - This time, the assistant correctly responds with the weather.
Additional Information:
We are using the latest version of the repository code and have observed this behavior consistently.
Is there any way around this issue? It would be helpful if there were a way to configure something like functionTimeout: 10 seconds
, which would allow more time for the function call to complete before the assistant responds.
One potential workaround could be to ignore all responses from OpenAI until the function call finishes, and then manually trigger a response.create
event afterward. However, this approach feels a bit hacky. Is there a more reliable or recommended solution to handle this?