Function downloadFileToCacheDir
- downloadFileToCacheDir(params): Promise<string>
Parameters
- params: {
cacheDir?: string;
fetch?: {
(input, init?): Promise<Response>;
(input, init?): Promise<Response>;
};
hubUrl?: string;
localFileOnly?: boolean;
path: string;
raw?: boolean;
repo: RepoDesignation;
revision?: string;
} & Partial<CredentialsParams>
Returns Promise<string>
Download a given file if it's not already present in the local cache. Matches Python's hf_hub_download behavior by using branch HEAD commits.