fix: reranking

This commit is contained in:
Timothy Jaeryang Baek 2025-08-22 16:47:05 +04:00
parent 4ec70e3d46
commit fbff4e19de

View file

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