diff --git a/nonebot_plugin_nailongremove/__init__.py b/nonebot_plugin_nailongremove/__init__.py index e0ec33a..71620b2 100644 --- a/nonebot_plugin_nailongremove/__init__.py +++ b/nonebot_plugin_nailongremove/__init__.py @@ -9,7 +9,7 @@ from . import handler as handler from .config import Config -__version__ = "2.3.0" +__version__ = "2.3.1" __plugin_meta__ = PluginMetadata( name="自动撤回奶龙", description="一个基于图像分类模型的简单插件~", diff --git a/nonebot_plugin_nailongremove/config.py b/nonebot_plugin_nailongremove/config.py index f3e8147..5cb4c7a 100644 --- a/nonebot_plugin_nailongremove/config.py +++ b/nonebot_plugin_nailongremove/config.py @@ -84,11 +84,11 @@ def check_default_label_exists(cls, v: Dict[str, Any]): # noqa: N805 raise ValueError(f"Please ensure default label {DEFAULT_LABEL} in dict") return v - @field_validator("nailong_onnx_provider_type", mode="before") + @field_validator("nailong_onnx_providers", mode="before") def transform_to_list(cls, v: Any): # noqa: N805 return v if isinstance(v, list) else [v] - @field_validator("nailong_onnx_provider_type", mode="after") + @field_validator("nailong_onnx_providers", mode="after") def validate_provider_available(cls, v: Any): # noqa: N805 try: from onnxruntime.capi import _pybind_state as c