Merge pull request #4989 from ec2ainun/fix/proxy-vertex-path
fix: support vertex filepath on proxy litellm_params definition
This commit is contained in:
commit
34838a29f9
@ -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…
Reference in New Issue
Block a user