From a1f048ad9f359e6aa2b1d4fc90e8cc06e61a57ff Mon Sep 17 00:00:00 2001 From: "yuan.wang" Date: Tue, 4 Nov 2025 14:33:00 +0800 Subject: [PATCH] fix prompt error --- 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 552b30241..ac49228e2 100644 --- a/src/memos/graph_dbs/polardb.py +++ b/src/memos/graph_dbs/polardb.py @@ -3024,7 +3024,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(f"format_param_value: value is None") + logger.warning("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 ec06af27f..8f3a62abb 100644 --- a/src/memos/templates/prefer_complete_prompt.py +++ b/src/memos/templates/prefer_complete_prompt.py @@ -599,15 +599,15 @@ PREF_INSTRUCTIONS = """ # Note: -Plaintext memory are summaries of facts, while preference memories are summaries of user preferences. +Fact memory are summaries of facts, while preference memory 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 > plaintext memory. +When encountering preference conflicts, the priority is: explicit preference > implicit preference > fact memory. """ PREF_INSTRUCTIONS_ZH = """ # 注意: -明文记忆是事实的摘要,而偏好记忆是用户偏好的摘要。 +事实记忆是事实的摘要,而偏好记忆是用户偏好的摘要。 你的回复不得违反用户的任何偏好,无论是显式偏好还是隐式偏好,并简要解释你为什么这样回答以避免冲突。 -当遇到偏好冲突时,优先级为:显式偏好 > 隐式偏好 > 明文记忆。 +当遇到偏好冲突时,优先级为:显式偏好 > 隐式偏好 > 事实记忆。 """