feat: n to 1 retrieval legacy (#6554)

This commit is contained in:
zxhlyh 2024-07-24 12:50:48 +08:00 • committed by GitHub
commit 6fe9aa69cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 1329 additions and 249 deletions

View file

@ -3,6 +3,7 @@ import type {
DefaultModelResponse,
Model,
} from '@/app/components/header/account-setting/model-provider-page/declarations'
import { RerankingModeEnum } from '@/models/datasets'
export const isReRankModelSelected = ({
rerankDefaultModel,
@ -32,7 +33,7 @@ export const isReRankModelSelected = ({
if (
indexMethod === 'high_quality'
&& (retrievalConfig.reranking_enable || retrievalConfig.search_method === RETRIEVE_METHOD.hybrid)
&& (retrievalConfig.search_method === RETRIEVE_METHOD.hybrid && retrievalConfig.reranking_mode !== RerankingModeEnum.WeightedScore)
&& !rerankModelSelected
)
return false