mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
add adaptor to fit both json string and json path for vertex_credentials
This commit is contained in:
parent
17b104eb02
commit
4f0dc669df
1 changed files with 4 additions and 1 deletions
|
@ -237,6 +237,9 @@ def completion(
|
|||
if vertex_credentials is not None and isinstance(vertex_credentials, str):
|
||||
import google.oauth2.service_account
|
||||
|
||||
try:
|
||||
json_obj = json.loads(vertex_credentials)
|
||||
except json.JSONDecodeError:
|
||||
json_obj = json.load(open(vertex_credentials))
|
||||
|
||||
creds = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue