Update validate_api_key (#2089)

This commit is contained in:
Dev Khant
2024-12-15 11:34:12 +05:30
committed by GitHub
parent 763f804277
commit 4d08c16bd8
2 changed files with 3 additions and 2 deletions

View File

@@ -103,7 +103,8 @@ class MemoryClient:
def _validate_api_key(self):
"""Validate the API key by making a test request."""
try:
response = self.client.get("/v1/ping/")
params = self._prepare_params()
response = self.client.get("/v1/ping/", params=params)
response.raise_for_status()
except httpx.HTTPStatusError:
raise ValueError("Invalid API Key. Please get a valid API Key from https://app.mem0.ai")

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "mem0ai"
version = "0.1.34"
version = "0.1.35"
description = "Long-term memory for AI Agents"
authors = ["Mem0 <founders@mem0.ai>"]
exclude = [