Liking cljdoc? Tell your friends :D

llm.sdk.retry

Data-driven retry policy with jittered backoff.

Data-driven retry policy with jittered backoff.
raw docstring

default-policyclj

(default-policy)

Return a default retry policy map.

Return a default retry policy map.
sourceraw docstring

jittered-backoffclj

(jittered-backoff attempt
                  &
                  {:keys [base-delay-ms max-delay-ms jitter-ratio]
                   :or
                     {base-delay-ms 5000 max-delay-ms 120000 jitter-ratio 0.5}})

Compute a jittered exponential backoff delay in milliseconds. attempt is 1-based.

Compute a jittered exponential backoff delay in milliseconds.
attempt is 1-based.
sourceraw docstring

parse-retry-afterclj

(parse-retry-after value)
(parse-retry-after value now)

Parse a Retry-After delay-seconds or RFC 1123 HTTP-date value. Returns a nonnegative delay in milliseconds, or nil if unparseable. The two-argument arity accepts the current Instant for deterministic use.

Parse a Retry-After delay-seconds or RFC 1123 HTTP-date value.
Returns a nonnegative delay in milliseconds, or nil if unparseable.
The two-argument arity accepts the current Instant for deterministic use.
sourceraw docstring

should-retry?clj

(should-retry? error policy attempt)

Given a classified error and a retry policy, decide whether to retry. Also returns the delay if retrying.

Given a classified error and a retry policy, decide whether to retry.
Also returns the delay if retrying.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close