From 0123d685789cce44e4cb98dbe454c6a079cdcbe3 Mon Sep 17 00:00:00 2001 From: SengokuCola <1026294844@qq.com> Date: Sun, 16 Nov 2025 00:15:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=97=A0=E6=95=88=E6=8E=A8?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jargon/jargon_miner.py | 16 +++++++++++++--- src/memory_system/memory_retrieval.py | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/jargon/jargon_miner.py b/src/jargon/jargon_miner.py index 94dd0434..fd8a6c65 100644 --- a/src/jargon/jargon_miner.py +++ b/src/jargon/jargon_miner.py @@ -58,7 +58,8 @@ def _init_inference_prompts() -> None: prompt1_str = """ **词条内容** {content} - +**词条出现的上下文(raw_content)其中的SELF是你自己的发言** +{raw_content_list} 请根据以上词条内容和上下文,推断这个词条的含义。 - 如果这是一个黑话、俚语或网络用语,请推断其含义 @@ -350,13 +351,22 @@ class JargonMiner: logger.error(f"jargon {content} 推断2解析失败: {e}") return + + logger.info(f"jargon {content} 推断2提示词: {prompt2}") + logger.info(f"jargon {content} 推断2结果: {response2}") + logger.info(f"jargon {content} 推断1提示词: {prompt1}") + logger.info(f"jargon {content} 推断1结果: {response1}") + if global_config.debug.show_jargon_prompt: logger.info(f"jargon {content} 推断2提示词: {prompt2}") logger.info(f"jargon {content} 推断2结果: {response2}") - # logger.info(f"jargon {content} 推断2结果: {inference2}") logger.info(f"jargon {content} 推断1提示词: {prompt1}") logger.info(f"jargon {content} 推断1结果: {response1}") - # logger.info(f"jargon {content} 推断1结果: {inference1}") + else: + logger.debug(f"jargon {content} 推断2提示词: {prompt2}") + logger.debug(f"jargon {content} 推断2结果: {response2}") + logger.debug(f"jargon {content} 推断1提示词: {prompt1}") + logger.debug(f"jargon {content} 推断1结果: {response1}") # 步骤3: 比较两个推断结果 prompt3 = await global_prompt_manager.format_prompt( diff --git a/src/memory_system/memory_retrieval.py b/src/memory_system/memory_retrieval.py index 7e4a4a6a..3c176f62 100644 --- a/src/memory_system/memory_retrieval.py +++ b/src/memory_system/memory_retrieval.py @@ -450,8 +450,8 @@ async def _react_agent_solve_question( messages.extend(_conversation_messages) - for msg in messages: - print(msg) + # for msg in messages: + # print(msg) return messages