Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions vertexai/_genai/a2a_task_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ def append(

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

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _ListAgentEngineTaskEventsRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -328,7 +332,9 @@ async def append(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _AppendAgentEngineTaskEventRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -417,7 +423,9 @@ async def _list(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _ListAgentEngineTaskEventsRequestParameters_to_vertex(
parameter_model
Expand Down
32 changes: 24 additions & 8 deletions vertexai/_genai/a2a_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def delete(

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

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _GetAgentEngineTaskRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -304,7 +308,9 @@ def _list(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _ListAgentEngineTasksRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -390,7 +396,9 @@ def create(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _CreateAgentEngineTaskRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -517,7 +525,9 @@ async def delete(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _DeleteAgentEngineTaskRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -573,7 +583,9 @@ async def get(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _GetAgentEngineTaskRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -657,7 +669,9 @@ async def _list(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _ListAgentEngineTasksRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -745,7 +759,9 @@ async def create(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _CreateAgentEngineTaskRequestParameters_to_vertex(
parameter_model
Expand Down
80 changes: 60 additions & 20 deletions vertexai/_genai/agent_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,9 @@ def cancel_query_job(

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

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _CheckQueryJobAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -923,7 +927,9 @@ def _run_query_job(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _RunQueryJobAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -994,7 +1000,9 @@ def _create(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _CreateAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -1084,7 +1092,9 @@ def _delete(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _DeleteAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -1153,7 +1163,9 @@ def _get(

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

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

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

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

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _UpdateAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -3125,7 +3145,9 @@ async def cancel_query_job(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _CancelQueryJobAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -3199,7 +3221,9 @@ async def _check_query_job(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _CheckQueryJobAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -3276,7 +3300,9 @@ async def _run_query_job(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _RunQueryJobAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -3349,7 +3375,9 @@ async def _create(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _CreateAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -3441,7 +3469,9 @@ async def _delete(

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _DeleteAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down Expand Up @@ -3512,7 +3542,9 @@ async def _get(

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

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

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

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

request_url_dict: Optional[dict[str, str]]
if not self._api_client.vertexai:
raise ValueError("This method is only supported in the Vertex AI client.")
raise ValueError(
"This method is only supported in the Gemini Enterprise Agent Platform (previously known as Vertex AI) client."
)
else:
request_dict = _UpdateAgentEngineRequestParameters_to_vertex(
parameter_model
Expand Down
Loading
Loading