Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/memos/graph_dbs/neo4j.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ def get_node(self, id: str, include_embedding: bool = True) -> dict[str, Any] |
Returns:
Dictionary of node fields, or None if not found.
"""
logger.warning(
"[Neo4jGraphDB.get_node] `include_embedding=False` is not supported in Neo4j. Ignoring this flag."
)

where_user = ""
params = {"id": id}
Expand All @@ -361,9 +358,6 @@ def get_nodes(self, ids: list[str], include_embedding: bool = True) -> list[dict
- Assumes all provided IDs are valid and exist.
- Returns empty list if input is empty.
"""
logger.warning(
"[Neo4jGraphDB.get_node] `include_embedding=False` is not supported in Neo4j. Ignoring this flag."
)

if not ids:
return []
Expand Down Expand Up @@ -849,9 +843,6 @@ def export_graph(self, include_embedding: bool = True) -> dict[str, Any]:
"edges": [ { "source": ..., "target": ..., "type": ... }, ... ]
}
"""
logger.warning(
"[Neo4jGraphDB.get_node] `include_embedding=False` is not supported in Neo4j. Ignoring this flag."
)
with self.driver.session(database=self.db_name) as session:
# Export nodes
node_query = "MATCH (n:Memory)"
Expand Down Expand Up @@ -935,10 +926,6 @@ def get_all_memory_items(self, scope: str, include_embedding: bool = True) -> li
Returns:
list[dict]: Full list of memory items under this scope.
"""
if include_embedding:
logger.warning(
"[Neo4jGraphDB.get_node] `include_embedding=True` is not supported in Neo4j. Ignoring this flag."
)
if scope not in {"WorkingMemory", "LongTermMemory", "UserMemory", "OuterMemory"}:
raise ValueError(f"Unsupported memory type scope: {scope}")

Expand Down Expand Up @@ -967,9 +954,6 @@ def get_structure_optimization_candidates(
- Isolated nodes, nodes with empty background, or nodes with exactly one child.
- Plus: the child of any parent node that has exactly one child.
"""
logger.warning(
"[Neo4jGraphDB.get_node] `include_embedding=True` is not supported in Neo4j. Ignoring this flag."
)

where_clause = """
WHERE n.memory_type = $scope
Expand Down
2 changes: 2 additions & 0 deletions src/memos/templates/mem_reader_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Your task is to extract memories from the perspective of user, based on a conversation between user and assistant. This means identifying what user would plausibly remember — including their own experiences, thoughts, plans, or relevant statements and actions made by others (such as assistant) that impacted or were acknowledged by user.
Please perform:
1. Identify information that reflects user's experiences, beliefs, concerns, decisions, plans, or reactions — including meaningful input from assistant that user acknowledged or responded to.
If the message is from the user, extract user-relevant memories; if it is from the assistant, only extract factual memories that the user acknowledged or responded to.

2. Resolve all time, person, and event references clearly:
- Convert relative time expressions (e.g., “yesterday,” “next Friday”) into absolute dates using the message timestamp if possible.
- Clearly distinguish between event time and message time.
Expand Down
Loading