55from typing import Dict , List , Union , Iterable , Optional
66from typing_extensions import Literal , Required , TypeAlias , TypedDict
77
8+ from ..responses .tool_param import ToolParam
89from ..shared_params .metadata import Metadata
910from ..shared .reasoning_effort import ReasoningEffort
1011from ..responses .response_input_text_param import ResponseInputTextParam
1112from .create_eval_jsonl_run_data_source_param import CreateEvalJSONLRunDataSourceParam
13+ from ..responses .response_format_text_config_param import ResponseFormatTextConfigParam
1214from .create_eval_completions_run_data_source_param import CreateEvalCompletionsRunDataSourceParam
1315
1416__all__ = [
2931 "DataSourceCreateEvalResponsesRunDataSourceInputMessagesTemplateTemplateEvalItemContentOutputText" ,
3032 "DataSourceCreateEvalResponsesRunDataSourceInputMessagesItemReference" ,
3133 "DataSourceCreateEvalResponsesRunDataSourceSamplingParams" ,
34+ "DataSourceCreateEvalResponsesRunDataSourceSamplingParamsText" ,
3235]
3336
3437
@@ -202,6 +205,24 @@ class DataSourceCreateEvalResponsesRunDataSourceInputMessagesItemReference(Typed
202205]
203206
204207
208+ class DataSourceCreateEvalResponsesRunDataSourceSamplingParamsText (TypedDict , total = False ):
209+ format : ResponseFormatTextConfigParam
210+ """An object specifying the format that the model must output.
211+
212+ Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
213+ ensures the model will match your supplied JSON schema. Learn more in the
214+ [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
215+
216+ The default format is `{ "type": "text" }` with no additional options.
217+
218+ **Not recommended for gpt-4o and newer models:**
219+
220+ Setting to `{ "type": "json_object" }` enables the older JSON mode, which
221+ ensures the message the model generates is valid JSON. Using `json_schema` is
222+ preferred for models that support it.
223+ """
224+
225+
205226class DataSourceCreateEvalResponsesRunDataSourceSamplingParams (TypedDict , total = False ):
206227 max_completion_tokens : int
207228 """The maximum number of tokens in the generated output."""
@@ -212,6 +233,33 @@ class DataSourceCreateEvalResponsesRunDataSourceSamplingParams(TypedDict, total=
212233 temperature : float
213234 """A higher temperature increases randomness in the outputs."""
214235
236+ text : DataSourceCreateEvalResponsesRunDataSourceSamplingParamsText
237+ """Configuration options for a text response from the model.
238+
239+ Can be plain text or structured JSON data. Learn more:
240+
241+ - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
242+ - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
243+ """
244+
245+ tools : Iterable [ToolParam ]
246+ """An array of tools the model may call while generating a response.
247+
248+ You can specify which tool to use by setting the `tool_choice` parameter.
249+
250+ The two categories of tools you can provide the model are:
251+
252+ - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
253+ capabilities, like
254+ [web search](https://platform.openai.com/docs/guides/tools-web-search) or
255+ [file search](https://platform.openai.com/docs/guides/tools-file-search).
256+ Learn more about
257+ [built-in tools](https://platform.openai.com/docs/guides/tools).
258+ - **Function calls (custom tools)**: Functions that are defined by you, enabling
259+ the model to call your own code. Learn more about
260+ [function calling](https://platform.openai.com/docs/guides/function-calling).
261+ """
262+
215263 top_p : float
216264 """An alternative to temperature for nucleus sampling; 1.0 includes all tokens."""
217265
0 commit comments