1313 UploadFileResponse ,
1414 SessionEventLogListParams ,
1515 SessionEventLogListResponse ,
16- SessionEventLog ,
1716 UpdateSessionProfileParams ,
1817 SessionGetParams ,
1918)
@@ -26,11 +25,12 @@ def __init__(self, client):
2625 async def list (
2726 self ,
2827 session_id : str ,
29- params : SessionEventLogListParams = SessionEventLogListParams (),
30- ) -> List [SessionEventLog ]:
28+ params : Optional [SessionEventLogListParams ] = None ,
29+ ) -> SessionEventLogListResponse :
30+ params_obj = params or SessionEventLogListParams ()
3131 response = await self ._client .transport .get (
3232 self ._client ._build_url (f"/session/{ session_id } /event-logs" ),
33- params = params .model_dump (exclude_none = True , by_alias = True ),
33+ params = params_obj .model_dump (exclude_none = True , by_alias = True ),
3434 )
3535 return SessionEventLogListResponse (** response .data )
3636
@@ -54,11 +54,12 @@ async def create(self, params: CreateSessionParams = None) -> SessionDetail:
5454 return SessionDetail (** response .data )
5555
5656 async def get (
57- self , id : str , params : SessionGetParams = SessionGetParams ()
57+ self , id : str , params : Optional [ SessionGetParams ] = None
5858 ) -> SessionDetail :
59+ params_obj = params or SessionGetParams ()
5960 response = await self ._client .transport .get (
6061 self ._client ._build_url (f"/session/{ id } " ),
61- params = params .model_dump (exclude_none = True , by_alias = True ),
62+ params = params_obj .model_dump (exclude_none = True , by_alias = True ),
6263 )
6364 return SessionDetail (** response .data )
6465
@@ -69,11 +70,12 @@ async def stop(self, id: str) -> BasicResponse:
6970 return BasicResponse (** response .data )
7071
7172 async def list (
72- self , params : SessionListParams = SessionListParams ()
73+ self , params : Optional [ SessionListParams ] = None
7374 ) -> SessionListResponse :
75+ params_obj = params or SessionListParams ()
7476 response = await self ._client .transport .get (
7577 self ._client ._build_url ("/sessions" ),
76- params = params .model_dump (exclude_none = True , by_alias = True ),
78+ params = params_obj .model_dump (exclude_none = True , by_alias = True ),
7779 )
7880 return SessionListResponse (** response .data )
7981
0 commit comments