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.

Renamed unknown node type (#2649)

Prateek Chhikara0e7c34f5416c
diff --git a/mem0/memory/graph_memory.py b/mem0/memory/graph_memory.py
index 760d864a7..685862a17 100644
--- a/mem0/memory/graph_memory.py
+++ b/mem0/memory/graph_memory.py
@@ -327,8 +327,8 @@ class MemoryGraph:
relationship = item["relationship"]
# types
- source_type = entity_type_map.get(source, "unknown")
- destination_type = entity_type_map.get(destination, "unknown")
+ source_type = entity_type_map.get(source, "__User__")
+ destination_type = entity_type_map.get(destination, "__User__")
# embeddings
source_embedding = self.embedding_model.embed(source)
diff --git a/mem0/memory/memgraph_memory.py b/mem0/memory/memgraph_memory.py
index 3ebc42549..8071c1c04 100644
--- a/mem0/memory/memgraph_memory.py
+++ b/mem0/memory/memgraph_memory.py
@@ -369,8 +369,8 @@ class MemoryGraph:
relationship = item["relationship"]
# types
- source_type = entity_type_map.get(source, "unknown")
- destination_type = entity_type_map.get(destination, "unknown")
+ source_type = entity_type_map.get(source, "__User__")
+ destination_type = entity_type_map.get(destination, "__User__")
# embeddings
source_embedding = self.embedding_model.embed(source)