(extract-and-parse text)Try to extract JSON from LLM text output and return the parsed value. Returns parsed map/vector, or the raw string if extraction fails.
Try to extract JSON from LLM text output and return the parsed value. Returns parsed map/vector, or the raw string if extraction fails.
(extract-clojure s)Extract and read a Clojure/EDN code block from an LLM markdown response. Returns [data rest-of-text] or nil.
Extract and read a Clojure/EDN code block from an LLM markdown response. Returns [data rest-of-text] or nil.
(extract-code s)Extract a fenced code block from markdown text. Returns [type code rest-of-text] or nil if no block found.
Extract a fenced code block from markdown text. Returns [type code rest-of-text] or nil if no block found.
(extract-json s)Extract and parse JSON from an LLM markdown response. Returns [parsed-json rest-of-text] or nil.
Extract and parse JSON from an LLM markdown response. Returns [parsed-json rest-of-text] or nil.
(parse-sse-stream stream)Parse a Server-Sent Events input stream into a lazy seq of parsed data maps. Skips [DONE] markers and non-data lines.
Parse a Server-Sent Events input stream into a lazy seq of parsed data maps. Skips [DONE] markers and non-data lines.
(stream->channel stream ch)Read SSE stream into a core.async channel. Closes channel when stream ends.
Read SSE stream into a core.async channel. Closes channel when stream ends.
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 |