소스 검색

fix: set score_threshold only when score_threshold_enabled is true. (#14221)

Fei He 1 개월 전
부모
커밋
36ae0e5476
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      api/core/app/app_config/easy_ui_based_app/dataset/manager.py

+ 3 - 1
api/core/app/app_config/easy_ui_based_app/dataset/manager.py

@@ -89,7 +89,9 @@ class DatasetConfigManager:
                         dataset_configs["retrieval_model"]
                         dataset_configs["retrieval_model"]
                     ),
                     ),
                     top_k=dataset_configs.get("top_k", 4),
                     top_k=dataset_configs.get("top_k", 4),
-                    score_threshold=dataset_configs.get("score_threshold"),
+                    score_threshold=dataset_configs.get("score_threshold")
+                    if dataset_configs.get("score_threshold_enabled", False)
+                    else None,
                     reranking_model=dataset_configs.get("reranking_model"),
                     reranking_model=dataset_configs.get("reranking_model"),
                     weights=dataset_configs.get("weights"),
                     weights=dataset_configs.get("weights"),
                     reranking_enabled=dataset_configs.get("reranking_enabled", True),
                     reranking_enabled=dataset_configs.get("reranking_enabled", True),