fixed score threshold is none (#8342)

This commit is contained in:
Jyong 2024-09-13 10:21:58 +08:00 committed by GitHub
parent c78828ab7c
commit 49cee773c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -429,7 +429,7 @@ class DatasetRetrieval:
top_k=top_k,
score_threshold=retrieval_model.get("score_threshold", 0.0)
if retrieval_model["score_threshold_enabled"]
else None,
else 0.0,
reranking_model=retrieval_model.get("reranking_model", None)
if retrieval_model["reranking_enable"]
else None,

View File

@ -179,7 +179,7 @@ class DatasetMultiRetrieverTool(DatasetRetrieverBaseTool):
top_k=self.top_k,
score_threshold=retrieval_model.get("score_threshold", 0.0)
if retrieval_model["score_threshold_enabled"]
else None,
else 0.0,
reranking_model=retrieval_model.get("reranking_model", None)
if retrieval_model["reranking_enable"]
else None,

View File

@ -72,7 +72,7 @@ class DatasetRetrieverTool(DatasetRetrieverBaseTool):
top_k=self.top_k,
score_threshold=retrieval_model.get("score_threshold", 0.0)
if retrieval_model["score_threshold_enabled"]
else None,
else 0.0,
reranking_model=retrieval_model.get("reranking_model", None)
if retrieval_model["reranking_enable"]
else None,

View File

@ -42,7 +42,7 @@ class HitTestingService:
top_k=retrieval_model.get("top_k", 2),
score_threshold=retrieval_model.get("score_threshold", 0.0)
if retrieval_model["score_threshold_enabled"]
else None,
else 0.0,
reranking_model=retrieval_model.get("reranking_model", None)
if retrieval_model["reranking_enable"]
else None,