33from __future__ import annotations
44
55import typing_extensions
6- from typing import Iterable
6+ from typing import Iterable , Optional
77
88import httpx
99
@@ -62,6 +62,7 @@ def create(
6262 self ,
6363 * ,
6464 agent_id : str ,
65+ request_id : Optional [str ] | Omit = omit ,
6566 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6667 # The extra values given here take precedence over values defined on the client or passed to this method.
6768 extra_headers : Headers | None = None ,
@@ -83,7 +84,13 @@ def create(
8384 """
8485 return self ._post (
8586 "/api/v1/chats/" ,
86- body = maybe_transform ({"agent_id" : agent_id }, chat_create_params .ChatCreateParams ),
87+ body = maybe_transform (
88+ {
89+ "agent_id" : agent_id ,
90+ "request_id" : request_id ,
91+ },
92+ chat_create_params .ChatCreateParams ,
93+ ),
8794 options = make_request_options (
8895 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
8996 ),
@@ -172,6 +179,7 @@ def create_completion(
172179 messages : Iterable [chat_create_completion_params .Message ],
173180 language : str | Omit = omit ,
174181 model : str | Omit = omit ,
182+ request_id : Optional [str ] | Omit = omit ,
175183 stream : bool | Omit = omit ,
176184 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
177185 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -202,6 +210,7 @@ def create_completion(
202210 "messages" : messages ,
203211 "language" : language ,
204212 "model" : model ,
213+ "request_id" : request_id ,
205214 "stream" : stream ,
206215 },
207216 chat_create_completion_params .ChatCreateCompletionParams ,
@@ -275,6 +284,7 @@ async def create(
275284 self ,
276285 * ,
277286 agent_id : str ,
287+ request_id : Optional [str ] | Omit = omit ,
278288 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
279289 # The extra values given here take precedence over values defined on the client or passed to this method.
280290 extra_headers : Headers | None = None ,
@@ -296,7 +306,13 @@ async def create(
296306 """
297307 return await self ._post (
298308 "/api/v1/chats/" ,
299- body = await async_maybe_transform ({"agent_id" : agent_id }, chat_create_params .ChatCreateParams ),
309+ body = await async_maybe_transform (
310+ {
311+ "agent_id" : agent_id ,
312+ "request_id" : request_id ,
313+ },
314+ chat_create_params .ChatCreateParams ,
315+ ),
300316 options = make_request_options (
301317 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
302318 ),
@@ -385,6 +401,7 @@ async def create_completion(
385401 messages : Iterable [chat_create_completion_params .Message ],
386402 language : str | Omit = omit ,
387403 model : str | Omit = omit ,
404+ request_id : Optional [str ] | Omit = omit ,
388405 stream : bool | Omit = omit ,
389406 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
390407 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -415,6 +432,7 @@ async def create_completion(
415432 "messages" : messages ,
416433 "language" : language ,
417434 "model" : model ,
435+ "request_id" : request_id ,
418436 "stream" : stream ,
419437 },
420438 chat_create_completion_params .ChatCreateCompletionParams ,
0 commit comments