mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
feat: add switching thinking/non-thinking modes to models
This commit is contained in:
@@ -785,6 +785,11 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
||||
),
|
||||
form_data["messages"],
|
||||
)
|
||||
if "thinking" in features:
|
||||
form_data["enable_thinking"] = features["thinking"]
|
||||
form_data["chat_template_kwargs"] = {
|
||||
"enable_thinking": features["thinking"]
|
||||
}
|
||||
|
||||
tool_ids = form_data.pop("tool_ids", None)
|
||||
files = form_data.pop("files", None)
|
||||
|
||||
Reference in New Issue
Block a user