mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
fix: support vertex path
This commit is contained in:
parent
09ee8c6e2d
commit
4e9e6a972b
1 changed files with 4 additions and 1 deletions
|
|
@ -790,7 +790,10 @@ class VertexLLM(BaseLLM):
|
|||
if credentials is not None and isinstance(credentials, str):
|
||||
import google.oauth2.service_account
|
||||
|
||||
json_obj = json.loads(credentials)
|
||||
if os.path.exists(credentials):
|
||||
json_obj = json.load(open(credentials))
|
||||
else:
|
||||
json_obj = json.loads(credentials)
|
||||
|
||||
creds = google.oauth2.service_account.Credentials.from_service_account_info(
|
||||
json_obj,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue