From 9af21098c6ee2b5fb6cccc3925b3789051274eed Mon Sep 17 00:00:00 2001 From: cra88y/pc Date: Sun, 3 May 2026 16:32:58 -0500 Subject: [PATCH] clean up, fix bugs, surface more errors --- ai_answers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ai_answers.py b/ai_answers.py index 3433de3..34e2ae4 100644 --- a/ai_answers.py +++ b/ai_answers.py @@ -1036,7 +1036,7 @@ class SXNGPlugin(Plugin): return Response("Missing API key or query", status=400) today = time.strftime("%Y-%m-%d") - target_words = int(self.max_tokens * 0.4) + target_words = int(self.max_tokens * 0.75 * 0.70) lang_instruction = f" Respond in {lang}." if lang not in ('all', 'auto') else "" base_sys = self.system_prompt if self.system_prompt else "You are a direct, citation-accurate search synthesis engine." @@ -1183,7 +1183,7 @@ class SXNGPlugin(Plugin): "model": self.model, "messages": [{"role": "user", "content": prompt}], "stream": True, - "max_tokens": min(self.max_tokens * 4, 8192), + "max_tokens": self.max_tokens, "temperature": self.temperature }) headers = {