mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
test: unit test cases for rag.cleaner, rag.data_post_processor and rag.datasource (#32521)
This commit is contained in:
1 parent
36cc1bf025
commit
6f137fdb00
50 files changed
+13766
-47
No files matched your search
@@ -124,13 +124,13 @@ class HuaweiCloudVector(BaseVector):
|
||||
)
|
||||
)
|
||||
|
||||
score_threshold = float(kwargs.get("score_threshold") or 0.0)
|
||||
docs = []
|
||||
for doc, score in docs_and_scores:
|
||||
score_threshold = float(kwargs.get("score_threshold") or 0.0)
|
||||
if score >= score_threshold:
|
||||
if doc.metadata is not None:
|
||||
doc.metadata["score"] = score
|
||||
docs.append(doc)
|
||||
docs.append(doc)
|
||||
|
||||
return docs
|
||||
|
||||
|
||||
Reference in new issue
Block a user