fix vertex use async func to set auth creds

This commit is contained in:
Ishaan Jaff 2024-09-10 16:12:18 -07:00
parent 26ae86e59b
commit 1c6f8b1be2
8 changed files with 420 additions and 230 deletions

View file

@ -150,8 +150,15 @@ async def vertex_proxy_route(
base_target_url = f"https://{vertex_location}-aiplatform.googleapis.com/"
_auth_header, vertex_project = (
await vertex_fine_tuning_apis_instance._ensure_access_token_async(
credentials=vertex_credentials, project_id=vertex_project
)
)
auth_header, _ = vertex_fine_tuning_apis_instance._get_token_and_url(
model="",
auth_header=_auth_header,
gemini_api_key=None,
vertex_credentials=vertex_credentials,
vertex_project=vertex_project,