fix(vertex_ai_anthropic.py): set vertex_credentials for vertex ai anthropic calls

allows setting vertex credentials as a json string for vertex ai anthropic calls
This commit is contained in:
Krrish Dholakia 2024-04-15 14:16:28 -07:00
parent 50081479f9
commit 1ec7118e1f
5 changed files with 36 additions and 14 deletions

View file

@ -270,6 +270,7 @@ def completion(
logging_obj,
vertex_project=None,
vertex_location=None,
vertex_credentials=None,
optional_params=None,
litellm_params=None,
logger_fn=None,
@ -348,6 +349,7 @@ def completion(
print_verbose(
f"VERTEX AI: vertex_project={vertex_project}; vertex_location={vertex_location}"
)
creds, _ = google.auth.default(quota_project_id=vertex_project)
print_verbose(
f"VERTEX AI: creds={creds}; google application credentials: {os.getenv('GOOGLE_APPLICATION_CREDENTIALS')}"