Liking cljdoc? Tell your friends :D

hyperphor.ellum.util


extract-and-parseclj

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

extract-clojureclj

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

extract-codeclj

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

extract-jsonclj

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

parse-sse-streamclj

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

read-json-safeclj

(read-json-safe s)
source

stream->channelclj

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