|
10 | 10 | import httpx |
11 | 11 | from a2a.server.apps import A2AStarletteApplication |
12 | 12 | from a2a.server.request_handlers import DefaultRequestHandler |
13 | | -from a2a.server.tasks import InMemoryTaskStore, InMemoryPushNotificationConfigStore, BasePushNotificationSender |
| 13 | +from a2a.server.tasks import ( |
| 14 | + InMemoryTaskStore, |
| 15 | + InMemoryPushNotificationConfigStore, |
| 16 | + BasePushNotificationSender, |
| 17 | +) |
14 | 18 | from a2a.types import AgentCapabilities, AgentCard, AgentSkill |
15 | 19 | from dotenv import load_dotenv |
16 | 20 | from pydantic import BaseModel, EmailStr, Field |
@@ -56,14 +60,15 @@ def main(host, port, result_type, instructions): |
56 | 60 | agent = ExtractorAgent(instructions=instructions, result_type=result_type) |
57 | 61 | httpx_client = httpx.AsyncClient() |
58 | 62 | push_notification_config_store = InMemoryPushNotificationConfigStore() |
59 | | - push_notification_sender = BasePushNotificationSender(httpx_client, |
60 | | - config_store=push_notification_config_store) |
| 63 | + push_notification_sender = BasePushNotificationSender( |
| 64 | + httpx_client, config_store=push_notification_config_store |
| 65 | + ) |
61 | 66 |
|
62 | 67 | request_handler = DefaultRequestHandler( |
63 | 68 | agent_executor=ExtractorAgentExecutor(agent=agent), |
64 | 69 | task_store=InMemoryTaskStore(), |
65 | 70 | push_config_store=push_notification_config_store, |
66 | | - push_sender=push_notification_sender |
| 71 | + push_sender=push_notification_sender, |
67 | 72 | ) |
68 | 73 | server = A2AStarletteApplication( |
69 | 74 | agent_card=get_agent_card(host, port), http_handler=request_handler |
|
0 commit comments