Skip to content

Commit 1ba0023

Browse files
committed
fix(cli): explicitly convert query and chunks to str. Fix #52
1 parent 7b82531 commit 1ba0023

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/vectorcode/subcommands/query/reranker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ def rerank(self, results: QueryResult) -> list[str]:
7171
chunk_metas = results["metadatas"][query_chunk_idx]
7272
chunk_docs = results["documents"][query_chunk_idx]
7373
ranks = self.model.rank(
74-
self.query_chunks[query_chunk_idx], chunk_docs, apply_softmax=True
74+
str(self.query_chunks[query_chunk_idx]),
75+
list(str(i) for i in chunk_docs),
76+
apply_softmax=True,
7577
)
7678
for rank in ranks:
7779
if QueryInclude.chunk in self.configs.include:

0 commit comments

Comments
 (0)