File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 11"""HTTP application components for the A2A server."""
2-
3- from a2a .server .apps .starlette_app import A2AStarletteApplication
4-
5-
6- __all__ = ['A2AStarletteApplication' ]
Original file line number Diff line number Diff line change 55
66from abc import ABC , abstractmethod
77from collections .abc import AsyncGenerator
8- from typing import Any
8+ from typing import Any , Union
99
1010from fastapi import FastAPI
1111from pydantic import ValidationError
@@ -385,14 +385,17 @@ def build(
385385 agent_card_url : str = '/.well-known/agent.json' ,
386386 rpc_url : str = '/' ,
387387 ** kwargs : Any ,
388- ) -> Starlette | FastAPI :
389- """Builds and returns the FastAPI application instance.
388+ ) -> Union [ FastAPI , Starlette ] :
389+ """Builds and returns the JSONRPC application instance.
390390
391391 Args:
392392 agent_card_url: The URL for the agent card endpoint.
393393 rpc_url: The URL for the A2A JSON-RPC endpoint
394394 **kwargs: Additional keyword arguments to pass to the FastAPI constructor.
395395
396396 Returns:
397- A configured FastAPI or Starlette application instance.
397+ A configured JSONRPC application instance.
398398 """
399+ raise NotImplementedError (
400+ 'Subclasses must implement the build method to create the application instance.'
401+ )
You can’t perform that action at this time.
0 commit comments