Compare commits

..

1 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
7b36f864ef 🚨 auto fix by pre-commit hooks 2025-12-08 14:58:13 +00:00

View File

@ -7,8 +7,6 @@ from nonebot_plugin_session import EventSession
from zhenxun.configs.config import Config from zhenxun.configs.config import Config
from zhenxun.configs.utils import PluginExtraData, RegisterConfig from zhenxun.configs.utils import PluginExtraData, RegisterConfig
from zhenxun.services.llm.config.providers import get_llm_config
from zhenxun.services.llm.manager import clear_model_cache
from zhenxun.services.log import logger from zhenxun.services.log import logger
from zhenxun.utils.enum import PluginType from zhenxun.utils.enum import PluginType
from zhenxun.utils.message import MessageUtils from zhenxun.utils.message import MessageUtils
@ -56,8 +54,6 @@ _matcher = on_alconna(
@_matcher.handle() @_matcher.handle()
async def _(session: EventSession, arparma: Arparma): async def _(session: EventSession, arparma: Arparma):
Config.reload() Config.reload()
get_llm_config.cache_clear()
clear_model_cache()
logger.debug("自动重载配置文件", arparma.header_result, session=session) logger.debug("自动重载配置文件", arparma.header_result, session=session)
await MessageUtils.build_message("重载完成!").send(reply_to=True) await MessageUtils.build_message("重载完成!").send(reply_to=True)
@ -69,6 +65,4 @@ async def _(session: EventSession, arparma: Arparma):
async def _(): async def _():
if Config.get_config("reload_setting", "AUTO_RELOAD"): if Config.get_config("reload_setting", "AUTO_RELOAD"):
Config.reload() Config.reload()
get_llm_config.cache_clear()
clear_model_cache()
logger.debug("已自动重载配置文件...") logger.debug("已自动重载配置文件...")