mem0ai / mem0

The Memory layer for your AI apps
https://mem0.ai
Apache License 2.0
22.95k stars 2.11k forks source link

Didn't add memory to graph #1879

Open galshubeli opened 2 months ago

galshubeli commented 2 months ago

🐛 Describe the bug

When the graph database is empty, the prompt uses '- Existing Graph Memories: []', which results in empty new graph memories. Change it to '- Existing Graph Memories: None' to fix the issue.

prateekchhikara commented 1 month ago

@galshubeli can you elaborate it a little more?

galshubeli commented 1 month ago

I noticed that when the graph is empty, the LLM doesn't extract new memory with the current prompt. However, when I used None instead of [], it successfully updated the memory.

File: mem0/mem0/graphs /utils.py

line: 58

object: "EXTRACT_ENTITIES_PROMPT"