|
15 | 15 | from ...._resource import SyncAPIResource, AsyncAPIResource |
16 | 16 | from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper |
17 | 17 | from ...._streaming import Stream |
18 | | -from ....types.chat import completion_create_params |
| 18 | +from ....types.chat import ( |
| 19 | + ChatCompletionReasoningEffort, |
| 20 | + completion_create_params, |
| 21 | +) |
19 | 22 | from ...._base_client import make_request_options |
20 | 23 | from ....lib._parsing import ( |
21 | 24 | ResponseFormatT, |
@@ -79,6 +82,7 @@ def parse( |
79 | 82 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
80 | 83 | prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
81 | 84 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
| 85 | + reasoning_effort: ChatCompletionReasoningEffort | NotGiven = NOT_GIVEN, |
82 | 86 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
83 | 87 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
84 | 88 | stop: Union[Optional[str], List[str]] | NotGiven = NOT_GIVEN, |
@@ -173,6 +177,7 @@ def parser(raw_completion: ChatCompletion) -> ParsedChatCompletion[ResponseForma |
173 | 177 | "parallel_tool_calls": parallel_tool_calls, |
174 | 178 | "prediction": prediction, |
175 | 179 | "presence_penalty": presence_penalty, |
| 180 | + "reasoning_effort": reasoning_effort, |
176 | 181 | "response_format": _type_to_response_format(response_format), |
177 | 182 | "seed": seed, |
178 | 183 | "service_tier": service_tier, |
@@ -222,6 +227,7 @@ def stream( |
222 | 227 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
223 | 228 | prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
224 | 229 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
| 230 | + reasoning_effort: ChatCompletionReasoningEffort | NotGiven = NOT_GIVEN, |
225 | 231 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
226 | 232 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
227 | 233 | stop: Union[Optional[str], List[str]] | NotGiven = NOT_GIVEN, |
@@ -287,6 +293,7 @@ def stream( |
287 | 293 | parallel_tool_calls=parallel_tool_calls, |
288 | 294 | prediction=prediction, |
289 | 295 | presence_penalty=presence_penalty, |
| 296 | + reasoning_effort=reasoning_effort, |
290 | 297 | seed=seed, |
291 | 298 | service_tier=service_tier, |
292 | 299 | store=store, |
@@ -350,6 +357,7 @@ async def parse( |
350 | 357 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
351 | 358 | prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
352 | 359 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
| 360 | + reasoning_effort: ChatCompletionReasoningEffort | NotGiven = NOT_GIVEN, |
353 | 361 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
354 | 362 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
355 | 363 | stop: Union[Optional[str], List[str]] | NotGiven = NOT_GIVEN, |
@@ -444,6 +452,7 @@ def parser(raw_completion: ChatCompletion) -> ParsedChatCompletion[ResponseForma |
444 | 452 | "parallel_tool_calls": parallel_tool_calls, |
445 | 453 | "prediction": prediction, |
446 | 454 | "presence_penalty": presence_penalty, |
| 455 | + "reasoning_effort": reasoning_effort, |
447 | 456 | "response_format": _type_to_response_format(response_format), |
448 | 457 | "seed": seed, |
449 | 458 | "service_tier": service_tier, |
@@ -493,6 +502,7 @@ def stream( |
493 | 502 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
494 | 503 | prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
495 | 504 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
| 505 | + reasoning_effort: ChatCompletionReasoningEffort | NotGiven = NOT_GIVEN, |
496 | 506 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
497 | 507 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
498 | 508 | stop: Union[Optional[str], List[str]] | NotGiven = NOT_GIVEN, |
@@ -559,6 +569,7 @@ def stream( |
559 | 569 | parallel_tool_calls=parallel_tool_calls, |
560 | 570 | prediction=prediction, |
561 | 571 | presence_penalty=presence_penalty, |
| 572 | + reasoning_effort=reasoning_effort, |
562 | 573 | seed=seed, |
563 | 574 | service_tier=service_tier, |
564 | 575 | stop=stop, |
|
0 commit comments