Skip to content

Commit ae3fc53

Browse files
authored
feat: fix illumination (#222)
feat: illumination fix
1 parent 5dab4f1 commit ae3fc53

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

src/memos/graph_dbs/neo4j.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,6 @@ def get_node(self, id: str, include_embedding: bool = True) -> dict[str, Any] |
332332
Returns:
333333
Dictionary of node fields, or None if not found.
334334
"""
335-
logger.warning(
336-
"[Neo4jGraphDB.get_node] `include_embedding=False` is not supported in Neo4j. Ignoring this flag."
337-
)
338335

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

368362
if not ids:
369363
return []
@@ -849,9 +843,6 @@ def export_graph(self, include_embedding: bool = True) -> dict[str, Any]:
849843
"edges": [ { "source": ..., "target": ..., "type": ... }, ... ]
850844
}
851845
"""
852-
logger.warning(
853-
"[Neo4jGraphDB.get_node] `include_embedding=False` is not supported in Neo4j. Ignoring this flag."
854-
)
855846
with self.driver.session(database=self.db_name) as session:
856847
# Export nodes
857848
node_query = "MATCH (n:Memory)"
@@ -935,10 +926,6 @@ def get_all_memory_items(self, scope: str, include_embedding: bool = True) -> li
935926
Returns:
936927
list[dict]: Full list of memory items under this scope.
937928
"""
938-
if include_embedding:
939-
logger.warning(
940-
"[Neo4jGraphDB.get_node] `include_embedding=True` is not supported in Neo4j. Ignoring this flag."
941-
)
942929
if scope not in {"WorkingMemory", "LongTermMemory", "UserMemory", "OuterMemory"}:
943930
raise ValueError(f"Unsupported memory type scope: {scope}")
944931

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

974958
where_clause = """
975959
WHERE n.memory_type = $scope

src/memos/templates/mem_reader_prompts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
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.
33
Please perform:
44
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.
5+
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.
6+
57
2. Resolve all time, person, and event references clearly:
68
- Convert relative time expressions (e.g., “yesterday,” “next Friday”) into absolute dates using the message timestamp if possible.
79
- Clearly distinguish between event time and message time.

0 commit comments

Comments
 (0)