Class: ModelDownloader
Defined in: utils/createModelDownloader.ts:201
Accessors
entrypointFilename
Get Signature
get entrypointFilename(): string
Defined in: utils/createModelDownloader.ts:246
The filename of the entrypoint file that should be used to load the model.
Returns
string
entrypointFilePath
Get Signature
get entrypointFilePath(): string
Defined in: utils/createModelDownloader.ts:253
The full path to the entrypoint file that should be used to load the model.
Returns
string
splitBinaryParts
Get Signature
get splitBinaryParts(): undefined | number
Defined in: utils/createModelDownloader.ts:260
If the model is binary spliced from multiple parts, this will return the number of those binary parts.
Returns
undefined
| number
totalFiles
Get Signature
get totalFiles(): number
Defined in: utils/createModelDownloader.ts:269
The total number of files that will be saved to the directory. For split files, this will be the number of split parts, as multiple files will be saved. For binary-split files, this will be 1, as the parts will be spliced into a single file.
Returns
number
totalSize
Get Signature
get totalSize(): number
Defined in: utils/createModelDownloader.ts:273
Returns
number
downloadedSize
Get Signature
get downloadedSize(): number
Defined in: utils/createModelDownloader.ts:279
Returns
number
Methods
download()
download(__namedParameters: {
signal: AbortSignal;
}): Promise<string>
Defined in: utils/createModelDownloader.ts:288
Parameters
Parameter | Type |
---|---|
__namedParameters | { signal : AbortSignal ; } |
__namedParameters.signal ? | AbortSignal |
Returns
Promise
<string
>
The path to the entrypoint file that should be used to load the model
cancel()
cancel(__namedParameters: {
deleteTempFile: boolean;
}): Promise<void>
Defined in: utils/createModelDownloader.ts:325
Parameters
Parameter | Type | Description |
---|---|---|
__namedParameters | { deleteTempFile : boolean ; } | - |
__namedParameters.deleteTempFile ? | boolean | Delete the temporary file that was created during the download. Defaults to the value of deleteTempFileOnCancel in the constructor. |
Returns
Promise
<void
>