fix: reranking
This commit is contained in:
1 parent
4ec70e3d46
commit
fbff4e19de
1 file changed
+1
-1
@@ -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