Class: ModelDownloader
Defined in: utils/createModelDownloader.ts:211
Accessors
entrypointFilename
Get Signature
get entrypointFilename(): string;
Defined in: utils/createModelDownloader.ts:258
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:265
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:272
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:281
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:285
Returns
number
downloadedSize
Get Signature
get downloadedSize(): number;
Defined in: utils/createModelDownloader.ts:291
Returns
number
Methods
download()
download(__namedParameters: {
signal?: AbortSignal;
}): Promise<string>;
Defined in: utils/createModelDownloader.ts:300
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:337
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
>