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

Function get_upstream_client

app/core/openai.py:36–41  ·  view source on GitHub ↗

获取懒加载的上游适配器单例。

()

Source from the content-addressed store, hash-verified

34
35
36def get_upstream_client() -> UpstreamClient:
37 """获取懒加载的上游适配器单例。"""
38 global _upstream_client
39 if _upstream_client is None:
40 _upstream_client = UpstreamClient()
41 return _upstream_client
42
43
44async def handle_non_stream_response(stream_response, request: OpenAIRequest) -> JSONResponse:

Callers 3

claude_messagesFunction · 0.90
list_modelsFunction · 0.85
chat_completionsFunction · 0.85

Calls 1

UpstreamClientClass · 0.90

Tested by

no test coverage detected