@@ -563,7 +563,14 @@ export interface Response {
563563 */
564564 status ?: ResponseStatus ;
565565
566- text ?: Response . Text ;
566+ /**
567+ * Configuration options for a text response from the model. Can be plain text or
568+ * structured JSON data. Learn more:
569+ *
570+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
571+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
572+ */
573+ text ?: ResponseTextConfig ;
567574
568575 /**
569576 * The truncation strategy to use for the model response.
@@ -603,32 +610,6 @@ export namespace Response {
603610 */
604611 reason ?: 'max_output_tokens' | 'content_filter' ;
605612 }
606-
607- export interface Text {
608- /**
609- * An object specifying the format that the model must output.
610- *
611- * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
612- * ensures the model will match your supplied JSON schema. Learn more in the
613- * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
614- *
615- * The default format is `{ "type": "text" }` with no additional options.
616- *
617- * **Not recommended for gpt-4o and newer models:**
618- *
619- * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
620- * ensures the message the model generates is valid JSON. Using `json_schema` is
621- * preferred for models that support it.
622- */
623- format ?: ResponsesAPI . ResponseFormatTextConfig ;
624-
625- /**
626- * Constrains the verbosity of the model's response. Lower values will result in
627- * more concise responses, while higher values will result in more verbose
628- * responses. Currently supported values are `low`, `medium`, and `high`.
629- */
630- verbosity ?: 'low' | 'medium' | 'high' | null ;
631- }
632613}
633614
634615/**
@@ -5194,7 +5175,14 @@ export interface ResponseCreateParamsBase {
51945175 */
51955176 temperature ?: number | null ;
51965177
5197- text ?: ResponseCreateParams . Text ;
5178+ /**
5179+ * Configuration options for a text response from the model. Can be plain text or
5180+ * structured JSON data. Learn more:
5181+ *
5182+ * - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
5183+ * - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
5184+ */
5185+ text ?: ResponseTextConfig ;
51985186
51995187 /**
52005188 * How the model should select which tool (or tools) to use when generating a
@@ -5276,32 +5264,6 @@ export namespace ResponseCreateParams {
52765264 include_obfuscation ?: boolean ;
52775265 }
52785266
5279- export interface Text {
5280- /**
5281- * An object specifying the format that the model must output.
5282- *
5283- * Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
5284- * ensures the model will match your supplied JSON schema. Learn more in the
5285- * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
5286- *
5287- * The default format is `{ "type": "text" }` with no additional options.
5288- *
5289- * **Not recommended for gpt-4o and newer models:**
5290- *
5291- * Setting to `{ "type": "json_object" }` enables the older JSON mode, which
5292- * ensures the message the model generates is valid JSON. Using `json_schema` is
5293- * preferred for models that support it.
5294- */
5295- format ?: ResponsesAPI . ResponseFormatTextConfig ;
5296-
5297- /**
5298- * Constrains the verbosity of the model's response. Lower values will result in
5299- * more concise responses, while higher values will result in more verbose
5300- * responses. Currently supported values are `low`, `medium`, and `high`.
5301- */
5302- verbosity ?: 'low' | 'medium' | 'high' | null ;
5303- }
5304-
53055267 export type ResponseCreateParamsNonStreaming = ResponsesAPI . ResponseCreateParamsNonStreaming ;
53065268 export type ResponseCreateParamsStreaming = ResponsesAPI . ResponseCreateParamsStreaming ;
53075269}
0 commit comments