chore: ruff check
This commit is contained in:
@@ -255,7 +255,6 @@ class ProviderManager:
|
||||
asyncio.create_task(self.llm_tools.init_mcp_clients(), name="init_mcp_clients")
|
||||
|
||||
async def load_provider(self, provider_config: dict):
|
||||
|
||||
# 如果 provider_source_id 存在且不为空,则从 provider_sources 中找到对应的配置并合并
|
||||
provider_source_id = provider_config.get("provider_source_id", "")
|
||||
if provider_source_id:
|
||||
|
||||
@@ -67,7 +67,7 @@ def _migra_provider_to_source_structure(conf: AstrBotConfig) -> None:
|
||||
if provider_type != "chat_completion":
|
||||
# For old types without provider_type, check type field
|
||||
old_type = provider.get("type", "")
|
||||
if not ("chat_completion" in old_type):
|
||||
if "chat_completion" not in old_type:
|
||||
continue
|
||||
|
||||
migrated = True
|
||||
|
||||
@@ -20,8 +20,8 @@ from astrbot.core.core_lifecycle import AstrBotCoreLifecycle
|
||||
from astrbot.core.platform.register import platform_cls_map, platform_registry
|
||||
from astrbot.core.provider import Provider
|
||||
from astrbot.core.provider.register import provider_registry
|
||||
from astrbot.core.utils.llm_metadata import LLM_METADATAS, update_llm_metadata
|
||||
from astrbot.core.star.star import star_registry
|
||||
from astrbot.core.utils.llm_metadata import LLM_METADATAS
|
||||
from astrbot.core.utils.webhook_utils import ensure_platform_webhook_config
|
||||
|
||||
from .route import Response, Route, RouteContext
|
||||
|
||||
Reference in New Issue
Block a user