Streaming with recursive function / tools calling

It seems you are almost there!

When streaming a response. You just need to display the content of those chunks as they are received into the user interface, appending content to what was previously received in the stream.

When added interactively to the chat display, then the user sees the formation of the response before their eyes.

You’ll also need a handler that can re-assemble the contents of tool calls and function calls, which are also received in chunks that are placed within repeating containers.