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.
(acc->response acc provider model)Convert an accumulator to a canonical Response map.
Convert an accumulator to a canonical Response map.
(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.
(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.
(reduce-event acc event)Reduce a single stream event into an accumulator.
Reduce a single stream event into an accumulator.
(reduce-events events)Reduce a sequence of stream events to an accumulator.
Reduce a sequence of stream events to an accumulator.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |