LiteRtLmEngineOptions constructor
LiteRtLmEngineOptions({
- required JSAny model,
Implementation
external factory LiteRtLmEngineOptions({
/// `String` (blob:/https: URL) OR a JS `ReadableStream` / `Blob`.
/// Upstream `@litert-lm/core` accepts all three forms
/// (`Engine.create({model: string | ReadableStream | Blob})`,
/// per https://ai.google.dev/edge/litert-lm/js).
///
/// Typed `JSAny` so Dart can pass either `url.toJS` (blob URL path)
/// or a `ReadableStream` from `WebOPFSService.getStream` — required
/// for >2 GB models that would otherwise trip Chrome's
/// `ERR_BLOB_OUT_OF_MEMORY` blob-URL fetch limit.
required JSAny model,
});