The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
Fixing memory adding errors (#1848)
Pranav Puranik5eeeb4e38cf8
diff --git a/mem0/configs/prompts.py b/mem0/configs/prompts.pyindex d0e07863e..be00856b8 100644--- a/mem0/configs/prompts.py+++ b/mem0/configs/prompts.py@@ -32,16 +32,16 @@ Input: There are branches in trees.Output: {{"facts" : []}}Input: Hi, I am looking for a restaurant in San Francisco.-Output: {{"facts" : ['Looking for a restaurant in San Francisco']}}+Output: {{"facts" : ["Looking for a restaurant in San Francisco"]}}Input: Yesterday, I had a meeting with John at 3pm. We discussed the new project.-Output: {{"facts" : ['Had a meeting with John at 3pm', 'Discussed the new project']}}+Output: {{"facts" : ["Had a meeting with John at 3pm", "Discussed the new project"]}}Input: Hi, my name is John. I am a software engineer.-Output: {{"facts" : ['Name is John', 'Is a Software engineer']}}+Output: {{"facts" : ["Name is John", "Is a Software engineer"]}}Input: Me favourite movies are Inception and Interstellar.-Output: {{"facts" : ['Favourite movies are Inception and Interstellar']}}+Output: {{"facts" : ["Favourite movies are Inception and Interstellar"]}}Return the facts and preferences in a json format as shown above.@@ -82,7 +82,7 @@ def get_update_memory_messages(retrieved_old_memory_dict, response_content):"text" : "User is a software engineer"}}]- - Retrieved facts: ['Name is John']+ - Retrieved facts: ["Name is John"]- New Memory:{{"memory" : [@@ -123,7 +123,7 @@ def get_update_memory_messages(retrieved_old_memory_dict, response_content):"text" : "User likes to play cricket"}}]- - Retrieved facts: ['Loves chicken pizza', 'Loves to play cricket with friends']+ - Retrieved facts: ["Loves chicken pizza", "Loves to play cricket with friends"]- New Memory:{{"memory" : [@@ -161,7 +161,7 @@ def get_update_memory_messages(retrieved_old_memory_dict, response_content):"text" : "Loves cheese pizza"}}]- - Retrieved facts: ['Dislikes cheese pizza']+ - Retrieved facts: ["Dislikes cheese pizza"]- New Memory:{{"memory" : [@@ -191,7 +191,7 @@ def get_update_memory_messages(retrieved_old_memory_dict, response_content):"text" : "Loves cheese pizza"}}]- - Retrieved facts: ['Name is John']+ - Retrieved facts: ["Name is John"]- New Memory:{{"memory" : [