"""Explicit upstream connection/read timeouts and retry policy.""" import httpx CONNECT_TIMEOUT_SECONDS = 5.0 READ_TIMEOUT_SECONDS = 60.0 ZILLIZ_TIMEOUT = (CONNECT_TIMEOUT_SECONDS, READ_TIMEOUT_SECONDS) OPENAI_TIMEOUT = httpx.Timeout(READ_TIMEOUT_SECONDS, connect=CONNECT_TIMEOUT_SECONDS) OPENAI_MAX_RETRIES = 1 class UpstreamTimeoutError(RuntimeError): def __init__(self): super().__init__("The search service took too long to respond. Please try again.")