When following the official documentation, the following error will be reported.memgraph
🐛 Describe the bug
(mem0) C:\Users\lanwuding\Desktop\mem0_study>python mem.py
Traceback (most recent call last):
File "C:\Users\lanwuding\Desktop\mem0_study\mem.py", line 84, in
I can't understand the issue without the code. Can you post the code? (feel free to copy my code)
What he means is that the AsyncMemory is missing the MemGraph implementation
AsyncMemory only uses mem0.memory.graph_memory
if self.config.graph_store.config:
from mem0.memory.graph_memory import MemoryGraph
self.graph = MemoryGraph(self.config)
self.enable_graph = True
compare to normal Memory which does
if self.config.graph_store.config:
if self.config.graph_store.provider == "memgraph":
from mem0.memory.memgraph_memory import MemoryGraph
else:
from mem0.memory.graph_memory import MemoryGraph
self.graph = MemoryGraph(self.config)
self.enable_graph = True
else:
That leads to AsyncMemory default to neo4j which then crashes because neo4j expects a "database" property.
Also the memgraph implementation is completely broken anyway because from langchain_memgraph import Memgraph does not work. langchain_memgraph doesn't expose a Memgraph object, and this project's pyproject.toml doesn't define a dependency on it to at least revert it to a working langchain_memgraph version.
https://python.langchain.com/docs/integrations/graphs/memgraph/
It needs to be from langchain_memgraph.graphs.memgraph import Memgraph
If it's ok I can do a PR because we fixed all of this already for use in our agent framework
I am guessing this was not PR, as I just experienced the exact thing. @AndreRatzenberger Thanks for posting this.
Closing as this issues is fixed with the latest release.