config: 默认参数调整 temp=1 top_p=1 freq/pres=0 max=64000

This commit is contained in:
Youzini-afk
2026-03-26 16:10:24 +08:00
parent 3dbfabad16
commit ef7da2bb5f

9
llm.js
View File

@@ -8,8 +8,8 @@ import { resolveTaskGenerationOptions } from "./generation-options.js";
const MODULE_NAME = "st_bme"; const MODULE_NAME = "st_bme";
const LLM_REQUEST_TIMEOUT_MS = 300000; const LLM_REQUEST_TIMEOUT_MS = 300000;
const DEFAULT_TEXT_COMPLETION_TOKENS = 1200; const DEFAULT_TEXT_COMPLETION_TOKENS = 64000;
const DEFAULT_JSON_COMPLETION_TOKENS = 2200; const DEFAULT_JSON_COMPLETION_TOKENS = 64000;
const RETRY_JSON_COMPLETION_TOKENS = 3200; const RETRY_JSON_COMPLETION_TOKENS = 3200;
function getMemoryLLMConfig() { function getMemoryLLMConfig() {
@@ -376,9 +376,12 @@ async function callDedicatedOpenAICompatible(
: "", : "",
model: config.model, model: config.model,
messages, messages,
temperature: filteredGeneration.temperature ?? (jsonMode ? 0 : 0.2), temperature: filteredGeneration.temperature ?? 1,
max_completion_tokens: resolvedCompletionTokens, max_completion_tokens: resolvedCompletionTokens,
stream: filteredGeneration.stream ?? false, stream: filteredGeneration.stream ?? false,
frequency_penalty: filteredGeneration.frequency_penalty ?? 0,
presence_penalty: filteredGeneration.presence_penalty ?? 0,
top_p: filteredGeneration.top_p ?? 1,
}; };
const optionalGenerationFields = [ const optionalGenerationFields = [