Python: streaming tool calls with multiple indices are broken
Closed this issue · 0 comments
moonbox3 commented
Describe the bug
When using function calling and streaming responses, the arguments from a non-zero index (aka a second or third tool call ID) are being added to the first tool call ID, showing arguments like {}{"city": "Boston"}
.
The issue looks to be located in the StreamingChatMessageContent
add override method, where once the FunctionCallContent is added for the first id, the enumerate loop has a break and subsequent tool call IDs don't have a chance to be processed.