flutter_gemma library

Classes

CorruptionDetectionResult
Result of corruption detection
DiagnosticReport
Diagnostic information for troubleshooting
EmbeddingModel
Represents an embedding model instance.
ErrorHandlingResult
Result of error handling
EstimatedDimensions
Estimated image dimensions
FlutterGemmaPlugin
Interface for the FlutterGemma plugin.
FunctionCallParser
Unified parser for function calls in all formats:
FunctionCallResponse
Gemma3Specs
Gemma 3 SigLIP vision encoder specifications
GeneralVisionSpecs
General vision encoder specifications
ImageErrorHandler
Comprehensive error handling and debugging utilities for AI image processing to prevent corruption that causes repeating text patterns in model responses.
ImageProcessor
Comprehensive image processing utilities to prevent AI image corruption and ensure proper vision encoder compatibility.
ImageTokenizer
Handles proper image tokenization for multimodal AI models to prevent "Prompt contained 0 image tokens but received 1 images" errors and corruption that causes repeating text patterns.
InferenceChat
InferenceModel
Represents an LLM model instance.
InferenceModelSession
Session managing response generation from the model.
Message
ModelFileManager
ModelResponse
Base interface for model responses from InferenceChat Can be either TextResponse, FunctionCallResponse, or ThinkingResponse
MultimodalImageHandler
Main integration class for handling multimodal image processing in Flutter Gemma to prevent AI image corruption and repeating text pattern issues.
MultimodalImageResult
Result of multimodal image processing
PlatformService
ProcessedImage
Represents a processed image ready for AI model consumption
ResponseValidationResult
Result of response validation
RetrievalResult
TextResponse
Text token during streaming
ThinkingResponse
Thinking process content from the model
Tool
ValidationResult
Result of image validation
VectorStoreStats
VisionEncoderValidator
Validates images for compatibility with AI vision encoders to prevent corruption that causes models to interpret images as repeating text patterns.
VisionSpecs
Base class for vision encoder specifications

Enums

CorruptionAction
Actions to take when corruption is detected
ErrorType
Types of errors that can occur in image processing
MessageType
ModelFileType
ModelReplacePolicy
Policy for handling old models when switching to new ones
ModelType
PreferredBackend
ResponseAction
Actions to take for corrupted responses
VisionEncoderType
Vision encoder types with their specifications

Constants

supportedLoraRanks → const List<int>

Exceptions / Errors

ImageProcessingException
Exception thrown when image processing fails
ImageTokenizationException
Exception thrown when image tokenization fails
VisionEncoderValidationException
Exception thrown when validation fails