Skip to content

Commit

Permalink
Remove redudant code from graph_memory.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Wang Xiang authored and GingerMoon committed Oct 31, 2024
1 parent dca74a1 commit af780de
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mem0/memory/graph_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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}")

Expand Down

0 comments on commit af780de

Please sign in to comment.