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

Method _build_timeout

app/core/upstream.py:1024–1031  ·  view source on GitHub ↗

Create httpx timeout settings tuned for upstream chat traffic.

(self, read_timeout: float = 30.0)

Source from the content-addressed store, hash-verified

1022 return None
1023
1024 def _build_timeout(self, read_timeout: float = 30.0) -> httpx.Timeout:
1025 """Create httpx timeout settings tuned for upstream chat traffic."""
1026 return httpx.Timeout(
1027 connect=5.0,
1028 read=read_timeout,
1029 write=10.0,
1030 pool=5.0,
1031 )
1032
1033 def _build_limits(self) -> httpx.Limits:
1034 """Create conservative connection-pool limits for upstream requests."""

Callers 5

_create_upstream_chatMethod · 0.95
upload_imageMethod · 0.95
chat_completionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected