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.

Convert an accumulator to a canonical Response map.
sourceraw docstring

citation-eventclj

(citation-event url & {:keys [title snippet]})

Emit one citation. Adapters that surface citations on a final SSE chunk (Perplexity is the first) return a vector ending in usage and end events; sdk/complete flattens multi-event return values from parse-stream-event.

Emit one citation. Adapters that surface citations on a final SSE
chunk (Perplexity is the first) return a vector ending in usage
and end events; sdk/complete flattens multi-event return values
from parse-stream-event.
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]})
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)
source

usage-eventclj

(usage-event usage)
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