mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix reranking model field error (#6654)
This commit is contained in:
parent
4ec9a87e46
commit
91fd8521c3
|
@ -46,8 +46,8 @@ class MultipleRetrievalConfig(BaseModel):
|
|||
score_threshold: Optional[float] = None
|
||||
reranking_mode: str = 'reranking_model'
|
||||
reranking_enable: bool = True
|
||||
reranking_model: RerankingModelConfig
|
||||
weights: WeightedScoreConfig
|
||||
reranking_model: Optional[RerankingModelConfig] = None
|
||||
weights: Optional[WeightedScoreConfig] = None
|
||||
|
||||
|
||||
class ModelConfig(BaseModel):
|
||||
|
|
|
@ -140,8 +140,8 @@ class KnowledgeRetrievalNode(BaseNode):
|
|||
elif node_data.retrieval_mode == DatasetRetrieveConfigEntity.RetrieveStrategy.MULTIPLE.value:
|
||||
if node_data.multiple_retrieval_config.reranking_mode == 'reranking_model':
|
||||
reranking_model = {
|
||||
'reranking_provider_name': node_data.multiple_retrieval_config.reranking_model['provider'],
|
||||
'reranking_model_name': node_data.multiple_retrieval_config.reranking_model['name']
|
||||
'reranking_provider_name': node_data.multiple_retrieval_config.reranking_model.provider,
|
||||
'reranking_model_name': node_data.multiple_retrieval_config.reranking_model.model
|
||||
}
|
||||
weights = None
|
||||
elif node_data.multiple_retrieval_config.reranking_mode == 'weighted_score':
|
||||
|
|
Loading…
Reference in New Issue
Block a user