Timothy Jaeryang Baek пре 1 месец
родитељ
комит
fbff4e19de
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      backend/open_webui/retrieval/utils.py

+ 1 - 1
backend/open_webui/retrieval/utils.py

@@ -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,