mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
fixed score threshold is none (#8342)
This commit is contained in:
parent
c78828ab7c
commit
49cee773c5
|
@ -429,7 +429,7 @@ class DatasetRetrieval:
|
||||||
top_k=top_k,
|
top_k=top_k,
|
||||||
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
||||||
if retrieval_model["score_threshold_enabled"]
|
if retrieval_model["score_threshold_enabled"]
|
||||||
else None,
|
else 0.0,
|
||||||
reranking_model=retrieval_model.get("reranking_model", None)
|
reranking_model=retrieval_model.get("reranking_model", None)
|
||||||
if retrieval_model["reranking_enable"]
|
if retrieval_model["reranking_enable"]
|
||||||
else None,
|
else None,
|
||||||
|
|
|
@ -179,7 +179,7 @@ class DatasetMultiRetrieverTool(DatasetRetrieverBaseTool):
|
||||||
top_k=self.top_k,
|
top_k=self.top_k,
|
||||||
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
||||||
if retrieval_model["score_threshold_enabled"]
|
if retrieval_model["score_threshold_enabled"]
|
||||||
else None,
|
else 0.0,
|
||||||
reranking_model=retrieval_model.get("reranking_model", None)
|
reranking_model=retrieval_model.get("reranking_model", None)
|
||||||
if retrieval_model["reranking_enable"]
|
if retrieval_model["reranking_enable"]
|
||||||
else None,
|
else None,
|
||||||
|
|
|
@ -72,7 +72,7 @@ class DatasetRetrieverTool(DatasetRetrieverBaseTool):
|
||||||
top_k=self.top_k,
|
top_k=self.top_k,
|
||||||
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
||||||
if retrieval_model["score_threshold_enabled"]
|
if retrieval_model["score_threshold_enabled"]
|
||||||
else None,
|
else 0.0,
|
||||||
reranking_model=retrieval_model.get("reranking_model", None)
|
reranking_model=retrieval_model.get("reranking_model", None)
|
||||||
if retrieval_model["reranking_enable"]
|
if retrieval_model["reranking_enable"]
|
||||||
else None,
|
else None,
|
||||||
|
|
|
@ -42,7 +42,7 @@ class HitTestingService:
|
||||||
top_k=retrieval_model.get("top_k", 2),
|
top_k=retrieval_model.get("top_k", 2),
|
||||||
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
score_threshold=retrieval_model.get("score_threshold", 0.0)
|
||||||
if retrieval_model["score_threshold_enabled"]
|
if retrieval_model["score_threshold_enabled"]
|
||||||
else None,
|
else 0.0,
|
||||||
reranking_model=retrieval_model.get("reranking_model", None)
|
reranking_model=retrieval_model.get("reranking_model", None)
|
||||||
if retrieval_model["reranking_enable"]
|
if retrieval_model["reranking_enable"]
|
||||||
else None,
|
else None,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user