LiteRtLmWebRuntime class abstract interface

The page's @litert-lm/core embedding runtime, as the pass uses it.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
missingMembers → List<String>
What window.EmbeddingEngine lacks of what this release calls, after ensureReady reported LiteRtLmWebRuntimeState.runtimeIncomplete; empty otherwise.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

create(LiteRtLmWebEngineSettings settings) → Future<LiteRtLmWebEngine>
EmbeddingEngine.create(settings).
ensureReady() → Future<LiteRtLmWebRuntimeState>
Waits for the page's loader (window.litertLmReady) when there is one, then reports whether window.EmbeddingEngine exists. Throws when the loader itself failed (the module could not be imported).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readPrefix(String url, int length) → Future<Uint8List>
The first length bytes of what url serves — fewer when it is shorter — read from the start of the response, the rest cancelled: the container header of a bundle of hundreds of MB costs a few KB. Throws when the URL cannot be read.
toString() → String
A string representation of this object.
inherited
webGpuSupport() → Future<LiteRtLmWebGpuSupport>
Asks the browser for a WebGPU adapter as @litert-lm/core does before it creates a GPU engine (navigator.gpu.requestAdapter({ powerPreference: 'high-performance'})). Throws when the request itself fails.

Operators

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