ai.clients.Retry
class in the ai package.
Reference version
Signature
class ai.clients.RetrySource:<builtin>/ai/ns_clients/clients.bamlbytes 6512–11285
Fields
Static methods
function
new
(inner: ai.Client,
max_attempts: int = …,
retry_if: ((ai.errors.Failure) -> bool throws never) | null = …,
backoff: ai.clients.Backoff | null = …
) -> ai.clients.Retry
Instance methods
function
_attempt
() -> ai.ModelTurn throws baml.errors.Timeout | baml.errors.UnknownError | reflect.errors.CompilationError | ai.errors.Failure
Implementations
ai.Client for ai.clients.Retry
Instance methods
function
id
(self) -> stringfunction
invoke
(self,
input: ai.ModelTurnInput
) -> ai.ModelTurn throws baml.errors.Timeout | baml.errors.UnknownError | reflect.errors.CompilationError | ai.errors.Failure
function
render
(self,
input: ai.ModelTurnInput
) -> baml.http.Request throws baml.errors.Timeout | baml.errors.UnknownError | reflect.errors.CompilationError | ai.errors.Failure
Rendering is a pure preview of the inner client. It deliberately does not apply retry policy or backoff because no request is sent.
Source:<builtin>/ai/ns_clients/clients.bamlbytes 8192–9142
ai.stream.StreamingClient for ai.clients.Retry
Instance methods
Source:<builtin>/ai/ns_clients/clients.bamlbytes 9148–11283