Handle telementry exception (#1698)

This commit is contained in:
Dev Khant
2024-08-13 23:12:51 +05:30
committed by GitHub
parent f19dfe70d7
commit 2180b83a8b
2 changed files with 6 additions and 3 deletions

View File

@@ -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"

View File

@@ -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 <founders@mem0.ai>"]
exclude = [