mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-05-04 16:52:06 +00:00
Support HF_HUB_USER_AGENT_ORIGIN
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
This commit is contained in:
parent
aadd624933
commit
8fe851209c
@ -211,6 +211,9 @@ async fn main() -> Result<(), RouterError> {
|
||||
if let Ok(token) = std::env::var("HF_TOKEN") {
|
||||
builder = builder.with_token(token.into());
|
||||
}
|
||||
if let Ok(origin) = std::env::var("HF_HUB_USER_AGENT_ORIGIN") {
|
||||
builder = builder.with_user_agent("origin", origin.as_str());
|
||||
}
|
||||
builder
|
||||
};
|
||||
let api_repo = api_builder().build()?.repo(Repo::with_revision(
|
||||
|
Loading…
Reference in New Issue
Block a user