File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ class Client:
122122 def __init__ (
123123 self ,
124124 * ,
125+ api_key : Optional [str ] = None ,
125126 credentials : Optional [google .auth .credentials .Credentials ] = None ,
126127 project : Optional [str ] = None ,
127128 location : Optional [str ] = None ,
@@ -131,6 +132,9 @@ def __init__(
131132 """Initializes the client.
132133
133134 Args:
135+ api_key (str): The `API key
136+ <https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview#api-keys>`_
137+ to use for authentication. Applies to Vertex AI in express mode only.
134138 credentials (google.auth.credentials.Credentials): The credentials to use
135139 for authentication when calling the Vertex AI APIs. Credentials can be
136140 obtained from environment variables and default credentials. For more
@@ -156,6 +160,7 @@ def __init__(
156160
157161 self ._api_client = genai_client .Client ._get_api_client (
158162 vertexai = True ,
163+ api_key = api_key ,
159164 credentials = credentials ,
160165 project = project ,
161166 location = location ,
You can’t perform that action at this time.
0 commit comments