We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b280743 commit 10954caCopy full SHA for 10954ca
1 file changed
src/a2a/server/apps/jsonrpc/jsonrpc_app.py
@@ -156,7 +156,6 @@ class JSONRPCApplication(ABC):
156
"""
157
158
# Method-to-model mapping for centralized routing
159
- # Define the union type for all supported request models
160
A2ARequestModel = (
161
SendMessageRequest
162
| SendStreamingMessageRequest
@@ -170,8 +169,9 @@ class JSONRPCApplication(ABC):
170
169
| GetAuthenticatedExtendedCardRequest
171
)
172
173
- METHOD_TO_MODEL = {
174
- model.model_fields["method"].default: model for model in A2ARequestModel.__args__
+ METHOD_TO_MODEL: dict[str, type[A2ARequestModel]] = {
+ model.model_fields['method'].default: model
+ for model in A2ARequestModel.__args__
175
}
176
177
def __init__( # noqa: PLR0913
0 commit comments