From fef3ae8db9d20b7afea406d76dd59f5c0af07bc5 Mon Sep 17 00:00:00 2001
From: Simonas <20096648+simjak@users.noreply.github.com>
Date: Fri, 23 Feb 2024 14:43:20 +0200
Subject: [PATCH] fix: Address PR comments

---
 pyproject.toml                    | 1 -
 semantic_router/index/pinecone.py | 7 +++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 477f7d45..2b55043e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -53,7 +53,6 @@ pytest-xdist = "^3.5.0"
 mypy = "^1.7.1"
 types-pyyaml = "^6.0.12.12"
 types-requests = "^2.31.0"
-termcolor = "^2.4.0"
 matplot = "^0.1.9"
 
 [build-system]
diff --git a/semantic_router/index/pinecone.py b/semantic_router/index/pinecone.py
index 5913a6ad..886cd806 100644
--- a/semantic_router/index/pinecone.py
+++ b/semantic_router/index/pinecone.py
@@ -50,10 +50,9 @@ class PineconeIndex(BaseIndex):
 
     def __init__(self, **data):
         super().__init__(**data)
-        clean_route = clean_route_name(self.route)
-        # Use SHA-256 for a more secure hash
-        utterance_id = hashlib.sha256(self.utterance.encode()).hexdigest()
-        self.id = f"{clean_route}#{utterance_id}"
+        self._initialize_client()
+        self.type = "pinecone"
+        self.client = self._initialize_client()
 
     def _initialize_client(self, api_key: Optional[str] = None):
         try:
-- 
GitLab