From ef7e47d1625c5e678b8bf5da2d253e2fedd9470f Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Fri, 20 Dec 2024 16:12:34 +0800 Subject: [PATCH] fix: rerank switch (#11897) --- .../components/workflow/nodes/knowledge-retrieval/utils.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts index e9da9accccf783..794fcbca4aa216 100644 --- a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts +++ b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts @@ -129,9 +129,6 @@ export const getMultipleRetrievalConfig = ( reranking_enable: ((allInternal && allEconomic) || allExternal) ? reranking_enable : true, } - if (!rerankModelIsValid) - result.reranking_model = undefined - const setDefaultWeights = () => { result.weights = { vector_setting: { @@ -198,7 +195,6 @@ export const getMultipleRetrievalConfig = ( setDefaultWeights() } } - if (reranking_mode === RerankingModeEnum.RerankingModel && !rerankModelIsValid && shouldSetWeightDefaultValue) { result.reranking_mode = RerankingModeEnum.WeightedScore setDefaultWeights()