ai.clients.retry_attempt

One `Retry` attempt, as a span of its own: `attempt` counts from 1 and `client` is the member's `id()`. Run with `$trace = _attempt_trace()`, which captures only those inputs (`body` is recorded as an opaque closure), never the client, the prompt or an error's body. The attempt's requests are network spans under it, and each attempt's span ends before the next starts.

Reference version

Signature

function ai.clients.retry_attempt<T, E>(
attempt: int,
client: string,
body: () -> T throws E
) -> T throws E

One Retry attempt, as a span of its own: attempt counts from 1 and client is the member's id(). Run with $trace = _attempt_trace(), which captures only those inputs (body is recorded as an opaque closure), never the client, the prompt or an error's body. The attempt's requests are network spans under it, and each attempt's span ends before the next starts.

Source:<builtin>/ai/ns_clients/clients.bamlbytes 10191–10302