fix(retrieval): normalize vector result IDs
This commit is contained in:
1 parent
9bc3f253c1
commit
29c0e98272
2 files changed
+20
-1
No files matched your search
@@ -497,7 +497,7 @@ class Index:
|
||||
vectors = np.frombuffer(b"".join(row[1] for row in rows), dtype=np.float32).reshape(-1, EMBEDDING_DIMENSIONS)
|
||||
index.add([row[0] for row in rows], vectors)
|
||||
self.vector_index = index
|
||||
return [match.key for match in self.vector_index.search(vector, DENSE_CANDIDATES)]
|
||||
return [int(match.key) for match in self.vector_index.search(vector, DENSE_CANDIDATES)]
|
||||
|
||||
def cache_key(self, query: str, top_k: int):
|
||||
identity = json.dumps([
|
||||
|
||||
Reference in new issue
Block a user