fix:记忆系统成大芬了,暂时禁用

pull/1217/head
SengokuCola 2025-08-23 12:38:17 +08:00
parent d64215c21e
commit 9fe19671ec
4 changed files with 23 additions and 11 deletions

View File

@ -375,9 +375,10 @@ class DefaultReplyer:
instant_memory = None
running_memories = await self.memory_activator.activate_memory_with_chat_history(
target_message=target, chat_history=chat_history
)
# running_memories = await self.memory_activator.activate_memory_with_chat_history(
# target_message=target, chat_history=chat_history
# )
running_memories = None
if global_config.memory.enable_instant_memory:
chat_history_str = build_readable_messages(

View File

@ -570,7 +570,10 @@ def build_readable_actions(actions: List[Dict[str, Any]],mode:str="relative") ->
time_diff_minutes = round(time_diff_seconds / 60)
time_ago_str = f"{int(time_diff_minutes)}分钟前"
elif mode == "absolute":
time_ago_str = f"{action_time}"
# 转化为可读时间(仅保留时分秒,不包含日期)
action_time_struct = time.localtime(action_time)
time_str = time.strftime("%H:%M:%S", action_time_struct)
time_ago_str = f"{time_str}"
line = f"{time_ago_str},你使用了“{action_name}”,具体内容是:“{action_prompt_display}"
output_lines.append(line)

View File

@ -139,13 +139,21 @@ class EmojiAction(BaseAction):
# 7. 发送表情包
success = await self.send_emoji(emoji_base64)
if not success:
logger.error(f"{self.log_prefix} 表情包发送失败")
return False, "表情包发送失败"
if success:
logger.info(f"{self.log_prefix} 成功发送表情包")
# 存储动作信息
await self.store_action_info(
action_build_into_prompt=True,
action_prompt_display=f"发送了表情包,原因:{reason}",
action_done=True,
)
return True, f"成功发送表情包:{emoji_description}"
else:
error_msg = "发送表情包失败"
logger.error(f"{self.log_prefix} {error_msg}")
# no_action计数器现在由heartFC_chat.py统一管理无需在此重置
return True, f"发送表情包: {emoji_description}"
await self.send_text("执行表情包动作失败")
return False, error_msg
except Exception as e:
logger.error(f"{self.log_prefix} 表情动作执行失败: {e}", exc_info=True)

View File

@ -129,7 +129,7 @@ mood_update_threshold = 1 # 情绪更新阈值,越高,更新越慢
[emoji]
emoji_chance = 0.6 # 麦麦激活表情包动作的概率
max_reg_num = 60 # 表情包最大注册数量
max_reg_num = 100 # 表情包最大注册数量
do_replace = true # 开启则在达到最大数量时删除(替换)表情包,关闭则达到最大数量时不会继续收集表情包
check_interval = 10 # 检查表情包(注册,破损,删除)的时间间隔(分钟)
steal_emoji = true # 是否偷取表情包,让麦麦可以将一些表情包据为己有