ai.clients.Backoff

class in the ai package.

Reference version

Signature

class ai.clients.Backoff

Source:<builtin>/ai/ns_clients/clients.bamlbytes 34564443

Fields

initial_ms

int

multiplier

int

max_ms

int

Static methods

function

new

(
initial_ms: int = …,
multiplier: int = …,
max_ms: int = …
) -> ai.clients.Backoff throws never

Instance methods

function

delay_ms

(self, attempt: int, f: ai.errors.Failure) -> int throws never

The delay before attempt N (first retry is attempt 1). A ai.errors.RateLimited.retry_after_ms hint overrides the computed value.