From 684af1c2a5e04738d4099683578b36d1d9e8999e Mon Sep 17 00:00:00 2001 From: Eli Finer Date: Mon, 14 Oct 2024 18:13:16 -0700 Subject: [PATCH] (bug-fix) Fix not adding first node in empty graph DB --- mem0/graphs/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mem0/graphs/utils.py b/mem0/graphs/utils.py index efc14db03d..7d1586e9b8 100644 --- a/mem0/graphs/utils.py +++ b/mem0/graphs/utils.py @@ -55,7 +55,7 @@ def get_update_memory_prompt(existing_memories, memory, template): - return template.format(existing_memories=existing_memories, memory=memory) + return template.format(existing_memories=existing_memories or "None", memory=memory) def get_update_memory_messages(existing_memories, memory):