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

Set endpoint value from env var #50

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Adamska1008
Copy link

@Adamska1008 Adamska1008 commented Mar 22, 2024

If environment variable HF_ENDPOINT exists, use it to build api.
fix #47

Copy link

@yosefl20 yosefl20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@kulame
Copy link

kulame commented Mar 29, 2024

When was this feature released, I also need this feature. HuggingFace is blocked in China

@Adamska1008
Copy link
Author

Adamska1008 commented Mar 29, 2024

When was this feature released, I also need this feature. HuggingFace is blocked in China

Never know, not one of the maintainers. The crate hasn't released new version for six months.

@kulame
Copy link

kulame commented Mar 29, 2024

When was this feature released, I also need this feature. HuggingFace is blocked in China

Never know, not one of the maintainers. The crate hasn't been updated for six months.

Perhaps we need fork a chinese version

@pi314ever
Copy link

Adding this to tokio.rs would be nice as well so that the changes are symmetrical.

@theta-lin
Copy link

@Narsil @McPatate Dear maintainers, this feature is very important for people living in places where https://huggingface.co/ is blocked such as in China. A very easy workaround in these situations is to set HF_ENDPOINT to a mirror site such as https://hf-mirror.com/.

There are of course other ways to access Hugging Face when it is blocked. Unfortunately that requires the usage of proxy or VPN, which might be troublesome to set up considering that downstream projects like text-embeddings-inference are frequently run on containers and servers.

Copy link
Member

@McPatate McPatate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! small nit on the code

src/api/sync.rs Outdated Show resolved Hide resolved
@dvaldivia
Copy link

Seems like the comment has been taken care of @McPatate can you take a look?

@sidharthrajaram
Copy link

+1 on this PR! Thanks @Adamska1008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support mirror
8 participants