Streaming interferes with response completion

I recently integrated streaming to my web app that uses the assistants API. The Streaming was working fine for about a day, and once I have added a function to replace file citations, the response is not being fully returned by API in the web app, but in the playground. What might be the issue?

P.S - the streaming and assistants logic was implemented as seen in the official vercel next.js AI SDK

1 Like

Are you making sure to act on both on_message_delta and on_tool_call_delta? on_tool_call_delta is where the response that goes along with the tool call is.

That fixed the error @jschmid , tool calling was missed out but now as I include it , its working. Greatly appreciate it!

1 Like

Glad to here it helped, good luck with your project!