Class ServiceConfig.Hf
- All Implemented Interfaces:
ServiceConfig
- Enclosing interface:
ServiceConfig
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServiceConfig
ServiceConfig.AliyunDrive, ServiceConfig.Alluxio, ServiceConfig.Azblob, ServiceConfig.Azdls, ServiceConfig.Azfile, ServiceConfig.B2, ServiceConfig.Cacache, ServiceConfig.CloudflareKv, ServiceConfig.Compfs, ServiceConfig.Cos, ServiceConfig.D1, ServiceConfig.Dashmap, ServiceConfig.Dbfs, ServiceConfig.Dropbox, ServiceConfig.Etcd, ServiceConfig.Foyer, ServiceConfig.Fs, ServiceConfig.Gcs, ServiceConfig.GcsGrpc, ServiceConfig.Gdrive, ServiceConfig.Ghac, ServiceConfig.Github, ServiceConfig.Goosefs, ServiceConfig.Gridfs, ServiceConfig.HdfsNative, ServiceConfig.Hf, ServiceConfig.Http, ServiceConfig.Ipfs, ServiceConfig.Ipmfs, ServiceConfig.Koofr, ServiceConfig.Lakefs, ServiceConfig.Memcached, ServiceConfig.Memory, ServiceConfig.MiniMoka, ServiceConfig.Moka, ServiceConfig.Mongodb, ServiceConfig.Monoiofs, ServiceConfig.Mysql, ServiceConfig.Obs, ServiceConfig.Onedrive, ServiceConfig.Opfs, ServiceConfig.Oss, ServiceConfig.Pcloud, ServiceConfig.Persy, ServiceConfig.Postgresql, ServiceConfig.Redb, ServiceConfig.Redis, ServiceConfig.S3, ServiceConfig.Seafile, ServiceConfig.Sftp, ServiceConfig.Sled, ServiceConfig.Sqlite, ServiceConfig.Surrealdb, ServiceConfig.Swift, ServiceConfig.Tos, ServiceConfig.Upyun, ServiceConfig.VercelArtifacts, ServiceConfig.VercelBlob, ServiceConfig.Webdav, ServiceConfig.Webhdfs, ServiceConfig.YandexDisk -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringDownload mode.final BooleanEnable caching of resolved HTTP download addresses and XET file metadata.final StringEndpoint of the Hugging Face Hub.final StringRepo id of this backend.final StringRepo type of this backend.final StringRevision of this backend.final StringRoot of this backend.final StringToken of this backend. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
downloadMode
Download mode. Either
xet(default) orhttp.When unset, the mode is resolved from the
HF_HUB_DISABLE_XETenvironment variable: a non-empty value forceshttp, otherwise it defaults toxet. An explicit value here takes precedence.See https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables#hfhubdisablexet.
-
enableResolveCache
Enable caching of resolved HTTP download addresses and XET file metadata.
Defaults to
false. Set totrueto share resolve results across readers on the same backend. Changed files may remain invisible while cached results are reused. A reader retains XET metadata from its first read for its lifetime. Create a new reader to resolve the path again when this option is disabled. See [HfBuilder::enable_resolve_cache] for freshness semantics. -
endpoint
Endpoint of the Hugging Face Hub.
The default is
https://huggingface.co. -
repoId
Repo id of this backend.
This is required.
-
repoType
Repo type of this backend. Required.
-
revision
Revision of this backend.
Default is main.
-
root
Root of this backend. Can be "/path/to/dir".
Default is "/".
-
token
Token of this backend.
This is optional.
-
-
Constructor Details
-
Hf
public Hf()
-
-
Method Details
-
scheme
Description copied from interface:ServiceConfigThe scheme of the service.- Specified by:
schemein interfaceServiceConfig- Returns:
- the scheme
-
configMap
Description copied from interface:ServiceConfigConvert the structured config to a type erased config map.- Specified by:
configMapin interfaceServiceConfig- Returns:
- the config map
-