Skip to content

Commit

Permalink
Merge pull request #270 from aurelio-labs/james/add-namespace-to-get-all
Browse files Browse the repository at this point in the history
fix: add namespace to get all for pinecone
  • Loading branch information
jamescalam committed May 9, 2024
2 parents a4404fa + 80bcc4a commit 5d59a8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions semantic_router/index/pinecone.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ def _get_all(self, prefix: Optional[str] = None, include_metadata: bool = False)
# Construct the request URL for listing vectors. Adjust parameters as needed.
list_url = f"https://{self.host}/vectors/list{prefix_str}"
params: Dict = {}
if self.namespace:
params["namespace"] = self.namespace
headers = {"Api-Key": os.environ["PINECONE_API_KEY"]}
metadata = []

Expand Down

0 comments on commit 5d59a8b

Please sign in to comment.