Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Fix rerank model switching issue (#12721)

Wu Tianweibc3a570dda37
diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts
index c7b48c1eaab..fd4a5806eb6 100644
--- a/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts
+++ b/web/app/components/workflow/nodes/knowledge-retrieval/utils.ts
@@ -167,6 +167,9 @@ export const getMultipleRetrievalConfig = (
}
}
}
+ else {
+ result.reranking_enable = true
+ }
}
if (allHighQuality && !inconsistentEmbeddingModel && allInternal) {
@@ -205,13 +208,6 @@ export const getMultipleRetrievalConfig = (
result.reranking_mode = RerankingModeEnum.WeightedScore
setDefaultWeights()
}
- if (reranking_mode === RerankingModeEnum.RerankingModel && rerankModelIsValid) {
- result.reranking_enable = true
- result.reranking_model = {
- provider: validRerankModel.provider || '',
- model: validRerankModel.model || '',
- }
- }
}
return result