Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(downloader): support hf.co and hf:// URIs #4677

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

mudler
Copy link
Owner

@mudler mudler commented Jan 23, 2025

Description

This pull request includes updates to the pkg/downloader/uri.go file to support additional Hugging Face URL prefixes.
Now: hf.co/, and hf:// are accepted URIs prefix as well.
The changes include adding new constants for the prefixes, updating the URL detection logic, and modifying the URL resolution function to handle the new prefixes.

Support for additional Hugging Face URL prefixes:

  • pkg/downloader/uri.go: Added new constants HuggingFacePrefix1 and HuggingFacePrefix2 for additional Hugging Face URL formats.
  • pkg/downloader/uri.go: Updated the LooksLikeURL function to recognize the new Hugging Face URL prefixes.
  • pkg/downloader/uri.go: Modified the ResolveURL function to handle and correctly resolve URLs with the new Hugging Face URL prefixes.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 7482f7e
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/679261bd1d659b0008708ea0
😎 Deploy Preview https://deploy-preview-4677--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mudler mudler merged commit 8282414 into master Jan 24, 2025
25 checks passed
@mudler mudler deleted the chore/hfalias branch January 24, 2025 07:27
@mudler mudler added the enhancement New feature or request label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant