Zero-darkbox query updates and tokenizer improvements

This commit is contained in:
2026-02-09 20:25:26 +08:00
parent 8131d6a15f
commit 0a28539b29
14 changed files with 1771 additions and 175 deletions

View File

@@ -78,7 +78,8 @@ export async function rerank(query, documents, options = {}) {
},
body: JSON.stringify({
model: RERANK_MODEL,
query: query.slice(0, 1000), // 限制 query 长度
// Zero-darkbox: do not silently truncate query.
query,
documents: validDocs,
top_n: Math.min(topN, validDocs.length),
return_documents: false,