From ef7da2bb5f2b5074c172bf4e0f2f386105488f62 Mon Sep 17 00:00:00 2001 From: Youzini-afk <13153778771cx@gmail.com> Date: Thu, 26 Mar 2026 16:10:24 +0800 Subject: [PATCH] =?UTF-8?q?config:=20=E9=BB=98=E8=AE=A4=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20temp=3D1=20top=5Fp=3D1=20freq/pres=3D0=20m?= =?UTF-8?q?ax=3D64000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- llm.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/llm.js b/llm.js index 389f855..65346d1 100644 --- a/llm.js +++ b/llm.js @@ -8,8 +8,8 @@ import { resolveTaskGenerationOptions } from "./generation-options.js"; const MODULE_NAME = "st_bme"; const LLM_REQUEST_TIMEOUT_MS = 300000; -const DEFAULT_TEXT_COMPLETION_TOKENS = 1200; -const DEFAULT_JSON_COMPLETION_TOKENS = 2200; +const DEFAULT_TEXT_COMPLETION_TOKENS = 64000; +const DEFAULT_JSON_COMPLETION_TOKENS = 64000; const RETRY_JSON_COMPLETION_TOKENS = 3200; function getMemoryLLMConfig() { @@ -376,9 +376,12 @@ async function callDedicatedOpenAICompatible( : "", model: config.model, messages, - temperature: filteredGeneration.temperature ?? (jsonMode ? 0 : 0.2), + temperature: filteredGeneration.temperature ?? 1, max_completion_tokens: resolvedCompletionTokens, stream: filteredGeneration.stream ?? false, + frequency_penalty: filteredGeneration.frequency_penalty ?? 0, + presence_penalty: filteredGeneration.presence_penalty ?? 0, + top_p: filteredGeneration.top_p ?? 1, }; const optionalGenerationFields = [