Add Amazon Neptune Analytics graph_store configuration & integration (#2949)

This commit is contained in:
Andrew Carbonetto
2025-07-04 16:26:21 -07:00
committed by GitHub
parent 7484eed4b2
commit 05c404d8d3
12 changed files with 1823 additions and 5 deletions

View File

@@ -621,3 +621,12 @@ class MemoryGraph:
result = self.graph.query(cypher, params=params)
return result
# Reset is not defined in base.py
def reset(self):
"""Reset the graph by clearing all nodes and relationships."""
logger.warning("Clearing graph...")
cypher_query = """
MATCH (n) DETACH DELETE n
"""
return self.graph.query(cypher_query)

View File

@@ -138,6 +138,8 @@ class Memory(MemoryBase):
if self.config.graph_store.config:
if self.config.graph_store.provider == "memgraph":
from mem0.memory.memgraph_memory import MemoryGraph
elif self.config.graph_store.provider == "neptune":
from mem0.graphs.neptune.main import MemoryGraph
else:
from mem0.memory.graph_memory import MemoryGraph