|
61 | 61 | from openai.types.chat.chat_completion_content_part_image_param import ImageURL
|
62 | 62 | from openai.types.chat.chat_completion_content_part_input_audio_param import InputAudio
|
63 | 63 | from openai.types.chat.chat_completion_content_part_param import File, FileFile
|
| 64 | + from openai.types.chat.chat_completion_prediction_content_param import ChatCompletionPredictionContentParam |
64 | 65 | from openai.types.responses import ComputerToolParam, FileSearchToolParam, WebSearchToolParam
|
65 | 66 | from openai.types.responses.response_input_param import FunctionCallOutput, Message
|
66 | 67 | from openai.types.shared import ReasoningEffort
|
@@ -126,6 +127,12 @@ class OpenAIModelSettings(ModelSettings, total=False):
|
126 | 127 | For more information, see [OpenAI's service tiers documentation](https://platform.openai.com/docs/api-reference/chat/object#chat/object-service_tier).
|
127 | 128 | """
|
128 | 129 |
|
| 130 | + openai_prediction: ChatCompletionPredictionContentParam |
| 131 | + """Enables [predictive outputs](https://platform.openai.com/docs/guides/predicted-outputs). |
| 132 | +
|
| 133 | + This feature is currently only supported for some OpenAI models. |
| 134 | + """ |
| 135 | + |
129 | 136 |
|
130 | 137 | class OpenAIResponsesModelSettings(OpenAIModelSettings, total=False):
|
131 | 138 | """Settings used for an OpenAI Responses model request.
|
@@ -320,6 +327,7 @@ async def _completions_create(
|
320 | 327 | reasoning_effort=model_settings.get('openai_reasoning_effort', NOT_GIVEN),
|
321 | 328 | user=model_settings.get('openai_user', NOT_GIVEN),
|
322 | 329 | service_tier=model_settings.get('openai_service_tier', NOT_GIVEN),
|
| 330 | + prediction=model_settings.get('openai_prediction', NOT_GIVEN), |
323 | 331 | temperature=sampling_settings.get('temperature', NOT_GIVEN),
|
324 | 332 | top_p=sampling_settings.get('top_p', NOT_GIVEN),
|
325 | 333 | presence_penalty=sampling_settings.get('presence_penalty', NOT_GIVEN),
|
|
0 commit comments