Liking cljdoc? Tell your friends :D

fractal.engine.adapter.fake

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.
raw docstring

fake-adapterclj

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

last-userclj

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

responderclj

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

text->call-recordclj

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