AiDatasource class abstract Data Sources

Abstract interface for AI provider datasources.

All AI providers (Claude, OpenAI, Gemini) implement this interface, allowing the app to swap providers without changing consumer code.

Implementers

Constructors

AiDatasource()

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

isConfigured() Future<bool>
Whether the provider is configured (API key stored or OAuth signed in).
listModels() Future<List<AiModel>>
Fetch available models from the provider's API.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage({required String systemPrompt, required List<Map<String, String>> messages, int maxTokens}) Future<String>
Send messages and return the complete assistant response.
streamMessage({required String systemPrompt, required List<Map<String, String>> messages, int maxTokens}) Stream<String>
Stream a response, yielding text deltas as they arrive.
toString() String
A string representation of this object.
inherited

Operators

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