Small SSE helpers shared by provider adapters.
This namespace owns standards-compliant event framing and JSON data extraction. Provider-specific event semantics stay in each adapter.
Small SSE helpers shared by provider adapters. This namespace owns standards-compliant event framing and JSON data extraction. Provider-specific event semantics stay in each adapter.
(data-payload record)Return the joined payload from an SSE event record, nil for a non-data
record or the OpenAI-style [DONE] terminal sentinel. Both data:value and
data: value are valid; repeated data fields are joined with a newline.
Return the joined payload from an SSE event record, nil for a non-data record or the OpenAI-style [DONE] terminal sentinel. Both `data:value` and `data: value` are valid; repeated data fields are joined with a newline.
(event->seq event)Normalize provider parse-stream-event output to a sequence.
Normalize provider parse-stream-event output to a sequence.
(event-seq lines)Frame raw input lines into SSE event records. Non-SSE lines are emitted individually so transports such as Ollama NDJSON keep their line semantics.
Frame raw input lines into SSE event records. Non-SSE lines are emitted individually so transports such as Ollama NDJSON keep their line semantics.
(parse-json-data record)Parse a JSON SSE event record into a keywordized map. Returns nil for non-data records, [DONE], empty data, or malformed JSON.
Parse a JSON SSE event record into a keywordized map. Returns nil for non-data records, [DONE], empty data, or malformed JSON.
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 |