Adapter protocol¶
AdapterProtocol is the interface every model adapter implements, centred on
generate_chat(). Processors talk to models only through this protocol, so any
OpenAI-compatible backend can be wired in. For how to pass an adapter via the
adapter_factory pattern, see Getting started.
adapter_protocol ¶
Adapter protocol and types for model adapters.
GenerationLog
dataclass
¶
Token usage metadata for a generation call.
Source code in src/gaze/models/adapter_protocol.py
AdapterProtocol ¶
Bases: Protocol
Minimal interface required by AgenticProcessorBase.
Declared @runtime_checkable so an adapter instance can be validated
with isinstance (used by @beartype when an adapter is passed
directly to AgenticProcessorBase). isinstance checks only that the
required members are present, not their signatures.