Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Change ping endpoint for validating api key (#1956)

Deshraj Yadavb59fbb0bd2fc
diff --git a/mem0/client/main.py b/mem0/client/main.py
index 2e79eef2a..2de59cc2a 100644
--- a/mem0/client/main.py
+++ b/mem0/client/main.py
@@ -94,7 +94,7 @@ class MemoryClient:
def _validate_api_key(self):
"""Validate the API key by making a test request."""
try:
- response = self.client.get("/v1/memories/", params={"user_id": "test"})
+ response = self.client.get("/v1/ping/")
response.raise_for_status()
except httpx.HTTPStatusError:
raise ValueError("Invalid API Key. Please get a valid API Key from https://app.mem0.ai")