flutter_mind library

Classes

AiConfig
Base configuration for all AI generation requests in flutter_mind.
AiEngine
Contract that every AI engine must implement.
AiModel
Base sealed class for all AI models.
AiPreset
Ready-made Prompt presets for the most common AI use cases.
AiRequest
Represents a single request sent to an AI engine.
AiResponse
Represents the response returned from an AI engine.
ChatMessage
A single turn in a multi-turn conversation.
ClaudeModel
Known Anthropic Claude models.
CustomModel
A custom model identified by a raw string.
CustomThinkingBudget
A custom token budget for when the presets do not fit your needs.
FlutterMind
The main entry point for flutter_mind.
FlutterMindClient
The main entry point for flutter_mind.
GeminiConfig
Configuration for Google Gemini text generation requests.
GeminiEngine
AI engine for Google Gemini models.
GeminiModel
Known Google Gemini text generation models.
InputValidator
Validates user input before sending to any AI engine.
MessageAnalyzer
Analyzes user messages to infer metadata before they are sent to the AI.
OpenAiModel
Known OpenAI models.
Prompt
Defines how the AI should behave and format its responses.
PromptExample
A single input/output example for few-shot prompting.
RetryConfig
Configures automatic retry behavior for failed AI engine requests.
ThinkingBudget
Controls how many tokens the model can spend on internal reasoning before producing a visible response.
ThinkingLevel
Predefined thinking levels for common use cases.

Enums

Capability
A feature that an AI model may or may not support.
ResponseFormat
The structure the AI should use when formatting its response.
ResponseLanguage
The language the AI should use in its response.
ResponseTone
The tone and style the AI should use when writing its response.
StopSignalMode
Controls how the model signals it has finished responding.

Typedefs

BeforeSendHook = Future<String> Function(String userMessage)
A function that enriches the user message before it is sent to the engine.

Exceptions / Errors

ConfigException
Thrown when the package is misconfigured at init time.
EngineException
Thrown when the AI engine fails to complete a request.
FlutterMindException
Base exception for all flutter_mind errors.
ValidationException
Thrown when the user message fails validation before being sent to the engine.