L2 · FakeAdapter (05 §5, 10 §1) — the offline test backbone. A PURE function of the request (not a mutable queue), so scripted multi-step runs are deterministic and order-independent. Ignores opts (no streaming/retry); the loop's with-deadline still wraps it, so timeout behavior is uniform.
L2 · FakeAdapter (05 §5, 10 §1) — the offline test backbone. A PURE function of the request (not a mutable queue), so scripted multi-step runs are deterministic and order-independent. Ignores opts (no streaming/retry); the loop's with-deadline still wraps it, so timeout behavior is uniform.
(fake-adapter respond-fn)Construct a FakeAdapter from respond-fn : request → assistant-string |
call-record.
Construct a FakeAdapter from `respond-fn` : request → assistant-string | call-record.
(last-user request)The content of the last :user message in the (wire-shape) request — what a responder clause matches on.
The content of the last :user message in the (wire-shape) request — what a responder clause matches on.
(responder clauses)Build a respond-fn from [[match reply] …] clauses. match = a substring of
the last user message | a predicate on the request | :default. reply = an
assistant string | a call record | a fn of the request. First match wins;
pure (race-free under fan-out).
Build a respond-fn from `[[match reply] …]` clauses. `match` = a substring of the last user message | a predicate on the request | :default. `reply` = an assistant string | a call record | a fn of the request. First match wins; pure (race-free under fan-out).
(text->call-record text request)Wrap an assistant-text string as a well-formed honest-:unknown call record.
Wrap an assistant-text string as a well-formed honest-:unknown call record.
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 |