Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Dec 22, 2023
1 parent 72570ed commit 2e690e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions integrations/pinecone/src/pinecone_haystack/document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ def write_documents(self, documents: List[Document], policy: DuplicatePolicy = D
def filter_documents(self, filters: Optional[Dict[str, Any]] = None) -> List[Document]:
if not filters:
# in this case, we try to return all documents but Pinecone has some limits
documents = self._embedding_retrieval(query_embedding=self._dummy_vector, namespace=self.namespace, top_k=TOP_K_LIMIT)
documents = self._embedding_retrieval(
query_embedding=self._dummy_vector, namespace=self.namespace, top_k=TOP_K_LIMIT
)
for doc in documents:
doc.score = None

Expand All @@ -190,7 +192,7 @@ def _embedding_retrieval(
self,
query_embedding: List[float],
*,
namespace: Optional[str]=None,
namespace: Optional[str] = None,
filters: Optional[Dict[str, Any]] = None, # noqa: ARG002 (filters to be implemented)
top_k: int = 10,
) -> List[Document]:
Expand Down

0 comments on commit 2e690e4

Please sign in to comment.