Change ping endpoint for validating api key (#1956)
This commit is contained in:
@@ -94,7 +94,7 @@ 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/memories/", params={"user_id": "test"})
|
response = self.client.get("/v1/ping/")
|
||||||
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")
|
||||||
|
|||||||
Reference in New Issue
Block a user