feat: n to 1 retrieval legacy (#6554)
This commit is contained in:
@@ -449,3 +449,46 @@ export type ErrorDocsResponse = {
|
||||
data: IndexingStatusResponse[]
|
||||
total: number
|
||||
}
|
||||
|
||||
export type SelectedDatasetsMode = {
|
||||
allHighQuality: boolean
|
||||
allHighQualityVectorSearch: boolean
|
||||
allHighQualityFullTextSearch: boolean
|
||||
allEconomic: boolean
|
||||
mixtureHighQualityAndEconomic: boolean
|
||||
inconsistentEmbeddingModel: boolean
|
||||
}
|
||||
|
||||
export enum WeightedScoreEnum {
|
||||
SemanticFirst = 'semantic_first',
|
||||
KeywordFirst = 'keyword_first',
|
||||
Customized = 'customized',
|
||||
}
|
||||
|
||||
export enum RerankingModeEnum {
|
||||
RerankingModel = 'reranking_model',
|
||||
WeightedScore = 'weighted_score',
|
||||
}
|
||||
|
||||
export const DEFAULT_WEIGHTED_SCORE = {
|
||||
allHighQualityVectorSearch: {
|
||||
semantic: 1.0,
|
||||
keyword: 0,
|
||||
},
|
||||
allHighQualityFullTextSearch: {
|
||||
semantic: 0,
|
||||
keyword: 1.0,
|
||||
},
|
||||
semanticFirst: {
|
||||
semantic: 0.7,
|
||||
keyword: 0.3,
|
||||
},
|
||||
keywordFirst: {
|
||||
semantic: 0.3,
|
||||
keyword: 0.7,
|
||||
},
|
||||
other: {
|
||||
semantic: 0.7,
|
||||
keyword: 0.3,
|
||||
},
|
||||
}
|
||||
|
@@ -1,4 +1,8 @@
|
||||
import type { AgentStrategy, ModelModeType, RETRIEVE_TYPE, ToolItem, TtsAutoPlay } from '@/types/app'
|
||||
import type {
|
||||
RerankingModeEnum,
|
||||
WeightedScoreEnum,
|
||||
} from '@/models/datasets'
|
||||
export type Inputs = Record<string, string | number | object>
|
||||
|
||||
export enum PromptMode {
|
||||
@@ -144,13 +148,26 @@ export type DatasetConfigs = {
|
||||
}
|
||||
top_k: number
|
||||
score_threshold_enabled: boolean
|
||||
score_threshold?: number | null
|
||||
score_threshold: number | null | undefined
|
||||
datasets: {
|
||||
datasets: {
|
||||
enabled: boolean
|
||||
id: string
|
||||
}[]
|
||||
}
|
||||
reranking_mode?: RerankingModeEnum
|
||||
weights?: {
|
||||
weight_type: WeightedScoreEnum
|
||||
vector_setting: {
|
||||
vector_weight: number
|
||||
embedding_provider_name: string
|
||||
embedding_model_name: string
|
||||
}
|
||||
keyword_setting: {
|
||||
keyword_weight: number
|
||||
}
|
||||
}
|
||||
reranking_enable?: boolean
|
||||
}
|
||||
|
||||
export type DebugRequestBody = {
|
||||
|
Reference in New Issue
Block a user