修改logger位置
This commit is contained in:
@@ -204,6 +204,15 @@ class ReasoningChat:
|
||||
if "maimcore_reply_probability_gain" in message.message_info.additional_config.keys():
|
||||
reply_probability += message.message_info.additional_config["maimcore_reply_probability_gain"]
|
||||
|
||||
# 打印消息信息
|
||||
mes_name = chat.group_info.group_name if chat.group_info else "私聊"
|
||||
current_time = time.strftime("%H:%M:%S", time.localtime(message.message_info.time))
|
||||
logger.info(
|
||||
f"[{current_time}][{mes_name}]"
|
||||
f"{chat.user_info.user_nickname}:"
|
||||
f"{message.processed_plain_text}[回复意愿:{await willing_manager.get_willing(chat.stream_id):.2f}][概率:{reply_probability * 100:.1f}%]"
|
||||
)
|
||||
|
||||
do_reply = False
|
||||
if random() < reply_probability:
|
||||
do_reply = True
|
||||
|
||||
@@ -236,6 +236,15 @@ class ThinkFlowChat:
|
||||
if "maimcore_reply_probability_gain" in message.message_info.additional_config.keys():
|
||||
reply_probability += message.message_info.additional_config["maimcore_reply_probability_gain"]
|
||||
|
||||
# 打印消息信息
|
||||
mes_name = chat.group_info.group_name if chat.group_info else "私聊"
|
||||
current_time = time.strftime("%H:%M:%S", time.localtime(message.message_info.time))
|
||||
logger.info(
|
||||
f"[{current_time}][{mes_name}]"
|
||||
f"{chat.user_info.user_nickname}:"
|
||||
f"{message.processed_plain_text}[回复意愿:{await willing_manager.get_willing(chat.stream_id):.2f}][概率:{reply_probability * 100:.1f}%]"
|
||||
)
|
||||
|
||||
do_reply = False
|
||||
if random() < reply_probability:
|
||||
try:
|
||||
|
||||
@@ -52,15 +52,6 @@ class ClassicalWillingManager(BaseWillingManager):
|
||||
if is_emoji_not_reply:
|
||||
reply_probability = 0
|
||||
|
||||
# 打印消息信息
|
||||
mes_name = willing_info.chat.group_info.group_name if willing_info.chat.group_info else "私聊"
|
||||
current_time = time.strftime("%H:%M:%S", time.localtime(willing_info.message.message_info.time))
|
||||
self.logger.info(
|
||||
f"[{current_time}][{mes_name}]"
|
||||
f"{willing_info.chat.user_info.user_nickname}:"
|
||||
f"{willing_info.message.processed_plain_text}[回复意愿:{current_willing:.2f}][概率:{reply_probability * 100:.1f}%]"
|
||||
)
|
||||
|
||||
return reply_probability
|
||||
|
||||
async def before_generate_reply_handle(self, message_id):
|
||||
|
||||
@@ -183,15 +183,6 @@ class DynamicWillingManager(BaseWillingManager):
|
||||
|
||||
self.chat_reply_willing[chat_id] = min(current_willing, 3.0)
|
||||
|
||||
# 打印消息信息
|
||||
mes_name = willing_info.chat.group_info.group_name if willing_info.chat.group_info else "私聊"
|
||||
current_time = time.strftime("%H:%M:%S", time.localtime(willing_info.message.message_info.time))
|
||||
self.logger.info(
|
||||
f"[{current_time}][{mes_name}]"
|
||||
f"{willing_info.chat.user_info.user_nickname}:"
|
||||
f"{willing_info.message.processed_plain_text}[回复意愿:{current_willing:.2f}][概率:{reply_probability * 100:.1f}%]"
|
||||
)
|
||||
|
||||
return reply_probability
|
||||
|
||||
async def before_generate_reply_handle(self, message_id):
|
||||
|
||||
Reference in New Issue
Block a user