Class: ModelDownloader
Accessors
entrypointFilename
get entrypointFilename(): string
The filename of the entrypoint file that should be used to load the model.
Returns
string
Defined in
utils/createModelDownloader.ts:238
entrypointFilePath
get entrypointFilePath(): string
The full path to the entrypoint file that should be used to load the model.
Returns
string
Defined in
utils/createModelDownloader.ts:245
splitBinaryParts
get splitBinaryParts(): undefined | number
If the model is binary spliced from multiple parts, this will return the number of those binary parts.
Returns
undefined
| number
Defined in
utils/createModelDownloader.ts:252
totalFiles
get totalFiles(): number
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
Defined in
utils/createModelDownloader.ts:261
totalSize
get totalSize(): number
Returns
number
Defined in
utils/createModelDownloader.ts:265
downloadedSize
get downloadedSize(): number
Returns
number
Defined in
utils/createModelDownloader.ts:271
Methods
download()
download(__namedParameters: {
signal: AbortSignal;
}): Promise<string>
Parameters
Parameter | Type |
---|---|
__namedParameters | object |
__namedParameters.signal ? | AbortSignal |
Returns
Promise
<string
>
The path to the entrypoint file that should be used to load the model
Defined in
utils/createModelDownloader.ts:280
cancel()
cancel(__namedParameters: {
deleteTempFile: boolean;
}): Promise<void>
Parameters
Parameter | Type | Description |
---|---|---|
__namedParameters | object | - |
__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
>