浏览代码

Fixes #20748 KnowledgeRetrievalNode return all external documents when reranker disabled even top-k configed (#20762)

tags/1.5.0
Rain Wang 4 个月前
父节点
当前提交
47e0f92c0f
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      api/core/rag/retrieval/dataset_retrieval.py

+ 2
- 0
api/core/rag/retrieval/dataset_retrieval.py 查看文件

all_documents = self.calculate_keyword_score(query, all_documents, top_k) all_documents = self.calculate_keyword_score(query, all_documents, top_k)
elif index_type == "high_quality": elif index_type == "high_quality":
all_documents = self.calculate_vector_score(all_documents, top_k, score_threshold) all_documents = self.calculate_vector_score(all_documents, top_k, score_threshold)
else:
all_documents = all_documents[:top_k] if top_k else all_documents


self._on_query(query, dataset_ids, app_id, user_from, user_id) self._on_query(query, dataset_ids, app_id, user_from, user_id)



正在加载...
取消
保存