mirror of
https://github.com/langgenius/dify.git
synced 2026-06-16 14:01:10 +08:00
refactor: type remaining bare dict annotations (#37422)
This commit is contained in:
parent
0ca39c96db
commit
06d9b01a8d
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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``),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user