ruff,私聊视为提及了bot
This commit is contained in:
@@ -17,6 +17,7 @@ from src.plugin_system.core import component_registry, event_manager, global_ann
|
||||
from src.plugin_system.base import BaseCommand, EventType
|
||||
from src.mais4u.mais4u_chat.s4u_msg_processor import S4UMessageProcessor
|
||||
from src.chat.utils.utils import is_mentioned_bot_in_message
|
||||
|
||||
# 导入反注入系统
|
||||
from src.chat.antipromptinjector import initialize_anti_injector
|
||||
|
||||
@@ -511,7 +512,7 @@ class ChatBot:
|
||||
chat_info_user_id=message.chat_stream.user_info.user_id,
|
||||
chat_info_user_nickname=message.chat_stream.user_info.user_nickname,
|
||||
chat_info_user_cardname=message.chat_stream.user_info.user_cardname,
|
||||
chat_info_user_platform=message.chat_stream.user_info.platform
|
||||
chat_info_user_platform=message.chat_stream.user_info.platform,
|
||||
)
|
||||
|
||||
# 如果是群聊,添加群组信息
|
||||
|
||||
@@ -84,7 +84,9 @@ class ChatStream:
|
||||
self.saved = False
|
||||
self.context: ChatMessageContext = None # type: ignore # 用于存储该聊天的上下文信息
|
||||
# 从配置文件中读取focus_value,如果没有则使用默认值1.0
|
||||
self.focus_energy = data.get("focus_energy", global_config.chat.focus_value) if data else global_config.chat.focus_value
|
||||
self.focus_energy = (
|
||||
data.get("focus_energy", global_config.chat.focus_value) if data else global_config.chat.focus_value
|
||||
)
|
||||
self.no_reply_consecutive = 0
|
||||
self.breaking_accumulated_interest = 0.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user