EmbeddingInstallationBuilder class

Fluent builder for embedding model installation

Installs a model plus its tokenizer (.tflite, .onnx, …), or a single .litertlm or .gguf container, which carries its own tokenizer. Automatically sets the installed model as the active embedding model.

Usage:

await FlutterEdgeAi.installEmbedder()
  .modelFromNetwork('https://example.com/model.tflite', token: 'hf_...')
  .tokenizerFromNetwork('https://example.com/tokenizer.model', token: 'hf_...')
  .withModelProgress((p) => print('Model: $p%'))
  .withTokenizerProgress((p) => print('Tokenizer: $p%'))
  .install();

// A .litertlm embedder installs alone:
await FlutterEdgeAi.installEmbedder()
  .modelFromNetwork('https://example.com/embedder.litertlm')
  .install();

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

install() → Future<EmbeddingInstallation>
Execute the installation and automatically set as active embedding model
modelFromAsset(String path, {String? filename}) → EmbeddingInstallationBuilder
Set model source from Flutter asset
modelFromBundled(String resourceName, {String? filename}) → EmbeddingInstallationBuilder
Set model source from bundled native resource
modelFromFile(String path, {String? filename}) → EmbeddingInstallationBuilder
Set model source from external file path
modelFromNetwork(String url, {String? token, String? filename}) → EmbeddingInstallationBuilder
Set model source from network URL (HTTP/HTTPS).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tokenizerFromAsset(String path, {String? filename}) → EmbeddingInstallationBuilder
Set tokenizer source from a Flutter asset.
tokenizerFromBundled(String resourceName, {String? filename}) → EmbeddingInstallationBuilder
Set tokenizer source from a bundled native resource.
tokenizerFromFile(String path, {String? filename}) → EmbeddingInstallationBuilder
Set tokenizer source from an external file path.
tokenizerFromNetwork(String url, {String? token, String? filename}) → EmbeddingInstallationBuilder
Set tokenizer source from network URL (HTTP/HTTPS).
toString() → String
A string representation of this object.
inherited
withCancelToken(CancelToken cancelToken) → EmbeddingInstallationBuilder
Set cancellation token for this installation
withModelProgress(void onProgress(int progress)) → EmbeddingInstallationBuilder
Add model file progress callback
withTokenizerProgress(void onProgress(int progress)) → EmbeddingInstallationBuilder
Add tokenizer file progress callback

Operators

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