LiteRtLmWebEmbedderConfig class final

What the web LiteRtEmbeddingBackend.describe hands core for a .litertlm embedder. Hosted inline on the page, never sent across an isolate.

Constructors

LiteRtLmWebEmbedderConfig({required String modelPath, required String fileName, required LiteRtLmWebRuntime runtime, required Future<String> resolveUrl(String path), required void revokeUrl(String url), Set<EmbedderModality> declaredMedia = const {}, int visionTokensPerImage = liteRtLmDefaultVisionTokensPerImage, LiteRtLmWebBackend backend = LiteRtLmWebBackend.gpu, LiteRtLmWebBackend audioBackend = liteRtLmWebAudioBackend, @visibleForTesting int? minInputLength})
const

Properties

audioBackend → LiteRtLmWebBackend
The backend of the audio tower when audio is declared: liteRtLmWebAudioBackend unless the public EmbeddingEngineConfig asks for another; flutter_edge_ai_litertlm never changes it.
final
backend → LiteRtLmWebBackend
The backend of the text tower, and of the vision tower when images are declared: WebGPU. CPU is left selectable for the drive suite, which records that the pinned runtime still cannot load the bundles on it; the public web EmbeddingEngine refuses it.
final
declaredMedia → Set<EmbedderModality>
The media the caller declared: images create the vision tower, audio the audio tower (after the container header showed the bundle has an audio encoder).
final
fileName → String
The installed file's name, for messages (the path is a URL).
final
hashCode → int
The hash code for this object.
no setterinherited
minInputLength → int?
minInputLength; null leaves the runtime's default (= the max input length: one signature). Set only by the drive suite's measurement of short-text latency against memory.
final
modelPath → String
The path core registered for the installed bundle: a blob: or https: URL, or opfs://<file> under WebStorageMode.streaming.
final
resolveUrl → Future<String> Function(String path)
resolveWebModelUrl: opfs:// → blob:, anything else unchanged.
final
revokeUrl → void Function(String url)
URL.revokeObjectURL, for the blob: URL resolveUrl made from an opfs:// path — the pass owns that one. A path it did not resolve from opfs:// is never revoked.
final
runtime → LiteRtLmWebRuntime
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
visionTokensPerImage → int
Vision tokens per image (D25): 140 or 70, checked by describe().
final

Methods

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