🤖 自动格式化代码 [skip ci]

pull/937/head
github-actions[bot] 2025-05-08 17:09:52 +00:00
parent c038be2b84
commit c948a00045
2 changed files with 13 additions and 13 deletions

View File

@ -241,20 +241,20 @@ class ActionPlanner:
# 但为了保持占位符填充的一致性,我们仍然计算它
# spam_warning_message = ""
# if conversation_info.my_message_count > 5: # 这里的 my_message_count 仍有意义,表示之前连续发送了多少
# spam_warning_message = (
# f"⚠️【警告】**你之前已连续发送{str(conversation_info.my_message_count)}条消息!请谨慎决策。**"
# )
# spam_warning_message = (
# f"⚠️【警告】**你之前已连续发送{str(conversation_info.my_message_count)}条消息!请谨慎决策。**"
# )
# elif conversation_info.my_message_count > 2:
# spam_warning_message = f"💬【提示】**你之前已连续发送{str(conversation_info.my_message_count)}条消息。请注意保持对话平衡。**"
# spam_warning_message = f"💬【提示】**你之前已连续发送{str(conversation_info.my_message_count)}条消息。请注意保持对话平衡。**"
elif last_successful_reply_action in ["direct_reply", "send_new_message"]:
prompt_template = PROMPT_FOLLOW_UP
log_msg = "使用 PROMPT_FOLLOW_UP (追问决策)"
# spam_warning_message = ""
# if conversation_info.my_message_count > 5:
# spam_warning_message = f"⚠️【警告】**你已连续发送{str(conversation_info.my_message_count)}条消息请注意不要再选择send_new_message以免刷屏对造成对方困扰**"
# spam_warning_message = f"⚠️【警告】**你已连续发送{str(conversation_info.my_message_count)}条消息请注意不要再选择send_new_message以免刷屏对造成对方困扰**"
# elif conversation_info.my_message_count > 2:
# spam_warning_message = f"💬【警告】**你已连续发送{str(conversation_info.my_message_count)}条消息。请保持理智如果非必要请避免选择send_new_message以免给对方造成困扰。**"
# spam_warning_message = f"💬【警告】**你已连续发送{str(conversation_info.my_message_count)}条消息。请保持理智如果非必要请避免选择send_new_message以免给对方造成困扰。**"
else:
prompt_template = PROMPT_INITIAL_REPLY
@ -268,7 +268,7 @@ class ActionPlanner:
current_time_value = observation_info.current_time_str
# if spam_warning_message:
# spam_warning_message = f"\n{spam_warning_message}\n"
# spam_warning_message = f"\n{spam_warning_message}\n"
prompt = prompt_template.format(
persona_text=persona_text,

View File

@ -280,12 +280,12 @@ class ReplyGenerator:
# 新增:构建刷屏警告信息 for PROMPT_SEND_NEW_MESSAGE
# spam_warning_message = ""
# if action_type == "send_new_message": # 只在 send_new_message 时构建刷屏警告
# if conversation_info.my_message_count > 5:
# spam_warning_message = f"⚠️【警告】**你已连续发送{str(conversation_info.my_message_count)}条消息!请谨慎考虑是否继续发送!以免刷屏对造成对方困扰!**"
# elif conversation_info.my_message_count > 2:
# spam_warning_message = f"💬【提示】**你已连续发送{str(conversation_info.my_message_count)}条消息。如果非必要,请避免连续发送,以免给对方造成困扰。**"
# if spam_warning_message:
# spam_warning_message = f"\n{spam_warning_message}\n"
# if conversation_info.my_message_count > 5:
# spam_warning_message = f"⚠️【警告】**你已连续发送{str(conversation_info.my_message_count)}条消息!请谨慎考虑是否继续发送!以免刷屏对造成对方困扰!**"
# elif conversation_info.my_message_count > 2:
# spam_warning_message = f"💬【提示】**你已连续发送{str(conversation_info.my_message_count)}条消息。如果非必要,请避免连续发送,以免给对方造成困扰。**"
# if spam_warning_message:
# spam_warning_message = f"\n{spam_warning_message}\n"
# --- 选择 Prompt ---
if action_type == "send_new_message":