Skip to content

Commit 822c4e6

Browse files
committed
fix(cli): 更新知识检索参数兼容性提示
1 parent f90ed8a commit 822c4e6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/cli/src/commands/knowledge/retrieve.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ async function runWithAkSk(
202202
Query: query,
203203
};
204204

205-
if (flags.topK !== undefined) body.TopK = flags.topK as number;
205+
if (flags.topK !== undefined && flags.rerankTopN === undefined) {
206+
process.stderr.write("Warning: --top-k is deprecated. Use --rerank-top-n instead.\n");
207+
flags.rerankTopN = flags.topK;
208+
}
209+
206210
if (flags.rerank) body.EnableReranking = true;
207211
if (flags.rerankTopN !== undefined) body.RerankTopN = flags.rerankTopN as number;
208212
if (flags.denseSimilarityTopK !== undefined)

0 commit comments

Comments
 (0)