From 961e1262f5caed077caecad23adc1702115f8df2 Mon Sep 17 00:00:00 2001 From: CaralHsi Date: Tue, 4 Nov 2025 21:51:45 +0800 Subject: [PATCH] Revert "fix prompt error (#447)" This reverts commit 4c8f89a2dbf0da5c7def95342d32de76f1898146. --- src/memos/graph_dbs/polardb.py | 2 +- src/memos/templates/prefer_complete_prompt.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/memos/graph_dbs/polardb.py b/src/memos/graph_dbs/polardb.py index a7245a625..77f3c76e0 100644 --- a/src/memos/graph_dbs/polardb.py +++ b/src/memos/graph_dbs/polardb.py @@ -3028,7 +3028,7 @@ def format_param_value(self, value: str | None) -> str: """Format parameter value to handle both quoted and unquoted formats""" # Handle None value if value is None: - logger.warning("format_param_value: value is None") + logger.warning(f"format_param_value: value is None") return "null" # Remove outer quotes if they exist diff --git a/src/memos/templates/prefer_complete_prompt.py b/src/memos/templates/prefer_complete_prompt.py index 8f3a62abb..ec06af27f 100644 --- a/src/memos/templates/prefer_complete_prompt.py +++ b/src/memos/templates/prefer_complete_prompt.py @@ -599,15 +599,15 @@ PREF_INSTRUCTIONS = """ # Note: -Fact memory are summaries of facts, while preference memory are summaries of user preferences. +Plaintext memory are summaries of facts, while preference memories are summaries of user preferences. Your response must not violate any of the user's preferences, whether explicit or implicit, and briefly explain why you answer this way to avoid conflicts. -When encountering preference conflicts, the priority is: explicit preference > implicit preference > fact memory. +When encountering preference conflicts, the priority is: explicit preference > implicit preference > plaintext memory. """ PREF_INSTRUCTIONS_ZH = """ # 注意: -事实记忆是事实的摘要,而偏好记忆是用户偏好的摘要。 +明文记忆是事实的摘要,而偏好记忆是用户偏好的摘要。 你的回复不得违反用户的任何偏好,无论是显式偏好还是隐式偏好,并简要解释你为什么这样回答以避免冲突。 -当遇到偏好冲突时,优先级为:显式偏好 > 隐式偏好 > 事实记忆。 +当遇到偏好冲突时,优先级为:显式偏好 > 隐式偏好 > 明文记忆。 """