Configuration utilities for HfHub.
Provides functions to access and manage configuration settings.
Summary
Functions
Gets the cache directory path.
Gets cache options.
Gets the HuggingFace Hub endpoint URL.
Gets HTTP client options.
Functions
@spec cache_dir() :: Path.t()
Gets the cache directory path.
Checks in order:
- Application configuration
- HF_HUB_CACHE environment variable
- HF_HOME environment variable
- Default: "~/.cache/huggingface"
Examples
cache_dir = HfHub.Config.cache_dir()
# => "/home/user/.cache/huggingface"
@spec cache_opts() :: keyword()
Gets cache options.
Examples
opts = HfHub.Config.cache_opts()
@spec endpoint() :: String.t()
Gets the HuggingFace Hub endpoint URL.
Defaults to "https://huggingface.co".
Examples
endpoint = HfHub.Config.endpoint()
# => "https://huggingface.co"
@spec http_opts() :: keyword()
Gets HTTP client options.
Examples
opts = HfHub.Config.http_opts()