mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-03 10:49:21 -05:00
refac: "tool_calls" finish reason support
This commit is contained in:
@@ -447,7 +447,7 @@ def openai_chat_completion_message_template(
|
||||
**({"tool_calls": tool_calls} if tool_calls else {}),
|
||||
}
|
||||
|
||||
template["choices"][0]["finish_reason"] = "stop"
|
||||
template["choices"][0]["finish_reason"] = "tool_calls" if tool_calls else "stop"
|
||||
|
||||
if usage:
|
||||
template["usage"] = usage
|
||||
|
||||
Reference in New Issue
Block a user