MCPcopy Create free account
hub / github.com/ZyphrZero/z.ai2api_python / _build_async_client

Function _build_async_client

app/utils/guest_session_pool.py:63–70  ·  view source on GitHub ↗

构建访客会话相关 HTTP 客户端。

(read_timeout: float = 30.0)

Source from the content-addressed store, hash-verified

61
62
63def _build_async_client(read_timeout: float = 30.0) -> httpx.AsyncClient:
64 """构建访客会话相关 HTTP 客户端。"""
65 return httpx.AsyncClient(
66 timeout=_build_timeout(read_timeout),
67 follow_redirects=True,
68 limits=_build_limits(),
69 proxy=_get_proxy_config(),
70 )
71
72
73def _build_dynamic_headers(chat_id: str = "") -> Dict[str, str]:

Callers 2

_get_http_clientMethod · 0.85
_create_sessionMethod · 0.85

Calls 3

_build_timeoutFunction · 0.85
_build_limitsFunction · 0.85
_get_proxy_configFunction · 0.85

Tested by

no test coverage detected