Skip to main content

Initializing

Named arguments, not an options object. Concurrent calls share one in-flight future rather than initializing twice.

Reading state

deviceId throws SDKException if read before initialize() has run. It does not return null or an empty string. Guard on isReady first.

Capabilities

Models

list and unloadAll take positional optional parameters, so it is list(filter) and unloadAll(category), not list(filter: filter).
You rarely need load directly. Generation auto-loads what it needs and downloads when options.model names a model that is absent.

LoRA

remove takes a positional optional adapter id; omit it to remove the current one.

Hugging Face token

Needed for gated or private repositories. Hold it in secure storage, never in source.

Events

Cancel the subscription in dispose.

Resetting

Unloads models, closes sessions, and clears state. Like initialize, concurrent calls share one in-flight future.