Skip to content

Commit

Permalink
patch bug on TEI embedding lookup (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacker authored Dec 28, 2023
1 parent a3e94ae commit 4fae3e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion memgpt/connectors/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from typing import List, Optional

from llama_index import VectorStoreIndex, ServiceContext, set_global_service_context
from llama_index.indices.query.schema import QueryBundle
from llama_index.indices.empty.base import EmptyIndex
from llama_index.retrievers import VectorIndexRetriever
from llama_index.schema import TextNode
Expand Down Expand Up @@ -117,7 +118,7 @@ def query(self, query: str, query_vec: List[float], top_k: int = 10) -> List[Pas
index=self.index, # does this get refreshed?
similarity_top_k=top_k,
)
nodes = retriever.retrieve(query)
nodes = retriever.retrieve(str_or_query_bundle=QueryBundle(query_str=query, embedding=query_vec))
results = [Passage(embedding=node.embedding, text=node.text) for node in nodes]
return results

Expand Down

0 comments on commit 4fae3e9

Please sign in to comment.