修复合并错误
This commit is contained in:
@@ -136,6 +136,12 @@ class ChatBot:
|
|||||||
logger.error(f"处理命令时出错: {e}")
|
logger.error(f"处理命令时出错: {e}")
|
||||||
return False, None, True # 出错时继续处理消息
|
return False, None, True # 出错时继续处理消息
|
||||||
|
|
||||||
|
async def hanle_notice_message(self, message: MessageRecv):
|
||||||
|
if message.message_info.message_id == "notice":
|
||||||
|
logger.info("收到notice消息,暂时不支持处理")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
async def do_s4u(self, message_data: Dict[str, Any]):
|
async def do_s4u(self, message_data: Dict[str, Any]):
|
||||||
message = MessageRecvS4U(message_data)
|
message = MessageRecvS4U(message_data)
|
||||||
group_info = message.message_info.group_info
|
group_info = message.message_info.group_info
|
||||||
@@ -224,9 +230,9 @@ class ChatBot:
|
|||||||
# 处理消息内容,生成纯文本
|
# 处理消息内容,生成纯文本
|
||||||
await message.process()
|
await message.process()
|
||||||
|
|
||||||
if await self.check_ban_content(message):
|
# if await self.check_ban_content(message):
|
||||||
logger.warning(f"检测到消息中含有违法,色情,暴力,反动,敏感内容,消息内容:{message.processed_plain_text},发送者:{message.message_info.user_info.user_nickname}")
|
# logger.warning(f"检测到消息中含有违法,色情,暴力,反动,敏感内容,消息内容:{message.processed_plain_text},发送者:{message.message_info.user_info.user_nickname}")
|
||||||
return
|
# return
|
||||||
|
|
||||||
|
|
||||||
# 过滤检查
|
# 过滤检查
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ max_context_size = 25 # 上下文长度
|
|||||||
thinking_timeout = 20 # 麦麦一次回复最长思考规划时间,超过这个时间的思考会放弃(往往是api反应太慢)
|
thinking_timeout = 20 # 麦麦一次回复最长思考规划时间,超过这个时间的思考会放弃(往往是api反应太慢)
|
||||||
replyer_random_probability = 0.5 # 首要replyer模型被选择的概率
|
replyer_random_probability = 0.5 # 首要replyer模型被选择的概率
|
||||||
|
|
||||||
use_s4u_prompt_mode = false # 是否使用 s4u 对话构建模式,该模式会更好的把握当前对话对象的对话内容,但是对群聊整理理解能力较差(测试功能!!可能有未知问题!!)
|
use_s4u_prompt_mode = true # 是否使用 s4u 对话构建模式,该模式会更好的把握当前对话对象的对话内容,但是对群聊整理理解能力较差(测试功能!!可能有未知问题!!)
|
||||||
|
|
||||||
|
|
||||||
talk_frequency = 1 # 麦麦回复频率,越高,麦麦回复越频繁
|
talk_frequency = 1 # 麦麦回复频率,越高,麦麦回复越频繁
|
||||||
|
|||||||
Reference in New Issue
Block a user