Skip to content

Commit 18d97b6

Browse files
yyyu-googlecopybara-github
authored andcommitted
docs: update doc string to replace Vertex AI with Gemini Enterprise Agent Platform, update method error message to replace Vertex AI with Gemini Enterprise Agent Platform (previously known as Vertex AI), update converter error message to replace Vertex AI with Gemini Enterprise Agent Platform
PiperOrigin-RevId: 903967689
1 parent ffe7fc7 commit 18d97b6

12 files changed

Lines changed: 498 additions & 166 deletions

vertexai/_genai/a2a_task_events.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def append(
129129

130130
request_url_dict: Optional[dict[str, str]]
131131
if not self._api_client.vertexai:
132-
raise ValueError("This method is only supported in the Vertex AI client.")
132+
raise ValueError(
133+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
134+
)
133135
else:
134136
request_dict = _AppendAgentEngineTaskEventRequestParameters_to_vertex(
135137
parameter_model
@@ -216,7 +218,9 @@ def _list(
216218

217219
request_url_dict: Optional[dict[str, str]]
218220
if not self._api_client.vertexai:
219-
raise ValueError("This method is only supported in the Vertex AI client.")
221+
raise ValueError(
222+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
223+
)
220224
else:
221225
request_dict = _ListAgentEngineTaskEventsRequestParameters_to_vertex(
222226
parameter_model
@@ -328,7 +332,9 @@ async def append(
328332

329333
request_url_dict: Optional[dict[str, str]]
330334
if not self._api_client.vertexai:
331-
raise ValueError("This method is only supported in the Vertex AI client.")
335+
raise ValueError(
336+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
337+
)
332338
else:
333339
request_dict = _AppendAgentEngineTaskEventRequestParameters_to_vertex(
334340
parameter_model
@@ -417,7 +423,9 @@ async def _list(
417423

418424
request_url_dict: Optional[dict[str, str]]
419425
if not self._api_client.vertexai:
420-
raise ValueError("This method is only supported in the Vertex AI client.")
426+
raise ValueError(
427+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
428+
)
421429
else:
422430
request_dict = _ListAgentEngineTaskEventsRequestParameters_to_vertex(
423431
parameter_model

vertexai/_genai/a2a_tasks.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ def delete(
166166

167167
request_url_dict: Optional[dict[str, str]]
168168
if not self._api_client.vertexai:
169-
raise ValueError("This method is only supported in the Vertex AI client.")
169+
raise ValueError(
170+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
171+
)
170172
else:
171173
request_dict = _DeleteAgentEngineTaskRequestParameters_to_vertex(
172174
parameter_model
@@ -222,7 +224,9 @@ def get(
222224

223225
request_url_dict: Optional[dict[str, str]]
224226
if not self._api_client.vertexai:
225-
raise ValueError("This method is only supported in the Vertex AI client.")
227+
raise ValueError(
228+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
229+
)
226230
else:
227231
request_dict = _GetAgentEngineTaskRequestParameters_to_vertex(
228232
parameter_model
@@ -304,7 +308,9 @@ def _list(
304308

305309
request_url_dict: Optional[dict[str, str]]
306310
if not self._api_client.vertexai:
307-
raise ValueError("This method is only supported in the Vertex AI client.")
311+
raise ValueError(
312+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
313+
)
308314
else:
309315
request_dict = _ListAgentEngineTasksRequestParameters_to_vertex(
310316
parameter_model
@@ -390,7 +396,9 @@ def create(
390396

391397
request_url_dict: Optional[dict[str, str]]
392398
if not self._api_client.vertexai:
393-
raise ValueError("This method is only supported in the Vertex AI client.")
399+
raise ValueError(
400+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
401+
)
394402
else:
395403
request_dict = _CreateAgentEngineTaskRequestParameters_to_vertex(
396404
parameter_model
@@ -517,7 +525,9 @@ async def delete(
517525

518526
request_url_dict: Optional[dict[str, str]]
519527
if not self._api_client.vertexai:
520-
raise ValueError("This method is only supported in the Vertex AI client.")
528+
raise ValueError(
529+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
530+
)
521531
else:
522532
request_dict = _DeleteAgentEngineTaskRequestParameters_to_vertex(
523533
parameter_model
@@ -573,7 +583,9 @@ async def get(
573583

574584
request_url_dict: Optional[dict[str, str]]
575585
if not self._api_client.vertexai:
576-
raise ValueError("This method is only supported in the Vertex AI client.")
586+
raise ValueError(
587+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
588+
)
577589
else:
578590
request_dict = _GetAgentEngineTaskRequestParameters_to_vertex(
579591
parameter_model
@@ -657,7 +669,9 @@ async def _list(
657669

658670
request_url_dict: Optional[dict[str, str]]
659671
if not self._api_client.vertexai:
660-
raise ValueError("This method is only supported in the Vertex AI client.")
672+
raise ValueError(
673+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
674+
)
661675
else:
662676
request_dict = _ListAgentEngineTasksRequestParameters_to_vertex(
663677
parameter_model
@@ -745,7 +759,9 @@ async def create(
745759

746760
request_url_dict: Optional[dict[str, str]]
747761
if not self._api_client.vertexai:
748-
raise ValueError("This method is only supported in the Vertex AI client.")
762+
raise ValueError(
763+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
764+
)
749765
else:
750766
request_dict = _CreateAgentEngineTaskRequestParameters_to_vertex(
751767
parameter_model

vertexai/_genai/agent_engines.py

Lines changed: 60 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,9 @@ def cancel_query_job(
776776

777777
request_url_dict: Optional[dict[str, str]]
778778
if not self._api_client.vertexai:
779-
raise ValueError("This method is only supported in the Vertex AI client.")
779+
raise ValueError(
780+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
781+
)
780782
else:
781783
request_dict = _CancelQueryJobAgentEngineRequestParameters_to_vertex(
782784
parameter_model
@@ -848,7 +850,9 @@ def _check_query_job(
848850

849851
request_url_dict: Optional[dict[str, str]]
850852
if not self._api_client.vertexai:
851-
raise ValueError("This method is only supported in the Vertex AI client.")
853+
raise ValueError(
854+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
855+
)
852856
else:
853857
request_dict = _CheckQueryJobAgentEngineRequestParameters_to_vertex(
854858
parameter_model
@@ -923,7 +927,9 @@ def _run_query_job(
923927

924928
request_url_dict: Optional[dict[str, str]]
925929
if not self._api_client.vertexai:
926-
raise ValueError("This method is only supported in the Vertex AI client.")
930+
raise ValueError(
931+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
932+
)
927933
else:
928934
request_dict = _RunQueryJobAgentEngineRequestParameters_to_vertex(
929935
parameter_model
@@ -994,7 +1000,9 @@ def _create(
9941000

9951001
request_url_dict: Optional[dict[str, str]]
9961002
if not self._api_client.vertexai:
997-
raise ValueError("This method is only supported in the Vertex AI client.")
1003+
raise ValueError(
1004+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1005+
)
9981006
else:
9991007
request_dict = _CreateAgentEngineRequestParameters_to_vertex(
10001008
parameter_model
@@ -1084,7 +1092,9 @@ def _delete(
10841092

10851093
request_url_dict: Optional[dict[str, str]]
10861094
if not self._api_client.vertexai:
1087-
raise ValueError("This method is only supported in the Vertex AI client.")
1095+
raise ValueError(
1096+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1097+
)
10881098
else:
10891099
request_dict = _DeleteAgentEngineRequestParameters_to_vertex(
10901100
parameter_model
@@ -1153,7 +1163,9 @@ def _get(
11531163

11541164
request_url_dict: Optional[dict[str, str]]
11551165
if not self._api_client.vertexai:
1156-
raise ValueError("This method is only supported in the Vertex AI client.")
1166+
raise ValueError(
1167+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1168+
)
11571169
else:
11581170
request_dict = _GetAgentEngineRequestParameters_to_vertex(parameter_model)
11591171
request_url_dict = request_dict.get("_url")
@@ -1222,7 +1234,9 @@ def _list(
12221234

12231235
request_url_dict: Optional[dict[str, str]]
12241236
if not self._api_client.vertexai:
1225-
raise ValueError("This method is only supported in the Vertex AI client.")
1237+
raise ValueError(
1238+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1239+
)
12261240
else:
12271241
request_dict = _ListAgentEngineRequestParameters_to_vertex(parameter_model)
12281242
request_url_dict = request_dict.get("_url")
@@ -1291,7 +1305,9 @@ def _get_agent_operation(
12911305

12921306
request_url_dict: Optional[dict[str, str]]
12931307
if not self._api_client.vertexai:
1294-
raise ValueError("This method is only supported in the Vertex AI client.")
1308+
raise ValueError(
1309+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1310+
)
12951311
else:
12961312
request_dict = _GetAgentEngineOperationParameters_to_vertex(parameter_model)
12971313
request_url_dict = request_dict.get("_url")
@@ -1361,7 +1377,9 @@ def _query(
13611377

13621378
request_url_dict: Optional[dict[str, str]]
13631379
if not self._api_client.vertexai:
1364-
raise ValueError("This method is only supported in the Vertex AI client.")
1380+
raise ValueError(
1381+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1382+
)
13651383
else:
13661384
request_dict = _QueryAgentEngineRequestParameters_to_vertex(parameter_model)
13671385
request_url_dict = request_dict.get("_url")
@@ -1428,7 +1446,9 @@ def _update(
14281446

14291447
request_url_dict: Optional[dict[str, str]]
14301448
if not self._api_client.vertexai:
1431-
raise ValueError("This method is only supported in the Vertex AI client.")
1449+
raise ValueError(
1450+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
1451+
)
14321452
else:
14331453
request_dict = _UpdateAgentEngineRequestParameters_to_vertex(
14341454
parameter_model
@@ -3125,7 +3145,9 @@ async def cancel_query_job(
31253145

31263146
request_url_dict: Optional[dict[str, str]]
31273147
if not self._api_client.vertexai:
3128-
raise ValueError("This method is only supported in the Vertex AI client.")
3148+
raise ValueError(
3149+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3150+
)
31293151
else:
31303152
request_dict = _CancelQueryJobAgentEngineRequestParameters_to_vertex(
31313153
parameter_model
@@ -3199,7 +3221,9 @@ async def _check_query_job(
31993221

32003222
request_url_dict: Optional[dict[str, str]]
32013223
if not self._api_client.vertexai:
3202-
raise ValueError("This method is only supported in the Vertex AI client.")
3224+
raise ValueError(
3225+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3226+
)
32033227
else:
32043228
request_dict = _CheckQueryJobAgentEngineRequestParameters_to_vertex(
32053229
parameter_model
@@ -3276,7 +3300,9 @@ async def _run_query_job(
32763300

32773301
request_url_dict: Optional[dict[str, str]]
32783302
if not self._api_client.vertexai:
3279-
raise ValueError("This method is only supported in the Vertex AI client.")
3303+
raise ValueError(
3304+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3305+
)
32803306
else:
32813307
request_dict = _RunQueryJobAgentEngineRequestParameters_to_vertex(
32823308
parameter_model
@@ -3349,7 +3375,9 @@ async def _create(
33493375

33503376
request_url_dict: Optional[dict[str, str]]
33513377
if not self._api_client.vertexai:
3352-
raise ValueError("This method is only supported in the Vertex AI client.")
3378+
raise ValueError(
3379+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3380+
)
33533381
else:
33543382
request_dict = _CreateAgentEngineRequestParameters_to_vertex(
33553383
parameter_model
@@ -3441,7 +3469,9 @@ async def _delete(
34413469

34423470
request_url_dict: Optional[dict[str, str]]
34433471
if not self._api_client.vertexai:
3444-
raise ValueError("This method is only supported in the Vertex AI client.")
3472+
raise ValueError(
3473+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3474+
)
34453475
else:
34463476
request_dict = _DeleteAgentEngineRequestParameters_to_vertex(
34473477
parameter_model
@@ -3512,7 +3542,9 @@ async def _get(
35123542

35133543
request_url_dict: Optional[dict[str, str]]
35143544
if not self._api_client.vertexai:
3515-
raise ValueError("This method is only supported in the Vertex AI client.")
3545+
raise ValueError(
3546+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3547+
)
35163548
else:
35173549
request_dict = _GetAgentEngineRequestParameters_to_vertex(parameter_model)
35183550
request_url_dict = request_dict.get("_url")
@@ -3583,7 +3615,9 @@ async def _list(
35833615

35843616
request_url_dict: Optional[dict[str, str]]
35853617
if not self._api_client.vertexai:
3586-
raise ValueError("This method is only supported in the Vertex AI client.")
3618+
raise ValueError(
3619+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3620+
)
35873621
else:
35883622
request_dict = _ListAgentEngineRequestParameters_to_vertex(parameter_model)
35893623
request_url_dict = request_dict.get("_url")
@@ -3654,7 +3688,9 @@ async def _get_agent_operation(
36543688

36553689
request_url_dict: Optional[dict[str, str]]
36563690
if not self._api_client.vertexai:
3657-
raise ValueError("This method is only supported in the Vertex AI client.")
3691+
raise ValueError(
3692+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3693+
)
36583694
else:
36593695
request_dict = _GetAgentEngineOperationParameters_to_vertex(parameter_model)
36603696
request_url_dict = request_dict.get("_url")
@@ -3726,7 +3762,9 @@ async def _query(
37263762

37273763
request_url_dict: Optional[dict[str, str]]
37283764
if not self._api_client.vertexai:
3729-
raise ValueError("This method is only supported in the Vertex AI client.")
3765+
raise ValueError(
3766+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3767+
)
37303768
else:
37313769
request_dict = _QueryAgentEngineRequestParameters_to_vertex(parameter_model)
37323770
request_url_dict = request_dict.get("_url")
@@ -3795,7 +3833,9 @@ async def _update(
37953833

37963834
request_url_dict: Optional[dict[str, str]]
37973835
if not self._api_client.vertexai:
3798-
raise ValueError("This method is only supported in the Vertex AI client.")
3836+
raise ValueError(
3837+
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
3838+
)
37993839
else:
38003840
request_dict = _UpdateAgentEngineRequestParameters_to_vertex(
38013841
parameter_model

0 commit comments

Comments
 (0)