Skip to content

Commit

Permalink
fix: rerank switch (#11897)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh authored Dec 20, 2024
1 parent 4211b9a commit ef7e47d
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -198,7 +195,6 @@ export const getMultipleRetrievalConfig = (
setDefaultWeights()
}
}

if (reranking_mode === RerankingModeEnum.RerankingModel && !rerankModelIsValid && shouldSetWeightDefaultValue) {
result.reranking_mode = RerankingModeEnum.WeightedScore
setDefaultWeights()
Expand Down

0 comments on commit ef7e47d

Please sign in to comment.