Gemini Native API transport adapter. Handles thought signatures, streaming deltas, safety metadata. Preserves provider-specific replay state.
Gemini Native API transport adapter. Handles thought signatures, streaming deltas, safety metadata. Preserves provider-specific replay state.
(parse-stream-event-gemini _profile line)Parse one SSE line into a vector of canonical stream events.
Gemini's streaming chunks frequently bundle a content part and
usageMetadata and a finishReason in the same chunk (especially
the terminal one). Returning a vector — which sdk/complete flattens
via (sequential? ev) — keeps every event from a single chunk
addressable, instead of losing usage and finish to a cond that
only picks the first match.
Parse one SSE line into a vector of canonical stream events. Gemini's streaming chunks frequently bundle a content part *and* usageMetadata *and* a finishReason in the same chunk (especially the terminal one). Returning a vector — which sdk/complete flattens via `(sequential? ev)` — keeps every event from a single chunk addressable, instead of losing usage and finish to a `cond` that only picks the first match.
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 |