Skip to content

Commit ac4fb19

Browse files
committed
fix(types): revert response text config deletion
1 parent adb1af8 commit ac4fb19

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

src/openai/types/responses/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from .response_input_param import ResponseInputParam as ResponseInputParam
4343
from .response_output_item import ResponseOutputItem as ResponseOutputItem
4444
from .response_output_text import ResponseOutputText as ResponseOutputText
45+
from .response_text_config import ResponseTextConfig as ResponseTextConfig
4546
from .tool_choice_function import ToolChoiceFunction as ToolChoiceFunction
4647
from .response_failed_event import ResponseFailedEvent as ResponseFailedEvent
4748
from .response_prompt_param import ResponsePromptParam as ResponsePromptParam
@@ -75,6 +76,7 @@
7576
from .response_in_progress_event import ResponseInProgressEvent as ResponseInProgressEvent
7677
from .response_input_image_param import ResponseInputImageParam as ResponseInputImageParam
7778
from .response_output_text_param import ResponseOutputTextParam as ResponseOutputTextParam
79+
from .response_text_config_param import ResponseTextConfigParam as ResponseTextConfigParam
7880
from .tool_choice_function_param import ToolChoiceFunctionParam as ToolChoiceFunctionParam
7981
from .response_computer_tool_call import ResponseComputerToolCall as ResponseComputerToolCall
8082
from .response_format_text_config import ResponseFormatTextConfig as ResponseFormatTextConfig
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
from typing_extensions import Literal
5+
6+
from ..._models import BaseModel
7+
from .response_format_text_config import ResponseFormatTextConfig
8+
9+
__all__ = ["ResponseTextConfig"]
10+
11+
12+
class ResponseTextConfig(BaseModel):
13+
format: Optional[ResponseFormatTextConfig] = None
14+
"""An object specifying the format that the model must output.
15+
16+
Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
17+
ensures the model will match your supplied JSON schema. Learn more in the
18+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
19+
20+
The default format is `{ "type": "text" }` with no additional options.
21+
22+
**Not recommended for gpt-4o and newer models:**
23+
24+
Setting to `{ "type": "json_object" }` enables the older JSON mode, which
25+
ensures the message the model generates is valid JSON. Using `json_schema` is
26+
preferred for models that support it.
27+
"""
28+
29+
verbosity: Optional[Literal["low", "medium", "high"]] = None
30+
"""Constrains the verbosity of the model's response.
31+
32+
Lower values will result in more concise responses, while higher values will
33+
result in more verbose responses. Currently supported values are `low`,
34+
`medium`, and `high`.
35+
"""
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Optional
6+
from typing_extensions import Literal, TypedDict
7+
8+
from .response_format_text_config_param import ResponseFormatTextConfigParam
9+
10+
__all__ = ["ResponseTextConfigParam"]
11+
12+
13+
class ResponseTextConfigParam(TypedDict, total=False):
14+
format: ResponseFormatTextConfigParam
15+
"""An object specifying the format that the model must output.
16+
17+
Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
18+
ensures the model will match your supplied JSON schema. Learn more in the
19+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
20+
21+
The default format is `{ "type": "text" }` with no additional options.
22+
23+
**Not recommended for gpt-4o and newer models:**
24+
25+
Setting to `{ "type": "json_object" }` enables the older JSON mode, which
26+
ensures the message the model generates is valid JSON. Using `json_schema` is
27+
preferred for models that support it.
28+
"""
29+
30+
verbosity: Optional[Literal["low", "medium", "high"]]
31+
"""Constrains the verbosity of the model's response.
32+
33+
Lower values will result in more concise responses, while higher values will
34+
result in more verbose responses. Currently supported values are `low`,
35+
`medium`, and `high`.
36+
"""

0 commit comments

Comments
 (0)