I am trying to use function calling with streaming on, I am struggling with rebuilding the chat completion message from the chunks in the stream object, this is required for feeding the function output back to the chat.
Yep, stream the message/content in the response to the chat to and at the same time store the entire stream in a buffer. When the stream is complete validate the json in the buffer, get the function call stuff and run it. Pretty cave-man but reliable.