@@ -33,28 +33,28 @@ class ThreadService(PublicApiService):
3333 async def create_thread (self , req : AgentThread .CreateRequest ) -> AgentThread .Thread :
3434 """Creates a thread and its database."""
3535 return await self ._client .request (
36- self ._client .threads .thread_service_create_thread_without_preload_content ,
37- self ._auth_header (),
38- AgentThread .Thread ,
36+ operation = self ._client .threads .thread_service_create_thread_without_preload_content ,
37+ headers = self ._auth_header (),
38+ response_class = AgentThread .Thread ,
3939 field = "thread" ,
4040 thread_service_create_thread_body = ThreadServiceCreateThreadBody .from_dict (to_json (req )),
4141 )
4242
4343 async def get_thread (self , thread_id : str ) -> AgentThread .Thread :
4444 return await self ._client .request (
45- self ._client .threads .thread_service_get_thread_without_preload_content ,
46- self ._auth_header (),
47- AgentThread .Thread ,
45+ operation = self ._client .threads .thread_service_get_thread_without_preload_content ,
46+ headers = self ._auth_header (),
47+ response_class = AgentThread .Thread ,
4848 field = "thread" ,
4949 thread_id = thread_id ,
5050 )
5151
5252 async def list_threads (self , req : AgentThread .ListRequest ) -> AgentThread .ListResponse :
5353 """The threads of one scope (every scope when empty), newest first."""
5454 return await self ._client .list (
55- self ._client .threads .thread_service_list_threads_without_preload_content ,
56- self ._auth_header (),
57- AgentThread .ListResponse ,
55+ operation = self ._client .threads .thread_service_list_threads_without_preload_content ,
56+ headers = self ._auth_header (),
57+ response_class = AgentThread .ListResponse ,
5858 items = "threads" ,
5959 page_token = req .page_token ,
6060 limit = req .limit ,
@@ -67,9 +67,9 @@ async def update_thread(self, req: AgentThread.UpdateRequest) -> AgentThread.Thr
6767 body = to_json (req )
6868 body .pop ("threadId" , None )
6969 return await self ._client .request (
70- self ._client .threads .thread_service_update_thread_without_preload_content ,
71- self ._auth_header (),
72- AgentThread .Thread ,
70+ operation = self ._client .threads .thread_service_update_thread_without_preload_content ,
71+ headers = self ._auth_header (),
72+ response_class = AgentThread .Thread ,
7373 field = "thread" ,
7474 thread_id = req .thread_id ,
7575 thread_service_update_thread_body = ThreadServiceUpdateThreadBody .from_dict (body ),
@@ -78,9 +78,9 @@ async def update_thread(self, req: AgentThread.UpdateRequest) -> AgentThread.Thr
7878 async def delete_thread (self , thread_id : str ) -> None :
7979 """Deletes the thread and its database."""
8080 await self ._client .request (
81- self ._client .threads .thread_service_delete_thread_without_preload_content ,
82- self ._auth_header (),
83- Empty ,
81+ operation = self ._client .threads .thread_service_delete_thread_without_preload_content ,
82+ headers = self ._auth_header (),
83+ response_class = Empty ,
8484 thread_id = thread_id ,
8585 )
8686
@@ -89,9 +89,9 @@ async def get_thread_items(
8989 ) -> AgentThread .GetItemsResponse :
9090 """The thread's chat items, oldest first unless `sort_order` says otherwise."""
9191 return await self ._client .list (
92- self ._client .threads .thread_service_get_thread_items_without_preload_content ,
93- self ._auth_header (),
94- AgentThread .GetItemsResponse ,
92+ operation = self ._client .threads .thread_service_get_thread_items_without_preload_content ,
93+ headers = self ._auth_header (),
94+ response_class = AgentThread .GetItemsResponse ,
9595 items = "items" ,
9696 page_token = req .page_token ,
9797 limit = req .limit ,
@@ -108,9 +108,9 @@ async def get_thread_tasks(self, req: AgentTask.GetTasksRequest) -> AgentTask.Ge
108108 else None
109109 )
110110 return await self ._client .list (
111- self ._client .threads .thread_service_get_thread_tasks_without_preload_content ,
112- self ._auth_header (),
113- AgentTask .GetTasksResponse ,
111+ operation = self ._client .threads .thread_service_get_thread_tasks_without_preload_content ,
112+ headers = self ._auth_header (),
113+ response_class = AgentTask .GetTasksResponse ,
114114 items = "tasks" ,
115115 page_token = req .page_token ,
116116 limit = req .limit ,
0 commit comments