fix: rerank switch (#11897)

This commit is contained in:
zxhlyh 2024-12-20 16:12:34 +08:00 committed by GitHub
parent 4211b9abbd
commit ef7e47d162
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()