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
Fix: Memgraph Graph Generation Issue (#3109)
Akshat Jain4491e7f9f493
diff --git a/mem0/llms/openai.py b/mem0/llms/openai.pyindex 8f3cf807a..d94a0f3af 100644--- a/mem0/llms/openai.py+++ b/mem0/llms/openai.py@@ -79,7 +79,7 @@ class OpenAILLM(LLMBase):tool_choice: str = "auto",):"""- Generate a response based on the given messages using OpenAI.+ Generate a JSON response based on the given messages using OpenAI.Args:messages (list): List of message dicts containing 'role' and 'content'.@@ -88,7 +88,7 @@ class OpenAILLM(LLMBase):tool_choice (str, optional): Tool choice method. Defaults to "auto".Returns:- str: The generated response.+ json: The generated response."""params = {"model": self.config.model,diff --git a/mem0/memory/memgraph_memory.py b/mem0/memory/memgraph_memory.pyindex beb8af2ba..97af282cf 100644--- a/mem0/memory/memgraph_memory.py+++ b/mem0/memory/memgraph_memory.py@@ -3,7 +3,7 @@ import loggingfrom mem0.memory.utils import format_entitiestry:- from langchain_memgraph import Memgraph+ from langchain_memgraph.graphs.memgraph import Memgraphexcept ImportError:raise ImportError("langchain_memgraph is not installed. Please install it using pip install langchain-memgraph")@@ -76,8 +76,8 @@ class MemoryGraph:# TODO: Batch queries with APOC plugin# TODO: Add more filter support- deleted_entities = self._delete_entities(to_be_deleted, filters["user_id"])- added_entities = self._add_entities(to_be_added, filters["user_id"], entity_type_map)+ deleted_entities = self._delete_entities(to_be_deleted, filters)+ added_entities = self._add_entities(to_be_added, filters, entity_type_map)return {"deleted_entities": deleted_entities, "added_entities": added_entities}