A pure prompt format.
An adapter renders a signature, demonstrations, and inputs into a ReqLLM context and output descriptor, and parses a reply into a map of declared output fields. It never calls a model, retries, repairs, or falls back to another format. The caller validates the parsed map against the signature.
Summary
Types
A rendered request: the ReqLLM context and the output descriptor to request.
A reply to parse: raw response text for text output, or the validated structured value for object output.
Callbacks
Validates and normalizes adapter options once, when a model configuration is built.
Parses a reply into a string-keyed map of every declared output field.
Renders a request. Inputs are already normalized and validated.
Types
@type rendering() :: %{context: ReqLLM.Context.t(), output: ReqLLM.Output.t()}
A rendered request: the ReqLLM context and the output descriptor to request.
A reply to parse: raw response text for text output, or the validated structured value for object output.
Callbacks
@callback normalize_options(keyword()) :: {:ok, keyword()} | {:error, Exception.t()}
Validates and normalizes adapter options once, when a model configuration is built.
@callback parse(Tune.Signature.t(), reply(), keyword()) :: {:ok, map()} | {:error, Exception.t()}
Parses a reply into a string-keyed map of every declared output field.
@callback render(Tune.Signature.t(), [Tune.Demo.t()], map(), keyword()) :: {:ok, rendering()} | {:error, Exception.t()}
Renders a request. Inputs are already normalized and validated.