Liking cljdoc? Tell your friends :D

llm.sdk.sse

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.
raw docstring

data-payloadclj

(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.
sourceraw docstring

event->seqclj

(event->seq event)

Normalize provider parse-stream-event output to a sequence.

Normalize provider parse-stream-event output to a sequence.
sourceraw docstring

event-seqclj

(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.
sourceraw docstring

parse-json-dataclj

(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.
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