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.

Handle telementry exception (#1698)

Dev Khant2180b83a8b11
diff --git a/mem0/memory/setup.py b/mem0/memory/setup.py
index 85ca65e67..ed54ae179 100644
--- a/mem0/memory/setup.py
+++ b/mem0/memory/setup.py
@@ -19,10 +19,13 @@ def setup_config():
def get_user_id():
config_path = os.path.join(mem0_dir, "config.json")
- if os.path.exists(config_path):
+ if not os.path.exists(config_path):
+ return "anonymous_user"
+
+ try:
with open(config_path, "r") as config_file:
config = json.load(config_file)
user_id = config.get("user_id")
return user_id
- else:
+ except:
return "anonymous_user"
diff --git a/pyproject.toml b/pyproject.toml
index 45d67c38f..38e46bcea 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mem0ai"
-version = "0.0.17"
+version = "0.0.18"
description = "Long-term memory for AI Agents"
authors = ["Mem0 <[email protected]>"]
exclude = [