Skip to content

Commit

Permalink
fix: Fix rerank model switching issue (#12721)
Browse files Browse the repository at this point in the history
ok
  • Loading branch information
WTW0313 authored Jan 14, 2025
1 parent 0800021 commit bc3a570
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions web/app/components/workflow/nodes/knowledge-retrieval/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ export const getMultipleRetrievalConfig = (
}
}
}
else {
result.reranking_enable = true
}
}

if (allHighQuality && !inconsistentEmbeddingModel && allInternal) {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bc3a570

Please sign in to comment.