fix: thinking hart deaktiviert + leere think-tags entfernt (Crash-Fix) + Terminal-Chat-Client
This commit is contained in:
+2
-3
@@ -353,8 +353,7 @@ def render_chat(messages, enable_thinking=False, reasoning_effort=None, tools=No
|
||||
raise APIError(400, f"Unsupported message role: {role!r}.",
|
||||
f"messages.{index}.role", "unsupported_role")
|
||||
prev_tool = (role == "tool")
|
||||
prompt.append("<|assistant|><think>" if enable_thinking else
|
||||
"<|assistant|><think></think>")
|
||||
prompt.append('<|assistant|>' if not enable_thinking else '<|assistant|><think>')
|
||||
return "".join(prompt)
|
||||
|
||||
|
||||
@@ -950,7 +949,7 @@ class APIHandler(BaseHTTPRequestHandler):
|
||||
if (reasoning_effort is None and "enable_thinking" not in body
|
||||
and os.environ.get("COLI_THINK", "0") == "1"):
|
||||
reasoning_effort = "high"
|
||||
enable_thinking = body.get("enable_thinking", reasoning_effort not in (None, "none"))
|
||||
enable_thinking = False # FORCED OFF by Cody
|
||||
if not isinstance(enable_thinking, bool):
|
||||
raise APIError(400, "`enable_thinking` must be a boolean.", "enable_thinking")
|
||||
tools = body.get("tools") or body.get("functions") or None
|
||||
|
||||
Reference in New Issue
Block a user