diff --git a/src/chat/chat_loop/wakeup_manager.py b/src/chat/chat_loop/wakeup_manager.py index f3a9ee919..fa755e882 100644 --- a/src/chat/chat_loop/wakeup_manager.py +++ b/src/chat/chat_loop/wakeup_manager.py @@ -36,6 +36,7 @@ class WakeUpManager: self.decay_interval = wakeup_config.decay_interval self.angry_duration = wakeup_config.angry_duration self.enabled = wakeup_config.enable + self.angry_prompt = wakeup_config.angry_prompt async def start(self): """启动唤醒度管理器""" @@ -146,7 +147,7 @@ class WakeUpManager: def get_angry_prompt_addition(self) -> str: """获取愤怒状态下的提示词补充""" if self.is_angry: - return "你被人吵醒了非常生气,说话带着怒气" + return self.angry_prompt return "" def is_in_angry_state(self) -> bool: diff --git a/src/config/official_configs.py b/src/config/official_configs.py index 847f8a015..a447a9d95 100644 --- a/src/config/official_configs.py +++ b/src/config/official_configs.py @@ -674,6 +674,7 @@ class WakeUpSystemConfig(ValidatedConfigBase): decay_rate: float = Field(default=0.2, ge=0.0, description="每次衰减的唤醒度数值") decay_interval: float = Field(default=30.0, ge=1.0, description="唤醒度衰减间隔(秒)") angry_duration: float = Field(default=300.0, ge=10.0, description="愤怒状态持续时间(秒)") + angry_prompt: str = Field(default="你被人吵醒了非常生气,说话带着怒气", description="被吵醒后的愤怒提示词") class MonthlyPlanSystemConfig(ValidatedConfigBase): diff --git a/template/bot_config_template.toml b/template/bot_config_template.toml index f4f38bbe5..f5ec06493 100644 --- a/template/bot_config_template.toml +++ b/template/bot_config_template.toml @@ -1,5 +1,5 @@ [inner] -version = "6.4.2" +version = "6.4.3" #----以下是给开发人员阅读的,如果你只是部署了麦麦,不需要阅读---- #如果你想要修改配置文件,请递增version的值 @@ -432,6 +432,7 @@ group_mention_increment = 2.0 #"群聊艾特增加的唤醒度" decay_rate = 0.2 #"每次衰减的唤醒度数值" decay_interval = 30.0 #"唤醒度衰减间隔(秒)" angry_duration = 300.0 #"愤怒状态持续时间(秒)" +angry_prompt = "你被人吵醒了非常生气,说话带着怒气" # "被吵醒后的愤怒提示词" [cross_context] # 跨群聊上下文共享配置 # 这是总开关,用于一键启用或禁用此功能