🤖 自动格式化代码 [skip ci]
This commit is contained in:
@@ -115,8 +115,6 @@ class NormalChatConfig(ConfigBase):
|
||||
willing_mode: str = "classical"
|
||||
"""意愿模式"""
|
||||
|
||||
|
||||
|
||||
response_interested_rate_amplifier: float = 1.0
|
||||
"""回复兴趣度放大系数"""
|
||||
|
||||
|
||||
@@ -301,13 +301,19 @@ class NoReplyAction(BaseAction):
|
||||
elif over_count <= 10:
|
||||
frequency_block = "你今天说话比较多,感觉有点疲惫,想要稍微休息一下。\n"
|
||||
elif over_count <= 20:
|
||||
frequency_block = "你发现自己说话太多了,感觉很累,需要好好休息一下,不想频繁回复。\n"
|
||||
frequency_block = (
|
||||
"你发现自己说话太多了,感觉很累,需要好好休息一下,不想频繁回复。\n"
|
||||
)
|
||||
else:
|
||||
frequency_block = "你感到非常疲惫,今天话说得太多了,想要安静一会儿,除非有重要的事情否则不想回复。\n"
|
||||
|
||||
logger.info(f"{self.log_prefix} 过去10分钟发言{bot_message_count}条,超过阈值{talk_frequency_threshold},添加疲惫提示")
|
||||
logger.info(
|
||||
f"{self.log_prefix} 过去10分钟发言{bot_message_count}条,超过阈值{talk_frequency_threshold},添加疲惫提示"
|
||||
)
|
||||
else:
|
||||
logger.info(f"{self.log_prefix} 过去10分钟发言{bot_message_count}条,未超过阈值{talk_frequency_threshold}")
|
||||
logger.info(
|
||||
f"{self.log_prefix} 过去10分钟发言{bot_message_count}条,未超过阈值{talk_frequency_threshold}"
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
logger.warning(f"{self.log_prefix} 检查发言频率时出错: {e}")
|
||||
@@ -382,13 +388,17 @@ class NoReplyAction(BaseAction):
|
||||
# 构建包含判断历史的详细信息
|
||||
history_summary = ""
|
||||
if len(judge_history) > 1:
|
||||
history_summary = f"\n\n判断过程:\n"
|
||||
for i, (timestamp, past_result, past_reason) in enumerate(judge_history[:-1], 1):
|
||||
history_summary = "\n\n判断过程:\n"
|
||||
for i, (timestamp, past_result, past_reason) in enumerate(
|
||||
judge_history[:-1], 1
|
||||
):
|
||||
elapsed_seconds = int(timestamp - start_time)
|
||||
history_summary += f"{i}. 等待{elapsed_seconds}秒时:{past_result},理由:{past_reason}\n"
|
||||
history_summary += f"{len(judge_history)}. 等待{elapsed_time:.0f}秒时:{judge_result},理由:{reason}"
|
||||
|
||||
full_prompt = f"{global_config.bot.nickname}(你)的想法是:{reason}{history_summary}"
|
||||
full_prompt = (
|
||||
f"{global_config.bot.nickname}(你)的想法是:{reason}{history_summary}"
|
||||
)
|
||||
await self.store_action_info(
|
||||
action_build_into_prompt=True,
|
||||
action_prompt_display=full_prompt,
|
||||
|
||||
Reference in New Issue
Block a user