aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-16 13:26:45 +0200
committerDanilo M. <danix@danix.xyz>2026-10-16 13:26:45 +0200
commit185a4ed7a605a8b22ab51beb417c155e85c811ef (patch)
treeeb5ec3c4335cd504f4e592515d0adbc81a0a1de3
parentfb2f4dc1b2bea257be1f6dc5afa2f3a3b626df71 (diff)
downloaddesktop-assistant-185a4ed7a605a8b22ab51beb417c155e85c811ef.tar.gz
desktop-assistant-185a4ed7a605a8b22ab51beb417c155e85c811ef.zip
Make thinking a config key, on by default
Measured live: with reasoning on, a two-line question took 21 s of thinking before its first token, against about 5 s for questions that needed little. thinking = false in config.toml skips it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--assistant.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/assistant.py b/assistant.py
index a36d43e..937700a 100644
--- a/assistant.py
+++ b/assistant.py
@@ -51,6 +51,7 @@ DEFAULTS = {
"tell, say you do not know. Never guess them."),
"tool_rounds": 3,
"temperature": None, # None: the llama-server preset's
+ "thinking": True, # False skips the model's reasoning
"env": {},
}
OPEN = {"env"} # free-form tables: replaced whole, not merged
@@ -480,7 +481,7 @@ def ask(messages, calls, tools=None):
context_size(model)
body = {"model": model, "messages": messages, "stream": True,
"stream_options": {"include_usage": True},
- "chat_template_kwargs": {"enable_thinking": True}}
+ "chat_template_kwargs": {"enable_thinking": CFG["thinking"]}}
if tools:
body["tools"] = tools
if CFG["temperature"] is not None: