EdgeVeda class

Main Edge Veda SDK class for on-device AI inference

Uses Isolate.run() for all FFI calls to keep the UI responsive. Each operation creates a fresh native context in the background isolate. For streaming, uses a long-lived worker isolate via StreamingWorker.

Constructors

EdgeVeda()

Properties

config EdgeVedaConfig?
Current configuration
no setter
hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
Whether the SDK is initialized
no setter
isStreaming bool
Whether a streaming operation is currently in progress
no setter
isVisionInitialized bool
Whether vision is initialized
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

describeImage(Uint8List imageBytes, {required int width, required int height, String prompt = 'Describe this image.', GenerateOptions? options}) Future<String>
Describe an image using the VLM
dispose() Future<void>
Dispose and free all resources
disposeVision() Future<void>
Dispose vision resources
embed(String text) Future<EmbeddingResult>
Compute text embeddings using the loaded model
generate(String prompt, {GenerateOptions? options, Duration? timeout}) Future<GenerateResponse>
Generate text from a prompt
generateStream(String prompt, {GenerateOptions? options, CancelToken? cancelToken}) Stream<TokenChunk>
Generate text as a stream of tokens
getMemoryStats() Future<MemoryStats>
Get current memory statistics from native layer
init(EdgeVedaConfig config) Future<void>
Initialize Edge Veda with the given configuration
initVision(VisionConfig config) Future<void>
Initialize vision inference with VLM model
isMemoryPressure({double threshold = 0.8}) Future<bool>
Check if memory usage is above threshold
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