From fbff4e19de591a440fcc5716e6796a6ed2d512b7 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 22 Aug 2025 16:47:05 +0400 Subject: [PATCH] fix: reranking --- backend/open_webui/retrieval/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index aeaa741c94..862972187d 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -966,7 +966,7 @@ class RerankCompressor(BaseDocumentCompressor): ) scores = util.cos_sim(query_embedding, document_embedding)[0] - if scores: + if scores is not None: docs_with_scores = list( zip( documents,