Update validate_api_key (#2089)
This commit is contained in:
@@ -103,7 +103,8 @@ class MemoryClient:
|
|||||||
def _validate_api_key(self):
|
def _validate_api_key(self):
|
||||||
"""Validate the API key by making a test request."""
|
"""Validate the API key by making a test request."""
|
||||||
try:
|
try:
|
||||||
response = self.client.get("/v1/ping/")
|
params = self._prepare_params()
|
||||||
|
response = self.client.get("/v1/ping/", params=params)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except httpx.HTTPStatusError:
|
except httpx.HTTPStatusError:
|
||||||
raise ValueError("Invalid API Key. Please get a valid API Key from https://app.mem0.ai")
|
raise ValueError("Invalid API Key. Please get a valid API Key from https://app.mem0.ai")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "mem0ai"
|
name = "mem0ai"
|
||||||
version = "0.1.34"
|
version = "0.1.35"
|
||||||
description = "Long-term memory for AI Agents"
|
description = "Long-term memory for AI Agents"
|
||||||
authors = ["Mem0 <founders@mem0.ai>"]
|
authors = ["Mem0 <founders@mem0.ai>"]
|
||||||
exclude = [
|
exclude = [
|
||||||
|
|||||||
Reference in New Issue
Block a user