Skip to content

Commit

Permalink
added builder with_endpoint to tokio.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatarya committed Dec 13, 2024
1 parent e7d5f74 commit 9cf016a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ impl ApiBuilder {
self.progress = progress;
self
}

/// Changes the endpoint of the API. Default is `https://huggingface.co`.
pub fn with_endpoint(mut self, endpoint: String) -> Self {
self.endpoint = endpoint;
self
}

/// Changes the location of the cache directory. Defaults is `~/.cache/huggingface/`.
pub fn with_cache_dir(mut self, cache_dir: PathBuf) -> Self {
Expand Down

0 comments on commit 9cf016a

Please sign in to comment.