You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
534 B
Python
26 lines
534 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class A2ARpcRequest(BaseModel):
|
|
jsonrpc: str = "2.0"
|
|
id: str | int | None = None
|
|
method: str
|
|
params: dict[str, Any] = Field(default_factory=dict)
|
|
|
|
|
|
class A2ARpcError(BaseModel):
|
|
code: int
|
|
message: str
|
|
data: dict[str, Any] | None = None
|
|
|
|
|
|
class A2ARpcResponse(BaseModel):
|
|
jsonrpc: str = "2.0"
|
|
id: str | int | None = None
|
|
result: dict[str, Any] | None = None
|
|
error: A2ARpcError | None = None
|