diff --git a/api/core/app/apps/chat/app_config_manager.py b/api/core/app/apps/chat/app_config_manager.py index 5f087f6066..35507d65ab 100644 --- a/api/core/app/apps/chat/app_config_manager.py +++ b/api/core/app/apps/chat/app_config_manager.py @@ -81,7 +81,7 @@ class ChatAppConfigManager(BaseAppConfigManager): return app_config @classmethod - def config_validate(cls, tenant_id: str, config: dict) -> AppModelConfigDict: + def config_validate(cls, tenant_id: str, config: dict[str, Any]) -> AppModelConfigDict: """ Validate for chat app model config diff --git a/api/core/app/apps/completion/app_config_manager.py b/api/core/app/apps/completion/app_config_manager.py index f49e7b8b5e..fcfb38e8c8 100644 --- a/api/core/app/apps/completion/app_config_manager.py +++ b/api/core/app/apps/completion/app_config_manager.py @@ -68,7 +68,7 @@ class CompletionAppConfigManager(BaseAppConfigManager): return app_config @classmethod - def config_validate(cls, tenant_id: str, config: dict) -> AppModelConfigDict: + def config_validate(cls, tenant_id: str, config: dict[str, Any]) -> AppModelConfigDict: """ Validate for completion app model config diff --git a/api/providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py b/api/providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py index 6283dbb986..ca9494e53f 100644 --- a/api/providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py +++ b/api/providers/vdb/vdb-tidb-on-qdrant/src/dify_vdb_tidb_on_qdrant/tidb_service.py @@ -1,7 +1,8 @@ import logging import time import uuid -from collections.abc import Sequence +from collections.abc import Mapping, Sequence +from typing import Any import httpx from httpx import DigestAuth @@ -24,7 +25,7 @@ _tidb_http_client: httpx.Client = get_pooled_http_client( class TidbService: @staticmethod - def extract_qdrant_endpoint(cluster_response: dict) -> str | None: + def extract_qdrant_endpoint(cluster_response: Mapping[str, Any]) -> str | None: """Extract the qdrant endpoint URL from a Get Cluster API response. Reads ``endpoints.public.host`` (e.g. ``gateway01.xx.tidbcloud.com``),