Skip to content

Commit

Permalink
Removed unused json import to satisfy the linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adversarian committed Dec 23, 2024
1 parent 00df4fd commit c18df36
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mem0/memory/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import json

from mem0.configs.prompts import FACT_RETRIEVAL_PROMPT


Expand All @@ -18,13 +16,14 @@ def parse_messages(messages):
response += f"assistant: {msg['content']}\n"
return response


def format_entities(entities):
if not entities:
return ""

formatted_lines = []
for entity in entities:
simplified = f"{entity['source']} -- {entity['relation'].upper()} -- {entity['destination']}"
formatted_lines.append(simplified)

return "\n".join(formatted_lines)
return "\n".join(formatted_lines)

0 comments on commit c18df36

Please sign in to comment.