mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 21:39:05 +08:00
fix Weight rerank mode info missed when create dataset (#16190)
This commit is contained in:
parent
41dff175b3
commit
e7572066a4
@ -84,6 +84,22 @@ class RerankingModel(BaseModel):
|
|||||||
reranking_model_name: Optional[str] = None
|
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):
|
class RetrievalModel(BaseModel):
|
||||||
search_method: Literal["hybrid_search", "semantic_search", "full_text_search"]
|
search_method: Literal["hybrid_search", "semantic_search", "full_text_search"]
|
||||||
reranking_enable: bool
|
reranking_enable: bool
|
||||||
@ -92,6 +108,7 @@ class RetrievalModel(BaseModel):
|
|||||||
top_k: int
|
top_k: int
|
||||||
score_threshold_enabled: bool
|
score_threshold_enabled: bool
|
||||||
score_threshold: Optional[float] = None
|
score_threshold: Optional[float] = None
|
||||||
|
weights: Optional[WeightModel] = None
|
||||||
|
|
||||||
|
|
||||||
class MetaDataConfig(BaseModel):
|
class MetaDataConfig(BaseModel):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user