ModelsApi class

The model registry: listing, registration, download, and placement.

Constructors

ModelsApi()
Bind the namespace. Reach it through RunAnywhere.models.
const

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

delete(String id) Future<void>
Remove id's files from disk and clear its registry path.
download(String id) Stream<DownloadEvent>
Fetch id to disk, reporting progress until it is registered.
get(String id) Future<ModelInfo?>
The registry entry for id, or null when it is unknown.
list([ModelFilter? filter]) Future<List<ModelInfo>>
Every registered model, narrowed by filter.
load(String id, {LoadOptions? options}) Future<LoadedModel>
Make id resident, paying the load cost now rather than on first use.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(ModelRegistration model) Future<ModelInfo>
Add model to the registry and return its entry.
state() Future<ModelsState>
What is loaded and how much storage the SDK occupies.
toString() String
A string representation of this object.
inherited
unload(String id) Future<void>
Release one resident model by id. Idempotent — a no-op when id is not loaded.
unloadAll([ModelCategory? category]) Future<void>
Unload the model resident under category, or every resident model when null. This is the only category/global unload; unload releases exactly one model by id.
unregister(String id) Future<void>
Remove id from the registry. Registration metadata only — id must already be unloaded and have no local artifacts.

Operators

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