Add Amazon Neptune Analytics graph_store configuration & integration (#2949)
This commit is contained in:
committed by
GitHub
parent
7484eed4b2
commit
05c404d8d3
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user