Skip to content

Commit 5750f5d

Browse files
committed
Use model_copy for specific_extended_agent_card
1 parent ef115e6 commit 5750f5d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

examples/helloworld/__main__.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,15 @@
4444

4545
# This will be the authenticated extended agent card
4646
# It includes the additional 'extended_skill'
47-
specific_extended_agent_card = AgentCard(
48-
name='Hello World Agent - Extended Edition', # Different name for clarity
49-
description='The full-featured hello world agent for authenticated users.',
50-
url='http://localhost:9999/',
51-
version='1.0.1', # Could even be a different version
52-
defaultInputModes=['text'],
53-
defaultOutputModes=['text'],
54-
capabilities=AgentCapabilities(streaming=True), # Could have different capabilities
55-
skills=[skill, extended_skill], # Both skills for the extended card
56-
supportsAuthenticatedExtendedCard=True,
47+
specific_extended_agent_card = public_agent_card.model_copy(
48+
update={
49+
'name': 'Hello World Agent - Extended Edition', # Different name for clarity
50+
'description': 'The full-featured hello world agent for authenticated users.',
51+
'version': '1.0.1', # Could even be a different version
52+
# Capabilities and other fields like url, defaultInputModes, defaultOutputModes,
53+
# supportsAuthenticatedExtendedCard are inherited from public_agent_card unless specified here.
54+
'skills': [skill, extended_skill], # Both skills for the extended card
55+
}
5756
)
5857

5958
request_handler = DefaultRequestHandler(

0 commit comments

Comments
 (0)