mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 19:06:51 +08:00
Feat/add retriever rerank (#1560)
Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
@@ -160,7 +160,13 @@ class AppModelConfig(db.Model):
|
||||
|
||||
@property
|
||||
def dataset_configs_dict(self) -> dict:
|
||||
return json.loads(self.dataset_configs) if self.dataset_configs else {"top_k": 2, "score_threshold": {"enable": False}}
|
||||
if self.dataset_configs:
|
||||
dataset_configs = json.loads(self.dataset_configs)
|
||||
if 'retrieval_model' not in dataset_configs:
|
||||
return {'retrieval_model': 'single'}
|
||||
else:
|
||||
return dataset_configs
|
||||
return {'retrieval_model': 'single'}
|
||||
|
||||
@property
|
||||
def file_upload_dict(self) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user