LlmAdapter class abstract base

Bridge between LlmRequest and one provider's HTTP API.

Extend this to add a provider. Subclasses should throw AdapterException on non-2xx responses and otherwise return whatever the model produced without judging it; validation and retries happen upstream.

It is a base class rather than an interface so that it can grow. A method added here with a default body reaches every adapter without breaking it, which is what lets planned work (streaming, sampling) land in a minor release instead of a major one. Subclasses must themselves be base, final or sealed.

Implementers

Constructors

LlmAdapter()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Releases anything the adapter owns, typically the HTTP client it created when the caller did not supply one.
complete(LlmRequest request) Future<LlmResponse>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited