Handle telementry exception (#1698)
This commit is contained in:
@@ -19,10 +19,13 @@ def setup_config():
|
|||||||
|
|
||||||
def get_user_id():
|
def get_user_id():
|
||||||
config_path = os.path.join(mem0_dir, "config.json")
|
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:
|
with open(config_path, "r") as config_file:
|
||||||
config = json.load(config_file)
|
config = json.load(config_file)
|
||||||
user_id = config.get("user_id")
|
user_id = config.get("user_id")
|
||||||
return user_id
|
return user_id
|
||||||
else:
|
except:
|
||||||
return "anonymous_user"
|
return "anonymous_user"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "mem0ai"
|
name = "mem0ai"
|
||||||
version = "0.0.17"
|
version = "0.0.18"
|
||||||
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