better:优化记忆生成

This commit is contained in:
SengokuCola
2025-10-05 15:38:13 +08:00
parent a3009e0128
commit f44857d856
5 changed files with 38 additions and 10 deletions

View File

@@ -49,6 +49,8 @@ reply
动作描述:
1.你可以选择呼叫了你的名字,但是你没有做出回应的消息进行回复
2.你可以自然的顺着正在进行的聊天内容进行回复或自然的提出一个问题
3.不要回复你自己发送的消息
4.不要单独对表情包进行回复
{{
"action": "reply",
"target_message_id":"想要回复的消息id",
@@ -77,6 +79,7 @@ no_reply_until_call
{actions_before_now_block}
请选择**可选的**且符合使用条件的action并说明触发action的消息id(消息id格式:m+数字)
不要回复你自己发送的消息
先输出你的选择思考理由再输出你选择的action理由是一段平文本不要分点精简。
**动作选择要求**
请你根据聊天内容,用户的最新消息和以下标准选择合适的动作:
@@ -469,8 +472,8 @@ class ActionPlanner:
# 调用LLM
llm_content, (reasoning_content, _, _) = await self.planner_llm.generate_response_async(prompt=prompt)
logger.info(f"{self.log_prefix}规划器原始提示词: {prompt}")
logger.info(f"{self.log_prefix}规划器原始响应: {llm_content}")
# logger.info(f"{self.log_prefix}规划器原始提示词: {prompt}")
# logger.info(f"{self.log_prefix}规划器原始响应: {llm_content}")
if global_config.debug.show_prompt:
logger.info(f"{self.log_prefix}规划器原始提示词: {prompt}")

View File

@@ -405,9 +405,14 @@ class DefaultReplyer:
if picid_matches:
pic_descriptions = []
for picid_match in picid_matches:
pic_id = picid_match[6:-1] # 提取picid:xxx中的xxx部分
pic_id = picid_match[7:-1] # 提取picid:xxx中的xxx部分从第7个字符开始
description = translate_pid_to_description(pic_id)
pic_descriptions.append(f"[图片:{description}]")
logger.info(f"图片ID: {pic_id}, 描述: {description}")
# 如果description已经是[图片]格式,直接使用;否则包装为[图片:描述]格式
if description == "[图片]":
pic_descriptions.append(description)
else:
pic_descriptions.append(f"[图片:{description}]")
pic_part = "".join(pic_descriptions)
return has_only_pics, has_text, pic_part, text_without_picids

View File

@@ -409,9 +409,14 @@ class PrivateReplyer:
if picid_matches:
pic_descriptions = []
for picid_match in picid_matches:
pic_id = picid_match[6:-1] # 提取picid:xxx中的xxx部分
pic_id = picid_match[7:-1] # 提取picid:xxx中的xxx部分从第7个字符开始
description = translate_pid_to_description(pic_id)
pic_descriptions.append(f"[图片:{description}]")
logger.debug(f"图片ID: {pic_id}, 描述: {description}")
# 如果description已经是[图片]格式,直接使用;否则包装为[图片:描述]格式
if description == "[图片]":
pic_descriptions.append(description)
else:
pic_descriptions.append(f"[图片:{description}]")
pic_part = "".join(pic_descriptions)
return has_only_pics, has_text, pic_part, text_without_picids