Fix recall rerank stability and card binding

This commit is contained in:
Youzini-afk
2026-04-03 16:37:23 +08:00
parent 12f77e234d
commit 338a03aa1c
5 changed files with 195 additions and 21 deletions

6
llm.js
View File

@@ -1446,6 +1446,7 @@ export async function callLLMForJSON({
promptMessages = [],
debugContext = null,
onStreamProgress = null,
maxCompletionTokens = null,
returnFailureDetails = false,
} = {}) {
const override = getLlmTestOverride("callLLMForJSON");
@@ -1461,6 +1462,7 @@ export async function callLLMForJSON({
promptMessages,
debugContext,
onStreamProgress,
maxCompletionTokens,
returnFailureDetails,
});
}
@@ -1489,7 +1491,9 @@ export async function callLLMForJSON({
taskType,
requestSource: privateRequestSource,
onStreamProgress,
maxCompletionTokens: DEFAULT_JSON_COMPLETION_TOKENS,
maxCompletionTokens: Number.isFinite(maxCompletionTokens)
? maxCompletionTokens
: DEFAULT_JSON_COMPLETION_TOKENS,
});
const responseText = response?.content || "";
const outputCleanup = applyTaskOutputRegexStages(taskType, responseText);