mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
expose vertex ai and hf api base as env var
This commit is contained in:
parent
dbbe519e19
commit
1d86448b6a
5 changed files with 31 additions and 6 deletions
|
@ -749,8 +749,10 @@ def completion(
|
|||
raise Exception("vertexai import failed please run `pip install google-cloud-aiplatform`")
|
||||
from vertexai.preview.language_models import ChatModel, CodeChatModel, InputOutputTextPair
|
||||
|
||||
vertex_project = (litellm.vertex_project or get_secret("VERTEXAI_PROJECT"))
|
||||
vertex_location = (litellm.vertex_location or get_secret("VERTEXAI_LOCATION"))
|
||||
vertexai.init(
|
||||
project=litellm.vertex_project, location=litellm.vertex_location
|
||||
project=vertex_project, location=vertex_location
|
||||
)
|
||||
# vertexai does not use an API key, it looks for credentials.json in the environment
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue