nemoguardrails.llm.clients.base
Module Contents
Classes
Functions
Data
API
_base_url
_client
_custom_headers
_custom_query
_owns_client
provider_name
provider_url
async
async
async
async
staticmethod
staticmethod
async
async
Dataclass
body
headers
status_code
Return True if err is a RuntimeError caused by a stale loop binding.
CPython raises one of several messages when an httpx transport (or any asyncio primitive it owns) is reused on a loop other than the one it was created on:
- ‘Event loop is closed’ (BaseEventLoop._check_closed) when the original loop has been closed.
- ‘<asyncio.X object> is bound to a different event loop’ (Lock / Event / Semaphore / Queue) when the original loop is still alive.
- ‘got Future attached to a different loop’ / ‘Task got Future …’ when a Future created in another loop is awaited.
All three are transient: httpx invalidates the stale primitive on retry and rebuilds it in the running loop.