-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Standardize HF_ACCESS_TOKEN -> HF_TOKEN #610
Conversation
Hi @Wauplin thanks for the PR, I'll handle the change to the secrets 👍 |
I think for legacy support, we should check The old |
Thanks @nsarrazin. I'm looking at the failed CI and I'm getting
Yes it was my intention to keep backward compatibility. I've done it in const HF_TOKEN = process.env.HF_TOKEN ?? process.env.HF_ACCESS_TOKEN; Feel free to directly push on my branch if it's easier. |
Thanks @nsarrazin! I did not see the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in the current state!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Updated the secrets, merging this! |
* Standardize HF_ACCESS_TOKEN -> HF_TOKEN * Replace HF_ACCESS_TOKEN by HF_TOKEN in .env * Add legacy support for HF_ACCESS_TOKEN --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
Same as huggingface/transformers.js#431 and huggingface/huggingface.js#391.
Related to slack thread (internal).
This PR standardizes the name of the environment variable used to make requests with a HF API token. The goal is to harmonize it across the HF ecosystem. For what I've seen, both
HF_TOKEN
andHF_ACCESS_TOKEN
are defined in this repo. What this PR does is:HF_ACCESS_TOKEN
toHF_TOKEN
=> the token used for api requestHF_TOKEN
toHF_DEPLOYMENT_TOKEN
=> the token used to deploy chat-ui to production. This looks like an internal secret.Given this switch, there is a chance that we mismatch an old
HF_TOKEN
(for deployment) with a newHF_TOKEN
(for api requests). Do we only need to change github secrets or is there a possibility that users conifgured chat-ui in their own environment with the oldHF_TOKEN
as environment variable? In that case, do you have an idea how to solve this? In any case, please let me know if there's anytime to change.TODO before merging update
HF_TOKEN => HF_DEPLOYMENT_TOKEN
andHF_ACCESS_TOKEN => HF_TOKEN
in Github repo secrets.cc @xenova @julien-c