Liking cljdoc? Tell your friends :D

cl4cl.stream

Message stream events as data, and the fold that turns them back into the message a non-streaming call would have returned.

Message stream events as data, and the fold that turns them back into
the message a non-streaming call would have returned.
raw docstring

accumulateclj

(accumulate)
(accumulate message)
(accumulate message {:keys [type index] :as event})

A reducing function that folds event payloads into a message. Use it with reduce and an init of nil, or with transduce. Unknown event types are ignored.

A reducing function that folds event payloads into a message. Use it
with reduce and an init of nil, or with transduce. Unknown event types
are ignored.
sourceraw docstring

apply-deltacljmultimethod

Fold a content block delta into its block. Dispatches on the delta's :type; a type with no method leaves the block unchanged.

Fold a content block delta into its block. Dispatches on the delta's
:type; a type with no method leaves the block unchanged.
sourceraw docstring

payloadsclj

(payloads)

A transducer from the lines of a Messages SSE stream to event payloads such as {:type "content_block_delta" :index 0 :delta {...}}. Pings are dropped, and an error event is thrown as the ex-info it describes.

A transducer from the lines of a Messages SSE stream to event payloads
such as {:type "content_block_delta" :index 0 :delta {...}}. Pings are
dropped, and an error event is thrown as the ex-info it describes.
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