remove redudant code from graph_memory.py (#1999)

Co-authored-by: Wang Xiang <wangxiang1@ztgame.com>
This commit is contained in:
Xiang Wang
2024-11-01 07:00:55 +08:00
committed by GitHub
parent d928ea4a2b
commit cf12148bc7

View File

@@ -183,7 +183,6 @@ class MemoryGraph:
)
node_list = []
relation_list = []
for item in search_results["tool_calls"]:
if item["name"] == "search":
@@ -193,10 +192,7 @@ class MemoryGraph:
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}")