mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
fix: reranking
This commit is contained in:
@@ -966,7 +966,7 @@ class RerankCompressor(BaseDocumentCompressor):
|
|||||||
)
|
)
|
||||||
scores = util.cos_sim(query_embedding, document_embedding)[0]
|
scores = util.cos_sim(query_embedding, document_embedding)[0]
|
||||||
|
|
||||||
if scores:
|
if scores is not None:
|
||||||
docs_with_scores = list(
|
docs_with_scores = list(
|
||||||
zip(
|
zip(
|
||||||
documents,
|
documents,
|
||||||
|
|||||||
Reference in New Issue
Block a user