feat: integrate govdoc platform updates
This commit is contained in:
@@ -1186,7 +1186,7 @@ class RagDatasetServiceImpl(IRagDatasetService):
|
||||
content = documents[index] if index < len(documents) else ""
|
||||
metadata = metadatas[index] if index < len(metadatas) and isinstance(metadatas[index], dict) else {}
|
||||
distance = float(distances[index]) if index < len(distances) and distances[index] is not None else 1.0
|
||||
score = max(0.0, min(1.0, 1.0 - distance))
|
||||
score = max(0.0, min(1.0, 1.0 / (1.0 + max(0.0, distance))))
|
||||
if score_threshold_enabled and score_threshold is not None and score < score_threshold:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user