|
33 | 33 | from ....types.chat.chat_completion_audio_param import ChatCompletionAudioParam |
34 | 34 | from ....types.chat.chat_completion_message_param import ChatCompletionMessageParam |
35 | 35 | from ....types.chat.chat_completion_stream_options_param import ChatCompletionStreamOptionsParam |
| 36 | +from ....types.chat.chat_completion_prediction_content_param import ChatCompletionPredictionContentParam |
36 | 37 | from ....types.chat.chat_completion_tool_choice_option_param import ChatCompletionToolChoiceOptionParam |
37 | 38 |
|
38 | 39 | __all__ = ["Completions", "AsyncCompletions"] |
@@ -76,6 +77,7 @@ def parse( |
76 | 77 | modalities: Optional[List[ChatCompletionModality]] | NotGiven = NOT_GIVEN, |
77 | 78 | n: Optional[int] | NotGiven = NOT_GIVEN, |
78 | 79 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
| 80 | + prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
79 | 81 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
80 | 82 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
81 | 83 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
@@ -169,6 +171,7 @@ def parser(raw_completion: ChatCompletion) -> ParsedChatCompletion[ResponseForma |
169 | 171 | "modalities": modalities, |
170 | 172 | "n": n, |
171 | 173 | "parallel_tool_calls": parallel_tool_calls, |
| 174 | + "prediction": prediction, |
172 | 175 | "presence_penalty": presence_penalty, |
173 | 176 | "response_format": _type_to_response_format(response_format), |
174 | 177 | "seed": seed, |
@@ -217,6 +220,7 @@ def stream( |
217 | 220 | modalities: Optional[List[ChatCompletionModality]] | NotGiven = NOT_GIVEN, |
218 | 221 | n: Optional[int] | NotGiven = NOT_GIVEN, |
219 | 222 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
| 223 | + prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
220 | 224 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
221 | 225 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
222 | 226 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
@@ -281,6 +285,7 @@ def stream( |
281 | 285 | modalities=modalities, |
282 | 286 | n=n, |
283 | 287 | parallel_tool_calls=parallel_tool_calls, |
| 288 | + prediction=prediction, |
284 | 289 | presence_penalty=presence_penalty, |
285 | 290 | seed=seed, |
286 | 291 | service_tier=service_tier, |
@@ -343,6 +348,7 @@ async def parse( |
343 | 348 | modalities: Optional[List[ChatCompletionModality]] | NotGiven = NOT_GIVEN, |
344 | 349 | n: Optional[int] | NotGiven = NOT_GIVEN, |
345 | 350 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
| 351 | + prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
346 | 352 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
347 | 353 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
348 | 354 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
@@ -436,6 +442,7 @@ def parser(raw_completion: ChatCompletion) -> ParsedChatCompletion[ResponseForma |
436 | 442 | "modalities": modalities, |
437 | 443 | "n": n, |
438 | 444 | "parallel_tool_calls": parallel_tool_calls, |
| 445 | + "prediction": prediction, |
439 | 446 | "presence_penalty": presence_penalty, |
440 | 447 | "response_format": _type_to_response_format(response_format), |
441 | 448 | "seed": seed, |
@@ -484,6 +491,7 @@ def stream( |
484 | 491 | modalities: Optional[List[ChatCompletionModality]] | NotGiven = NOT_GIVEN, |
485 | 492 | n: Optional[int] | NotGiven = NOT_GIVEN, |
486 | 493 | parallel_tool_calls: bool | NotGiven = NOT_GIVEN, |
| 494 | + prediction: Optional[ChatCompletionPredictionContentParam] | NotGiven = NOT_GIVEN, |
487 | 495 | presence_penalty: Optional[float] | NotGiven = NOT_GIVEN, |
488 | 496 | seed: Optional[int] | NotGiven = NOT_GIVEN, |
489 | 497 | service_tier: Optional[Literal["auto", "default"]] | NotGiven = NOT_GIVEN, |
@@ -549,6 +557,7 @@ def stream( |
549 | 557 | modalities=modalities, |
550 | 558 | n=n, |
551 | 559 | parallel_tool_calls=parallel_tool_calls, |
| 560 | + prediction=prediction, |
552 | 561 | presence_penalty=presence_penalty, |
553 | 562 | seed=seed, |
554 | 563 | service_tier=service_tier, |
|
0 commit comments