1616
1717PUBLIC_AGENT_CARD_PATH = '/.well-known/agent.json'
1818EXTENDED_AGENT_CARD_PATH = '/agent/authenticatedExtendedCard'
19- USER_INPUT = 'how much is 10 USD in INR?'
20- # USER_INPUT = 'My name is John Doe, email: john@example.com, phone: (555) 123-4567'
19+ # USER_INPUT = 'how much is 10 USD in INR?'
20+ USER_INPUT = 'My name is John Doe, email: john@example.com, phone: (555) 123-4567'
2121
2222
2323async def main () -> None :
@@ -27,7 +27,8 @@ async def main() -> None:
2727
2828 # --8<-- [start:A2ACardResolver]
2929
30- base_url = 'http://localhost:9000'
30+ #base_url = 'http://localhost:9000'
31+ base_url = "http://a2a-contact-extractor.localtest.me:8080"
3132
3233 async with httpx .AsyncClient () as httpx_client :
3334 # Initialize A2ACardResolver
@@ -109,7 +110,8 @@ async def main() -> None:
109110
110111 # --8<-- [start:send_message]
111112 client = A2AClient (
112- httpx_client = httpx_client , agent_card = final_agent_card_to_use
113+ #httpx_client=httpx_client, agent_card=final_agent_card_to_use
114+ httpx_client = httpx_client ,url = base_url
113115 )
114116 logger .info ('A2AClient initialized.' )
115117
@@ -122,12 +124,12 @@ async def main() -> None:
122124 'messageId' : uuid4 ().hex ,
123125 },
124126 }
125- request = SendMessageRequest (
126- id = str (uuid4 ()), params = MessageSendParams (** send_message_payload )
127- )
127+ # request = SendMessageRequest(
128+ # id=str(uuid4()), params=MessageSendParams(**send_message_payload)
129+ # )
128130
129- response = await client .send_message (request )
130- print (response .model_dump (mode = 'json' , exclude_none = True ))
131+ # response = await client.send_message(request)
132+ # print(response.model_dump(mode='json', exclude_none=True))
131133 # --8<-- [end:send_message]
132134
133135 # --8<-- [start:send_message_streaming]
0 commit comments