diff --git a/src/chat/chat_loop/heartFC_chat.py b/src/chat/chat_loop/heartFC_chat.py index 085ef2d2a..e541db075 100644 --- a/src/chat/chat_loop/heartFC_chat.py +++ b/src/chat/chat_loop/heartFC_chat.py @@ -512,8 +512,8 @@ class HeartFChatting: reply_probability += additional_config["maimcore_reply_probability_gain"] reply_probability = min(max(reply_probability, 0), 1) # 确保概率在 0-1 之间 - talk_frequency = global_config.chat.get_current_talk_frequency(self.stream_id) - reply_probability = talk_frequency * reply_probability + talk_frequency = global_config.chat.get_current_talk_frequency(self.stream_id) + reply_probability = talk_frequency * reply_probability # 处理表情包 if message_data.get("is_emoji") or message_data.get("is_picid"): diff --git a/src/chat/willing/mode_classical.py b/src/chat/willing/mode_classical.py index dc159aa1e..4ffbbcea8 100644 --- a/src/chat/willing/mode_classical.py +++ b/src/chat/willing/mode_classical.py @@ -36,20 +36,18 @@ class ClassicalWillingManager(BaseWillingManager): current_willing += interested_rate - 0.2 if willing_info.is_mentioned_bot and global_config.chat.mentioned_bot_inevitable_reply and current_willing < 2: - current_willing += 1 if current_willing < 1.0 else 0.05 + current_willing += 1 if current_willing < 1.0 else 0.2 self.chat_reply_willing[chat_id] = min(current_willing, 1.0) - reply_probability = min(max((current_willing - 0.5), 0.01) * 2, 1) + reply_probability = min(max((current_willing - 0.5), 0.01) * 2, 1.5) # print(f"[{chat_id}] 回复概率: {reply_probability}") return reply_probability async def before_generate_reply_handle(self, message_id): - chat_id = self.ongoing_messages[message_id].chat_id - current_willing = self.chat_reply_willing.get(chat_id, 0) - self.chat_reply_willing[chat_id] = max(0.0, current_willing - 1.8) + pass async def after_generate_reply_handle(self, message_id): if message_id not in self.ongoing_messages: @@ -58,7 +56,7 @@ class ClassicalWillingManager(BaseWillingManager): chat_id = self.ongoing_messages[message_id].chat_id current_willing = self.chat_reply_willing.get(chat_id, 0) if current_willing < 1: - self.chat_reply_willing[chat_id] = min(1.0, current_willing + 0.4) + self.chat_reply_willing[chat_id] = min(1.0, current_willing + 0.3) async def not_reply_handle(self, message_id): return await super().not_reply_handle(message_id) diff --git a/template/bot_config_template.toml b/template/bot_config_template.toml index e8ca5e5b4..34b91b35e 100644 --- a/template/bot_config_template.toml +++ b/template/bot_config_template.toml @@ -69,11 +69,11 @@ use_s4u_prompt_mode = true # 是否使用 s4u 对话构建模式,该模式会 talk_frequency = 1 # 麦麦回复频率,越高,麦麦回复越频繁 -time_based_talk_frequency = ["8:00,1", "12:00,1.5", "18:00,2", "01:00,0.5"] +time_based_talk_frequency = ["8:00,1", "12:00,1.2", "18:00,1.5", "01:00,0.6"] # 基于时段的回复频率配置(可选) # 格式:time_based_talk_frequency = ["HH:MM,frequency", ...] # 示例: -# time_based_talk_frequency = ["8:00,1", "12:00,2", "18:00,1.5", "00:00,0.5"] +# time_based_talk_frequency = ["8:00,1", "12:00,1.2", "18:00,1.5", "00:00,0.6"] # 说明:表示从该时间开始使用该频率,直到下一个时间点 # 注意:如果没有配置,则使用上面的默认 talk_frequency 值