From bdcddbc0afe86a6a3c2889153a5edac1807088d0 Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Mon, 11 Nov 2024 18:29:51 +0800 Subject: [PATCH] fix: retrieval setting validate --- .../components/workflow/nodes/knowledge-retrieval/utils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts index 0ed24ff495..d22900fc26 100644 --- a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts +++ b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts @@ -198,6 +198,11 @@ export const getMultipleRetrievalConfig = ( setDefaultWeights() } } + + if (reranking_mode === RerankingModeEnum.RerankingModel && !rerankModelIsValid) { + result.reranking_mode = RerankingModeEnum.WeightedScore + setDefaultWeights() + } } return result