Skip to content

Commit 19ee8bd

Browse files
authored
Merge pull request #7286 from Pyroboomka/pyroboomkafix-respect-use-reranking-from-config
Respect "useReranking" field from configuration
2 parents e17856c + 69463a2 commit 19ee8bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/context/retrieval/retrieval.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function retrieveContextItemsFromEmbeddings(
3737
const nFinal =
3838
options?.nFinal ??
3939
Math.min(DEFAULT_N_FINAL, contextLength / tokensPerSnippet / 2);
40-
const useReranking = !!extras.reranker;
40+
const useReranking = options?.useReranking ?? !!extras.reranker;
4141
const nRetrieve = useReranking ? options?.nRetrieve || 2 * nFinal : nFinal;
4242

4343
const branches = (await Promise.race([

0 commit comments

Comments
 (0)