From 148607967827625001d2a62b54674e33bcead436 Mon Sep 17 00:00:00 2001 From: Vits-99 Date: Tue, 17 Dec 2024 15:27:24 +0100 Subject: [PATCH 1/2] Fixed namespace missing in _async_fetch_metadata inside Pinecone --- semantic_router/index/pinecone.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/semantic_router/index/pinecone.py b/semantic_router/index/pinecone.py index 469a4141..dd0ac671 100644 --- a/semantic_router/index/pinecone.py +++ b/semantic_router/index/pinecone.py @@ -653,6 +653,9 @@ async def _async_fetch_metadata(self, vector_id: str) -> dict: "ids": [vector_id], } + if self.namespace: + params["namespace"] = self.namespace + headers = { "Api-Key": self.api_key, } From 6320f6ddfbc4f8a0af54790e96ad6730224b5a0c Mon Sep 17 00:00:00 2001 From: Vits-99 Date: Tue, 17 Dec 2024 15:59:53 +0100 Subject: [PATCH 2/2] Linting --- semantic_router/index/pinecone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic_router/index/pinecone.py b/semantic_router/index/pinecone.py index dd0ac671..60ada2e3 100644 --- a/semantic_router/index/pinecone.py +++ b/semantic_router/index/pinecone.py @@ -654,7 +654,7 @@ async def _async_fetch_metadata(self, vector_id: str) -> dict: } if self.namespace: - params["namespace"] = self.namespace + params["namespace"] = [self.namespace] headers = { "Api-Key": self.api_key,