File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -376,15 +376,17 @@ def _get_api_client(self) -> genai.client.BaseApiClient:
376
376
377
377
It needs to be instantiated inside each request so that the event loop
378
378
management can be properly propagated.
379
+
380
+ Returns:
381
+ An API client for the given project and location.
379
382
"""
380
- api_client = genai .client .BaseApiClient (
381
- vertexai = True , project = self ._project , location = self ._location
383
+ return genai .client .BaseApiClient (
384
+ vertexai = True ,
385
+ project = self ._project ,
386
+ location = self ._location ,
387
+ http_options = self ._api_client_http_options_override (),
382
388
)
383
389
384
- if new_options := self ._api_client_http_options_override ():
385
- api_client ._http_options = new_options
386
- return api_client
387
-
388
390
389
391
def _is_vertex_express_mode (
390
392
project : Optional [str ], location : Optional [str ]
You can’t perform that action at this time.
0 commit comments