77
88import httpx
99
10- from ..types import AgentRpcParams , agent_rpc_params , agent_list_params , agent_rpc_by_name_params
10+ from ..types import agent_rpc_params , agent_list_params , agent_rpc_by_name_params
1111from .._types import NOT_GIVEN , Body , Query , Headers , NotGiven
1212from .._utils import maybe_transform , async_maybe_transform
1313from .._compat import cached_property
2020)
2121from ..types .agent import Agent
2222from .._base_client import make_request_options
23- from ..types .agent_rpc_params import AgentRpcParams
24- from ..types .agent_rpc_response import AgentRpcResponse
2523from ..types .agent_list_response import AgentListResponse
2624
2725__all__ = ["AgentsResource" , "AsyncAgentsResource" ]
@@ -221,7 +219,7 @@ def rpc(
221219 agent_id : str ,
222220 * ,
223221 method : Literal ["event/send" , "task/create" , "message/send" , "task/cancel" ],
224- params : AgentRpcParams ,
222+ params : agent_rpc_params . Params ,
225223 id : Union [int , str , None ] | NotGiven = NOT_GIVEN ,
226224 jsonrpc : Literal ["2.0" ] | NotGiven = NOT_GIVEN ,
227225 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -230,13 +228,11 @@ def rpc(
230228 extra_query : Query | None = None ,
231229 extra_body : Body | None = None ,
232230 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
233- ) -> AgentRpcResponse :
231+ ) -> object :
234232 """
235233 Handle JSON-RPC requests for an agent by its unique ID.
236234
237235 Args:
238- params: The parameters for the agent RPC request
239-
240236 extra_headers: Send extra headers
241237
242238 extra_query: Add additional query parameters to the request
@@ -261,15 +257,15 @@ def rpc(
261257 options = make_request_options (
262258 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
263259 ),
264- cast_to = AgentRpcResponse ,
260+ cast_to = object ,
265261 )
266262
267263 def rpc_by_name (
268264 self ,
269265 agent_name : str ,
270266 * ,
271267 method : Literal ["event/send" , "task/create" , "message/send" , "task/cancel" ],
272- params : AgentRpcParams ,
268+ params : agent_rpc_by_name_params . Params ,
273269 id : Union [int , str , None ] | NotGiven = NOT_GIVEN ,
274270 jsonrpc : Literal ["2.0" ] | NotGiven = NOT_GIVEN ,
275271 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -278,13 +274,11 @@ def rpc_by_name(
278274 extra_query : Query | None = None ,
279275 extra_body : Body | None = None ,
280276 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
281- ) -> AgentRpcResponse :
277+ ) -> object :
282278 """
283279 Handle JSON-RPC requests for an agent by its unique name.
284280
285281 Args:
286- params: The parameters for the agent RPC request
287-
288282 extra_headers: Send extra headers
289283
290284 extra_query: Add additional query parameters to the request
@@ -309,7 +303,7 @@ def rpc_by_name(
309303 options = make_request_options (
310304 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
311305 ),
312- cast_to = AgentRpcResponse ,
306+ cast_to = object ,
313307 )
314308
315309
@@ -507,7 +501,7 @@ async def rpc(
507501 agent_id : str ,
508502 * ,
509503 method : Literal ["event/send" , "task/create" , "message/send" , "task/cancel" ],
510- params : AgentRpcParams ,
504+ params : agent_rpc_params . Params ,
511505 id : Union [int , str , None ] | NotGiven = NOT_GIVEN ,
512506 jsonrpc : Literal ["2.0" ] | NotGiven = NOT_GIVEN ,
513507 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -516,13 +510,11 @@ async def rpc(
516510 extra_query : Query | None = None ,
517511 extra_body : Body | None = None ,
518512 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
519- ) -> AgentRpcResponse :
513+ ) -> object :
520514 """
521515 Handle JSON-RPC requests for an agent by its unique ID.
522516
523517 Args:
524- params: The parameters for the agent RPC request
525-
526518 extra_headers: Send extra headers
527519
528520 extra_query: Add additional query parameters to the request
@@ -547,15 +539,15 @@ async def rpc(
547539 options = make_request_options (
548540 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
549541 ),
550- cast_to = AgentRpcResponse ,
542+ cast_to = object ,
551543 )
552544
553545 async def rpc_by_name (
554546 self ,
555547 agent_name : str ,
556548 * ,
557549 method : Literal ["event/send" , "task/create" , "message/send" , "task/cancel" ],
558- params : AgentRpcParams ,
550+ params : agent_rpc_by_name_params . Params ,
559551 id : Union [int , str , None ] | NotGiven = NOT_GIVEN ,
560552 jsonrpc : Literal ["2.0" ] | NotGiven = NOT_GIVEN ,
561553 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -564,13 +556,11 @@ async def rpc_by_name(
564556 extra_query : Query | None = None ,
565557 extra_body : Body | None = None ,
566558 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
567- ) -> AgentRpcResponse :
559+ ) -> object :
568560 """
569561 Handle JSON-RPC requests for an agent by its unique name.
570562
571563 Args:
572- params: The parameters for the agent RPC request
573-
574564 extra_headers: Send extra headers
575565
576566 extra_query: Add additional query parameters to the request
@@ -595,7 +585,7 @@ async def rpc_by_name(
595585 options = make_request_options (
596586 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
597587 ),
598- cast_to = AgentRpcResponse ,
588+ cast_to = object ,
599589 )
600590
601591
0 commit comments