mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-02 02:09:17 -05:00
refac: "tool_calls" finish reason support
This commit is contained in:
@@ -166,6 +166,9 @@ async def convert_streaming_response_ollama_to_openai(ollama_streaming_response)
|
||||
model, message_content, reasoning_content, openai_tool_calls, usage
|
||||
)
|
||||
|
||||
if done and openai_tool_calls:
|
||||
data["choices"][0]["finish_reason"] = "tool_calls"
|
||||
|
||||
line = f"data: {json.dumps(data)}\n\n"
|
||||
yield line
|
||||
|
||||
|
||||
Reference in New Issue
Block a user