mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
expose vertex ai and hf api base as env var
This commit is contained in:
parent
4f7a35cbef
commit
9ef0ad9e66
5 changed files with 31 additions and 6 deletions
|
@ -49,6 +49,8 @@ def completion(
|
|||
completion_url = api_base
|
||||
elif "HF_API_BASE" in os.environ:
|
||||
completion_url = os.getenv("HF_API_BASE", "")
|
||||
elif "HUGGINGFACE_API_BASE" in os.environ:
|
||||
completion_url = os.getenv("HUGGINGFACE_API_BASE", "")
|
||||
else:
|
||||
completion_url = f"https://api-inference.huggingface.co/models/{model}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue