From 3b8f9df2a8843e8dcd32d07e02c954e67e4e55be Mon Sep 17 00:00:00 2001 From: XBC_D2O Date: Thu, 13 Mar 2025 22:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AEbug99999+=E4=B8=AA=E5=B0=B1=E6=98=AF?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/chat/__init__.py | 6 +++--- src/plugins/chat/willing_manager.py | 2 +- src/plugins/schedule/schedule_generator.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/chat/__init__.py b/src/plugins/chat/__init__.py index 8b0bba70..38af5443 100644 --- a/src/plugins/chat/__init__.py +++ b/src/plugins/chat/__init__.py @@ -9,7 +9,7 @@ from nonebot.typing import T_State from ...common.database import Database from ..moods.moods import MoodManager # 导入情绪管理器 -# from ..schedule.schedule_generator import bot_schedule +from ..schedule.schedule_generator import bot_schedule from ..utils.statistic import LLMStatistics from .bot import chat_bot from .config import global_config @@ -70,8 +70,8 @@ async def start_background_tasks(): # 只启动表情包管理任务 asyncio.create_task(emoji_manager.start_periodic_check(interval_MINS=global_config.EMOJI_CHECK_INTERVAL)) -# await bot_schedule.initialize() -# bot_schedule.print_schedule() + await bot_schedule.initialize() + bot_schedule.print_schedule() @driver.on_startup diff --git a/src/plugins/chat/willing_manager.py b/src/plugins/chat/willing_manager.py index e777155c..d202b314 100644 --- a/src/plugins/chat/willing_manager.py +++ b/src/plugins/chat/willing_manager.py @@ -71,7 +71,7 @@ class WillingManager: current_willing *= global_config.response_willing_amplifier #放大回复意愿 # print(f"放大系数_willing: {global_config.response_willing_amplifier}, 当前意愿: {current_willing}") - reply_probability = max((current_willing - 0.45) * 2, 0) + reply_probability = current_willing#max((current_willing - 0.45) * 2, 0) # 检查群组权限(如果是群聊) if chat_stream.group_info: diff --git a/src/plugins/schedule/schedule_generator.py b/src/plugins/schedule/schedule_generator.py index 3cf1d473..5918b8b8 100644 --- a/src/plugins/schedule/schedule_generator.py +++ b/src/plugins/schedule/schedule_generator.py @@ -93,7 +93,7 @@ class ScheduleGenerator: schedule_dict = json.loads(schedule_text) return schedule_dict except json.JSONDecodeError: - logger.exception("解析日程失败: {}".format(schedule_text)) + #logger.exception("解析日程失败: {}".format(schedule_text)) return False def _parse_time(self, time_str: str) -> str: