Liking cljdoc? Tell your friends :D

llm.sdk.rate-limit

Rate-limit header parsing and tracking.

Rate-limit header parsing and tracking.
raw docstring

get-stateclj

(get-state provider)

Get last known rate-limit state for a provider.

Get last known rate-limit state for a provider.
sourceraw docstring

parse-header-floatclj

(parse-header-float headers key)
source

parse-header-intclj

(parse-header-int headers key)
source

parse-rate-limit-headersclj

(parse-rate-limit-headers headers)

Parse standard x-ratelimit-* headers from a response headers map. Returns a map with request and token bucket info.

Parse standard x-ratelimit-* headers from a response headers map.
Returns a map with request and token bucket info.
sourceraw docstring

throttled?clj

(throttled? provider)

Check if a provider appears throttled based on last known state. Conservative: returns true if remaining requests is 0 or very low.

Check if a provider appears throttled based on last known state.
Conservative: returns true if remaining requests is 0 or very low.
sourceraw docstring

track!clj

(track! provider headers)

Track rate-limit state for a provider.

Track rate-limit state for a provider.
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