AgentProvider class abstract
Base type for model-provider integrations.
See OpenRouterProvider and GeminiProvider for concrete
implementations. A provider knows how to turn a conversation into a
request and a streamed response into ProviderEvents; everything else —
plugging into ChatController — is handled here so each provider only
implements streamEvents.
- Implementers
Constructors
- AgentProvider()
-
Const constructor for subclasses.
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
-
asResponder(
{List< ChatMessage> history()?}) → AgentResponder -
Adapts this provider to AgentResponder, for ChatController's managed
send(). -
dispose(
) → void - Releases resources held by this provider.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
ChatController controller, String text, {List< Attachment> ? attachments}) → Future<void> -
Drives
controller's manual streaming API directly, so tool calls surface asToolCalls instead of being dropped. -
streamEvents(
List< ChatMessage> conversation) → Stream<ProviderEvent> -
Streams structured events for
conversation's next assistant turn. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited