nemoguardrails.http.runtime
Construction helpers for managed outbound HTTP clients.
Module Contents
Functions
API
Create a transport-neutral HTTP client with optional retry behavior.
When httpx_client is provided, it remains caller-owned and timeout,
limits, follow_redirects, and tls must retain their defaults.
retry_policy is still applied when supplied.
Parameters:
httpx_client
Optional caller-owned HTTPX client.
timeout
Total timeout for a client created by this function.
limits
Connection-pool limits for a client created by this function.
retry_policy
Optional policy applied to created or injected clients.
follow_redirects
Whether a client created by this function follows redirects.
tls
TLS settings for a client created by this function.
Returns: ClosableHTTPClient
A closable transport-neutral HTTP client.
Raises:
ValueError: If non-default owned-client options are supplied with an injected client.