Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed Feb 21, 2024
1 parent b80c4f8 commit ba06c2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def run(
top_k = top_k or self.top_k

docs = self.document_store.embedding_retrieval(
query_embedding=query_embedding,
query_embedding_np=query_embedding,
filters=filters,
top_k=top_k,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ def embedding_retrieval(
msg = "Query embedding must not be empty"
raise ValueError(msg)

query_embedding = np.array(query_embedding).astype(np.float32)
query_embedding_np = np.array(query_embedding).astype(np.float32)

filters = haystack_filters_to_mongo(filters)
pipeline = [
{
"$vectorSearch": {
"index": self.vector_search_index,
"path": "embedding",
"queryVector": query_embedding.tolist(),
"queryVector": query_embedding_np.tolist(),
"numCandidates": 100,
"limit": top_k,
# "filter": filters,
Expand Down

0 comments on commit ba06c2a

Please sign in to comment.