foundry-local-sdk / ModelLoadManager
Manages the loading and unloading of models. Handles communication with the core system or an external service (future support).
new ModelLoadManager(coreInterop, externalServiceUrl?): ModelLoadManager;| Parameter | Type |
|---|---|
coreInterop |
CoreInterop |
externalServiceUrl? |
string |
ModelLoadManager
listLoaded(): Promise<string[]>;Lists the IDs of all currently loaded models.
Promise<string[]>
An array of loaded model IDs.
Error - If listing via external service fails or if JSON parsing fails.
load(modelId): Promise<void>;Loads a model into memory.
| Parameter | Type | Description |
|---|---|---|
modelId |
string |
The ID of the model to load. |
Promise<void>
Error - If loading via external service fails.
unload(modelId): Promise<void>;Unloads a model from memory.
| Parameter | Type | Description |
|---|---|---|
modelId |
string |
The ID of the model to unload. |
Promise<void>
Error - If unloading via external service fails.