Liking cljdoc? Tell your friends :D

llm.sdk.stream

Streaming event taxonomy and reducer. Stream events → final canonical response. Preserves event order in output parts.

Streaming event taxonomy and reducer.
Stream events → final canonical response.
Preserves event order in output parts.
raw docstring

acc->responseclj

(acc->response acc provider model)

Convert an accumulator to a canonical Response map. A provider error event makes accumulation fail while retaining both the classified error and the response accumulated before the failure in ex-data.

Convert an accumulator to a canonical Response map. A provider error event
makes accumulation fail while retaining both the classified error and the
response accumulated before the failure in ex-data.
sourceraw docstring

citation-eventclj

(citation-event url
                &
                {:keys [title snippet text-range source-id date last-updated
                        source provider-data]})

Emit one citation. A URL is optional when the provider supplies another stable source identifier or provider-native metadata.

Emit one citation. A URL is optional when the provider supplies another
stable source identifier or provider-native metadata.
sourceraw docstring

content-deltaclj

(content-delta delta)
source

end-eventclj

(end-event & {:keys [finish-reason]})
source

error-eventclj

(error-event error)
source

events->responseclj

(events->response events provider model)

Convenience: reduce events and convert to response in one step.

Convenience: reduce events and convert to response in one step.
sourceraw docstring

provider-state-eventclj

(provider-state-event provider data)
source

reasoning-deltaclj

(reasoning-delta delta & {:keys [encrypted index signature]})
source

reduce-eventclj

(reduce-event acc event)

Reduce a single stream event into an accumulator.

Reduce a single stream event into an accumulator.
sourceraw docstring

reduce-eventsclj

(reduce-events events)

Reduce a sequence of stream events to an accumulator.

Reduce a sequence of stream events to an accumulator.
sourceraw docstring

start-eventclj

(start-event & {:keys [request-id]})
source

tool-call-deltaclj

(tool-call-delta index arguments-delta)
source

tool-call-endclj

(tool-call-end index)
source

tool-call-startclj

(tool-call-start index id name & {:keys [provider-data]})
source

usage-eventclj

(usage-event usage & {:keys [cost]})
source

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