Update heartFC_chat.py

This commit is contained in:
SengokuCola
2025-07-16 11:09:55 +08:00
parent 26f5bf4d36
commit a40346606d

View File

@@ -232,7 +232,7 @@ class HeartFChatting:
if len(new_messages_data) > 3 * global_config.chat.focus_value: if len(new_messages_data) > 3 * global_config.chat.focus_value:
self.loop_mode = ChatMode.FOCUS self.loop_mode = ChatMode.FOCUS
self.energy_value = 10 + (new_messages_data / 3) * 10 self.energy_value = 10 + (new_messages_data / (3 * global_config.chat.focus_value)) * 10
return True return True
if self.energy_value >= 30 * global_config.chat.focus_value: if self.energy_value >= 30 * global_config.chat.focus_value:
@@ -245,7 +245,7 @@ class HeartFChatting:
if_think = await self.normal_response(earliest_messages_data) if_think = await self.normal_response(earliest_messages_data)
if if_think: if if_think:
self.energy_value *= 1.1 self.energy_value *= 1.1 / (global_config.chat.focus_value + 0.2)
logger.info(f"{self.log_prefix} 麦麦进行了思考能量值增加1当前能量值{self.energy_value}") logger.info(f"{self.log_prefix} 麦麦进行了思考能量值增加1当前能量值{self.energy_value}")
return False return False