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

pull/14262/head
Fei He 1 year ago committed by Bharat Ramanathan
parent 8c9a4cf102
commit dd492eda5a

@ -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),

Loading…
Cancel
Save