mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-16 06:16:53 +08:00
fix nltk averaged_perceptron_tagger download and fix score limit is none (#7582)
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
This commit is contained in:
@@ -616,6 +616,7 @@ class DatasetRetrieval:
|
||||
for document in all_documents:
|
||||
if score_threshold is None or document.metadata['score'] >= score_threshold:
|
||||
filter_documents.append(document)
|
||||
|
||||
if not filter_documents:
|
||||
return []
|
||||
filter_documents = sorted(filter_documents, key=lambda x: x.metadata['score'], reverse=True)
|
||||
|
||||
Reference in New Issue
Block a user