fix Weight rerank mode info missed when create dataset (#16190)

This commit is contained in:
Jyong 2025-03-19 15:10:00 +08:00 committed by GitHub
parent 41dff175b3
commit e7572066a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,6 +84,22 @@ class RerankingModel(BaseModel):
reranking_model_name: Optional[str] = None
class WeightVectorSetting(BaseModel):
vector_weight: float
embedding_provider_name: str
embedding_model_name: str
class WeightKeywordSetting(BaseModel):
keyword_weight: float
class WeightModel(BaseModel):
weight_type: str
vector_setting: Optional[WeightVectorSetting] = None
keyword_setting: Optional[WeightKeywordSetting] = None
class RetrievalModel(BaseModel):
search_method: Literal["hybrid_search", "semantic_search", "full_text_search"]
reranking_enable: bool
@ -92,6 +108,7 @@ class RetrievalModel(BaseModel):
top_k: int
score_threshold_enabled: bool
score_threshold: Optional[float] = None
weights: Optional[WeightModel] = None
class MetaDataConfig(BaseModel):