Skip to content
Snippets Groups Projects
Commit fef3ae8d authored by Simonas's avatar Simonas
Browse files

fix: Address PR comments

parent ff2ed5f9
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,6 @@ pytest-xdist = "^3.5.0" ...@@ -53,7 +53,6 @@ pytest-xdist = "^3.5.0"
mypy = "^1.7.1" mypy = "^1.7.1"
types-pyyaml = "^6.0.12.12" types-pyyaml = "^6.0.12.12"
types-requests = "^2.31.0" types-requests = "^2.31.0"
termcolor = "^2.4.0"
matplot = "^0.1.9" matplot = "^0.1.9"
[build-system] [build-system]
......
...@@ -50,10 +50,9 @@ class PineconeIndex(BaseIndex): ...@@ -50,10 +50,9 @@ class PineconeIndex(BaseIndex):
def __init__(self, **data): def __init__(self, **data):
super().__init__(**data) super().__init__(**data)
clean_route = clean_route_name(self.route) self._initialize_client()
# Use SHA-256 for a more secure hash self.type = "pinecone"
utterance_id = hashlib.sha256(self.utterance.encode()).hexdigest() self.client = self._initialize_client()
self.id = f"{clean_route}#{utterance_id}"
def _initialize_client(self, api_key: Optional[str] = None): def _initialize_client(self, api_key: Optional[str] = None):
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment