mirror of
https://github.com/open-webui/open-webui
synced 2025-04-30 11:03:58 +00:00
fix: handling tool calls in streamed responses
This commit is contained in:
parent
af02708b4c
commit
99ce85f20f
@ -1671,6 +1671,15 @@ async def process_chat_response(
|
||||
|
||||
if current_response_tool_call is None:
|
||||
# Add the new tool call
|
||||
delta_tool_call.setdefault(
|
||||
"function", {}
|
||||
)
|
||||
delta_tool_call["function"].setdefault(
|
||||
"name", ""
|
||||
)
|
||||
delta_tool_call["function"].setdefault(
|
||||
"arguments", ""
|
||||
)
|
||||
response_tool_calls.append(
|
||||
delta_tool_call
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user