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.

feat: session id for telemetry (#440)

cachho66b661660bae
diff --git a/embedchain/embedchain.py b/embedchain/embedchain.py
index a59cbee04..b023cd12b 100644
--- a/embedchain/embedchain.py
+++ b/embedchain/embedchain.py
@@ -3,6 +3,7 @@ import logging
import os
import threading
from typing import Optional
+import uuid
import requests
from dotenv import load_dotenv
@@ -42,6 +43,7 @@ class EmbedChain:
self.online = False
# Send anonymous telemetry
+ self.s_id = self.config.id if self.config.id else str(uuid.uuid4())
thread_telemetry = threading.Thread(target=self._send_telemetry_event, args=("init",))
thread_telemetry.start()
@@ -380,7 +382,7 @@ class EmbedChain:
with threading.Lock():
url = "https://api.embedchain.ai/api/v1/telemetry/"
metadata = {
- "app_id": self.config.id,
+ "s_id": self.s_id,
"version": importlib.metadata.version(__package__ or __name__),
"method": method,
"language": "py",