The default provider: deterministic, offline, no credential, and scripted. See docs/llm.md § The stub is the default.
A :script entry is a full response map, or one of these shorthands:
"some text" a plain text answer
{:tool "kb_sentexes_matching" :input {…}} a tool-use turn (:id, :prose optional)
A caller with answer shapes of its own passes :expand, which sees each map entry
first.
The default provider: deterministic, offline, no credential, and scripted. See
docs/llm.md § The stub is the default.
A `:script` entry is a full response map, or one of these shorthands:
"some text" a plain text answer
{:tool "kb_sentexes_matching" :input {…}} a tool-use turn (`:id`, `:prose` optional)
A caller with answer shapes of its own passes `:expand`, which sees each map entry
first.The no-script answer: an end-of-turn response with no text.
The no-script answer: an end-of-turn response with no text.
(last-user-text p)The text of the newest user turn a stub provider saw.
The text of the newest user turn a stub provider saw.
(provider)(provider {:keys [script default log] own :expand})A stub Provider. opts:
:script a vector of turns (full response maps or the shorthands above)
:default the response for every turn past the script (default empty-response)
:expand (fn [entry i]) for the caller's own shorthands, called on a map entry:
a response map, or nil to leave the entry to the shorthands above
:log an atom the provider conjes each request onto, for assertions
The provider's meta carries :log and :cursor (the number of calls so far).
A stub `Provider`. `opts`:
:script a vector of turns (full response maps or the shorthands above)
:default the response for every turn past the script (default `empty-response`)
:expand `(fn [entry i])` for the caller's own shorthands, called on a map entry:
a response map, or nil to leave the entry to the shorthands above
:log an atom the provider `conj`es each request onto, for assertions
The provider's `meta` carries `:log` and `:cursor` (the number of calls so far).(requests p)The requests a stub provider has been handed, oldest first.
The requests a stub provider has been handed, oldest first.
(text-response text)A plain-text, end-of-turn response holding text.
A plain-text, end-of-turn response holding `text`.
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 |