deleteCache( )
Deletes KV cache files.
function deleteCache(params: { all: true } | { kvCacheKey: string; modelId?: string }): PromiseDescription
Deletes KV cache files.
Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
params | `{ all: true } | { kvCacheKey: string; modelId?: string }` | ✓ |
Returns
PromiseExamples
// Delete all caches
await deleteCache({ all: true });
// Delete entire cache key (all models)
await deleteCache({ kvCacheKey: "my-session" });
// Delete only specific model within cache key
await deleteCache({ kvCacheKey: "my-session", modelId: "model-abc123" });definePlugin( )
Helper function to define a plugin with full type inference. This is an identity function that provides type checking.
downloadAsset( )
Downloads an asset (model file) without loading it into memory. This function is specifically designed for download-only operations and doesn't accept runtime configuration options like modelConfig or delegate. Use this for download-only operations instead of loadModel for better semantic clarity.