Liking cljdoc? Tell your friends :D

toolnexus.media


clone-voiceclj/s

(clone-voice m args)
(clone-voice m args opts)
source

create-mediaclj/s

(create-media styles)
(create-media styles opts)

§7G createMedia. styles is one style or a seq of styles (maps, string- or keyword-keyed); a verb resolves to the FIRST style that declares it.

opts: :on-progress (fn [{:verb :jobId :status}]) — after every poll :http-client (fn [{:method :url :headers :body}]) -> {:status :body} — the transport seam (default koine.http/request). Unlike the LLM client's POST-only (url headers body) seam this one carries a method, because the poll is a GET. :env (fn [name]) -> value — ${VAR} lookup for header values (default koine.env/get-env).

§7G `createMedia`. `styles` is one style or a seq of styles (maps, string- or
keyword-keyed); a verb resolves to the FIRST style that declares it.

opts:
  :on-progress  (fn [{:verb :jobId :status}]) — after every poll
  :http-client  (fn [{:method :url :headers :body}]) -> {:status :body} — the
                transport seam (default koine.http/request). Unlike the LLM
                client's POST-only (url headers body) seam this one carries a
                method, because the poll is a GET.
  :env          (fn [name]) -> value — `${VAR}` lookup for header values
                (default koine.env/get-env).
sourceraw docstring

generateclj/s

(generate media verb args)
(generate media verb args {:keys [provider-options cancel]})

§7G engine — the generic function face. verb is the canonical verb name ("image" … "cloneVoice", string or keyword). args maps normalised arg names (keyword or string) to values. opts: :provider-options (map; its top-level keys overwrite the body last), :cancel (an atom or 0-arg fn — truthy ⇒ cancelled). Returns MediaResult {:files [..] :text? :jobId? :status}; throws ex-info with the §7G message on any failure.

§7G engine — the generic function face. `verb` is the canonical verb name
("image" … "cloneVoice", string or keyword). `args` maps normalised arg
names (keyword or string) to values. opts: `:provider-options` (map; its
top-level keys overwrite the body last), `:cancel` (an atom or 0-arg fn —
truthy ⇒ cancelled). Returns MediaResult `{:files [..] :text? :jobId? :status}`;
throws ex-info with the §7G message on any failure.
sourceraw docstring

imageclj/s

(image m args)
(image m args opts)
source

load-styleclj/s

(load-style path)

Read one style JSON file (§7G loadMediaStyle).

Read one style JSON file (§7G `loadMediaStyle`).
sourceraw docstring

media?clj/s

(media? x)

True for a value built by create-media.

True for a value built by `create-media`.
sourceraw docstring

percent-encodeclj/s

(percent-encode s)

RFC 3986: keep A-Z a-z 0-9 - . _ ~, every other UTF-8 byte as %XX.

RFC 3986: keep A-Z a-z 0-9 - . _ ~, every other UTF-8 byte as %XX.
sourceraw docstring

read-pathclj/s

(read-path v path)

§7G dotPath read: missing ⇒ nil. A segment of only digits indexes an array. The empty path "" is the whole value.

§7G dotPath read: missing ⇒ nil. A segment of only digits indexes an array.
The empty path "" is the whole value.
sourceraw docstring

speechclj/s

(speech m args)
(speech m args opts)
source

talkingclj/s

(talking m args)
(talking m args opts)
source

toolsclj/s

(tools media)

§7G — one Tool (source "media") per verb the media supports, in verbs.json order. Execute never throws: an engine error is an isError ToolResult.

§7G — one Tool (source "media") per verb the media supports, in verbs.json
order. Execute never throws: an engine error is an isError ToolResult.
sourceraw docstring

transcribeclj/s

(transcribe m args)
(transcribe m args opts)
source

verbsclj/s

conformance/media/verbs.json verbs, embedded verbatim (order, names, types, descriptions, required). A test reads the fixture and asserts equality.

conformance/media/verbs.json `verbs`, embedded verbatim (order, names, types,
descriptions, required). A test reads the fixture and asserts equality.
sourceraw docstring

videoclj/s

(video m args)
(video m args opts)
source

write-pathclj/s

(write-path v path value)

§7G dotPath write: creates objects, and arrays when the next segment is numeric (padding with nil). A scalar — or an array met by a non-numeric segment — on the path is replaced; an object met by a numeric segment is kept and the segment is written as a string key.

§7G dotPath write: creates objects, and arrays when the next segment is
numeric (padding with nil). A scalar — or an array met by a non-numeric
segment — on the path is replaced; an object met by a numeric segment is
kept and the segment is written as a string key.
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