From af780de27296b226e39c8774681eaa032e38b3ca Mon Sep 17 00:00:00 2001 From: Wang Xiang Date: Thu, 31 Oct 2024 16:55:10 +0800 Subject: [PATCH] Remove redudant code from graph_memory.py --- mem0/memory/graph_memory.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mem0/memory/graph_memory.py b/mem0/memory/graph_memory.py index 09ad55cfe9..55d644c901 100644 --- a/mem0/memory/graph_memory.py +++ b/mem0/memory/graph_memory.py @@ -183,7 +183,6 @@ def _search(self, query, filters, limit=100): ) node_list = [] - relation_list = [] for item in search_results["tool_calls"]: if item["name"] == "search": @@ -193,10 +192,7 @@ def _search(self, query, filters, limit=100): logger.error(f"Error in search tool: {e}") node_list = list(set(node_list)) - relation_list = list(set(relation_list)) - node_list = [node.lower().replace(" ", "_") for node in node_list] - relation_list = [relation.lower().replace(" ", "_") for relation in relation_list] logger.debug(f"Node list for search query : {node_list}")