Skip to content

Commit f51693a

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
fix:Update default input and output modes in create_agent_card
PiperOrigin-RevId: 833430255
1 parent 28499a9 commit f51693a

File tree

1 file changed

+6
-2
lines changed
  • vertexai/preview/reasoning_engines/templates

1 file changed

+6
-2
lines changed

vertexai/preview/reasoning_engines/templates/a2a.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
def create_agent_card(
5252
agent_name: Optional[str] = None,
5353
description: Optional[str] = None,
54+
default_input_modes: Optional[List[str]] = None,
55+
default_output_modes: Optional[List[str]] = None,
5456
skills: Optional[List["AgentSkill"]] = None,
5557
agent_card: Optional[Dict[str, Any]] = None,
5658
) -> "AgentCard":
@@ -65,6 +67,8 @@ def create_agent_card(
6567
Args:
6668
agent_name (Optional[str]): The name of the agent.
6769
description (Optional[str]): A description of the agent.
70+
default_input_modes (Optional[List[str]]): A list of default input modes.
71+
default_output_modes (Optional[List[str]]): A list of default output modes.
6872
skills (Optional[List[AgentSkill]]): A list of AgentSkills.
6973
agent_card (Optional[Dict[str, Any]]): Agent Card as a dictionary.
7074
@@ -88,8 +92,8 @@ def create_agent_card(
8892
description=description,
8993
url="http://localhost:9999/",
9094
version="1.0.0",
91-
default_input_modes=["text"],
92-
default_output_modes=["text"],
95+
default_input_modes=default_input_modes or ["text/plain"],
96+
default_output_modes=default_output_modes or ["application/json"],
9397
# Agent Engine does not support streaming yet
9498
capabilities=AgentCapabilities(streaming=False),
9599
skills=skills,

0 commit comments

Comments
 (0)