Fillings¶
The direct filling resolver is an advanced public API for callers that already know the finite set of saved text, chat, question, or named sampler-result references they need. The Fillings and Composition guide explains when to use it and how resolution behaves.
Resolve known references¶
chatsnack.resolve_fillings_a(references: Iterable[str], *, variables: Mapping[str, Any] | None = None, allow_chat: bool = False, allow_sampler: bool = False) -> dict[str, dict[str, Any]]
async
¶
Resolve static assets/result leaves; model fillings require explicit authority.
Accepts text.Name, chat.Name, question.Name, and sampler.Name.answer.field. Question and Sampler leaves retain their value types. Existing text/chat results and opaque namespace overrides keep their established behavior. Saved assets use the same callbacks as Chat and share Sampler evaluations for this invocation.
Errors¶
Resolution-time failures inherit from FillingError. Invalid arguments use
the usual TypeError or ValueError validation exceptions.
FillingError¶
chatsnack.FillingError
¶
Bases: RuntimeError
Raised when a requested filling cannot be safely resolved.
FillingAuthorityError¶
chatsnack.FillingAuthorityError
¶
Bases: FillingError
Raised before a resolver-scoped executable filling can call a model.
FillingLimitError¶
chatsnack.FillingLimitError
¶
Bases: FillingError
Raised when resolver-scoped recursive expansion exceeds a fixed bound.