You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of litellm shows how to authenticate using JSON credentials. However, I only have access to an OAuth token. I would like to be able to do the following:
from google.oauth2.credentials import Credentials as OAuth2Credentials
temp_creds = OAuth2Credentials(credentials["token"])
cc = completion(
model="vertex_ai/gemini-1.5-flash",
vertex_project=credentials["project_id"],
vertex_location=credentials["region"],
vertex_credentials=temp_creds,
messages=[{"role": "user", "content": "Name 3 bright colours"}],
)
To implement this myself, I think I have to modify VertexBase.load_auth to handle cases other than JSON strings and files. However, I wanted to make this issue to double-check it hasn't already been implemented and that I'm going to modify the right file.
Motivation, pitch
Motivation is explained in feature description.
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered:
The Feature
The documentation of
litellm
shows how to authenticate using JSON credentials. However, I only have access to an OAuth token. I would like to be able to do the following:To implement this myself, I think I have to modify VertexBase.load_auth to handle cases other than JSON strings and files. However, I wanted to make this issue to double-check it hasn't already been implemented and that I'm going to modify the right file.
Motivation, pitch
Motivation is explained in feature description.
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: