Skip to content

Commit caabd7c

Browse files
fix(api): internal openapi updates
1 parent 513ae76 commit caabd7c

File tree

11 files changed

+44
-66
lines changed

11 files changed

+44
-66
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 135
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f59befea071ed7729cbb7bce219e7f837eccfdb57e01698514e6a0bd6052ff60.yml
3-
openapi_spec_hash: 49da48619d37932b2e257c532078b2bb
4-
config_hash: 1af83449a09a3b4f276444dbcdd3eb67
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b062c33330de7e3bbf992fd4f0799afd868c30a66c39418dd2c62f4add3b45b6.yml
3+
openapi_spec_hash: fe067f5b1c0e93799b5ea7fde3c4b1b3
4+
config_hash: 4b6f471b24d659514b86b736c90a0c0a

src/openai/resources/images.py

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,7 @@ def edit(
168168
If `transparent`, the output format needs to support transparency, so it should
169169
be set to either `png` (default value) or `webp`.
170170
171-
input_fidelity: Control how much effort the model will exert to match the style and features,
172-
especially facial features, of input images. This parameter is only supported
173-
for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
174-
`low`. Defaults to `low`.
171+
input_fidelity: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
175172
176173
mask: An additional image whose fully transparent areas (e.g. where alpha is zero)
177174
indicate where `image` should be edited. If there are multiple images provided,
@@ -285,10 +282,7 @@ def edit(
285282
If `transparent`, the output format needs to support transparency, so it should
286283
be set to either `png` (default value) or `webp`.
287284
288-
input_fidelity: Control how much effort the model will exert to match the style and features,
289-
especially facial features, of input images. This parameter is only supported
290-
for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
291-
`low`. Defaults to `low`.
285+
input_fidelity: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
292286
293287
mask: An additional image whose fully transparent areas (e.g. where alpha is zero)
294288
indicate where `image` should be edited. If there are multiple images provided,
@@ -398,10 +392,7 @@ def edit(
398392
If `transparent`, the output format needs to support transparency, so it should
399393
be set to either `png` (default value) or `webp`.
400394
401-
input_fidelity: Control how much effort the model will exert to match the style and features,
402-
especially facial features, of input images. This parameter is only supported
403-
for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
404-
`low`. Defaults to `low`.
395+
input_fidelity: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
405396
406397
mask: An additional image whose fully transparent areas (e.g. where alpha is zero)
407398
indicate where `image` should be edited. If there are multiple images provided,
@@ -1055,10 +1046,7 @@ async def edit(
10551046
If `transparent`, the output format needs to support transparency, so it should
10561047
be set to either `png` (default value) or `webp`.
10571048
1058-
input_fidelity: Control how much effort the model will exert to match the style and features,
1059-
especially facial features, of input images. This parameter is only supported
1060-
for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
1061-
`low`. Defaults to `low`.
1049+
input_fidelity: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
10621050
10631051
mask: An additional image whose fully transparent areas (e.g. where alpha is zero)
10641052
indicate where `image` should be edited. If there are multiple images provided,
@@ -1172,10 +1160,7 @@ async def edit(
11721160
If `transparent`, the output format needs to support transparency, so it should
11731161
be set to either `png` (default value) or `webp`.
11741162
1175-
input_fidelity: Control how much effort the model will exert to match the style and features,
1176-
especially facial features, of input images. This parameter is only supported
1177-
for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
1178-
`low`. Defaults to `low`.
1163+
input_fidelity: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
11791164
11801165
mask: An additional image whose fully transparent areas (e.g. where alpha is zero)
11811166
indicate where `image` should be edited. If there are multiple images provided,
@@ -1285,10 +1270,7 @@ async def edit(
12851270
If `transparent`, the output format needs to support transparency, so it should
12861271
be set to either `png` (default value) or `webp`.
12871272
1288-
input_fidelity: Control how much effort the model will exert to match the style and features,
1289-
especially facial features, of input images. This parameter is only supported
1290-
for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
1291-
`low`. Defaults to `low`.
1273+
input_fidelity: Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
12921274
12931275
mask: An additional image whose fully transparent areas (e.g. where alpha is zero)
12941276
indicate where `image` should be edited. If there are multiple images provided,

src/openai/types/responses/response_code_interpreter_tool_call.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class OutputLogs(BaseModel):
1414
"""The logs output from the code interpreter."""
1515

1616
type: Literal["logs"]
17-
"""The type of the output. Always 'logs'."""
17+
"""The type of the output. Always `logs`."""
1818

1919

2020
class OutputImage(BaseModel):
2121
type: Literal["image"]
22-
"""The type of the output. Always 'image'."""
22+
"""The type of the output. Always `image`."""
2323

2424
url: str
2525
"""The URL of the image output from the code interpreter."""

src/openai/types/responses/response_code_interpreter_tool_call_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class OutputLogs(TypedDict, total=False):
1313
"""The logs output from the code interpreter."""
1414

1515
type: Required[Literal["logs"]]
16-
"""The type of the output. Always 'logs'."""
16+
"""The type of the output. Always `logs`."""
1717

1818

1919
class OutputImage(TypedDict, total=False):
2020
type: Required[Literal["image"]]
21-
"""The type of the output. Always 'image'."""
21+
"""The type of the output. Always `image`."""
2222

2323
url: Required[str]
2424
"""The URL of the image output from the code interpreter."""

src/openai/types/responses/response_computer_tool_call.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Union
3+
from typing import List, Union, Optional
44
from typing_extensions import Literal, Annotated, TypeAlias
55

66
from ..._utils import PropertyInfo
@@ -31,10 +31,7 @@ class ActionClick(BaseModel):
3131
"""
3232

3333
type: Literal["click"]
34-
"""Specifies the event type.
35-
36-
For a click action, this property is always set to `click`.
37-
"""
34+
"""Specifies the event type. For a click action, this property is always `click`."""
3835

3936
x: int
4037
"""The x-coordinate where the click occurred."""
@@ -181,10 +178,10 @@ class PendingSafetyCheck(BaseModel):
181178
id: str
182179
"""The ID of the pending safety check."""
183180

184-
code: str
181+
code: Optional[str] = None
185182
"""The type of the pending safety check."""
186183

187-
message: str
184+
message: Optional[str] = None
188185
"""Details about the pending safety check."""
189186

190187

src/openai/types/responses/response_computer_tool_call_output_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ class AcknowledgedSafetyCheck(BaseModel):
1313
id: str
1414
"""The ID of the pending safety check."""
1515

16-
code: str
16+
code: Optional[str] = None
1717
"""The type of the pending safety check."""
1818

19-
message: str
19+
message: Optional[str] = None
2020
"""Details about the pending safety check."""
2121

2222

src/openai/types/responses/response_computer_tool_call_param.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Union, Iterable
5+
from typing import Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
from ..._types import SequenceNotStr
@@ -32,10 +32,7 @@ class ActionClick(TypedDict, total=False):
3232
"""
3333

3434
type: Required[Literal["click"]]
35-
"""Specifies the event type.
36-
37-
For a click action, this property is always set to `click`.
38-
"""
35+
"""Specifies the event type. For a click action, this property is always `click`."""
3936

4037
x: Required[int]
4138
"""The x-coordinate where the click occurred."""
@@ -179,10 +176,10 @@ class PendingSafetyCheck(TypedDict, total=False):
179176
id: Required[str]
180177
"""The ID of the pending safety check."""
181178

182-
code: Required[str]
179+
code: Optional[str]
183180
"""The type of the pending safety check."""
184181

185-
message: Required[str]
182+
message: Optional[str]
186183
"""Details about the pending safety check."""
187184

188185

src/openai/types/responses/response_includable.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
__all__ = ["ResponseIncludable"]
66

77
ResponseIncludable: TypeAlias = Literal[
8-
"code_interpreter_call.outputs",
9-
"computer_call_output.output.image_url",
108
"file_search_call.results",
9+
"web_search_call.results",
10+
"web_search_call.action.sources",
1111
"message.input_image.image_url",
12-
"message.output_text.logprobs",
12+
"computer_call_output.output.image_url",
13+
"code_interpreter_call.outputs",
1314
"reasoning.encrypted_content",
15+
"message.output_text.logprobs",
1416
]

tests/api_resources/conversations/test_items.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None:
4747
"type": "message",
4848
}
4949
],
50-
include=["code_interpreter_call.outputs"],
50+
include=["file_search_call.results"],
5151
)
5252
assert_matches_type(ConversationItemList, item, path=["response"])
5353

@@ -116,7 +116,7 @@ def test_method_retrieve_with_all_params(self, client: OpenAI) -> None:
116116
item = client.conversations.items.retrieve(
117117
item_id="msg_abc",
118118
conversation_id="conv_123",
119-
include=["code_interpreter_call.outputs"],
119+
include=["file_search_call.results"],
120120
)
121121
assert_matches_type(ConversationItem, item, path=["response"])
122122

@@ -172,7 +172,7 @@ def test_method_list_with_all_params(self, client: OpenAI) -> None:
172172
item = client.conversations.items.list(
173173
conversation_id="conv_123",
174174
after="after",
175-
include=["code_interpreter_call.outputs"],
175+
include=["file_search_call.results"],
176176
limit=0,
177177
order="asc",
178178
)
@@ -288,7 +288,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) ->
288288
"type": "message",
289289
}
290290
],
291-
include=["code_interpreter_call.outputs"],
291+
include=["file_search_call.results"],
292292
)
293293
assert_matches_type(ConversationItemList, item, path=["response"])
294294

@@ -357,7 +357,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncOpenAI)
357357
item = await async_client.conversations.items.retrieve(
358358
item_id="msg_abc",
359359
conversation_id="conv_123",
360-
include=["code_interpreter_call.outputs"],
360+
include=["file_search_call.results"],
361361
)
362362
assert_matches_type(ConversationItem, item, path=["response"])
363363

@@ -413,7 +413,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOpenAI) -> N
413413
item = await async_client.conversations.items.list(
414414
conversation_id="conv_123",
415415
after="after",
416-
include=["code_interpreter_call.outputs"],
416+
include=["file_search_call.results"],
417417
limit=0,
418418
order="asc",
419419
)

tests/api_resources/responses/test_input_items.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_method_list_with_all_params(self, client: OpenAI) -> None:
3030
input_item = client.responses.input_items.list(
3131
response_id="response_id",
3232
after="after",
33-
include=["code_interpreter_call.outputs"],
33+
include=["file_search_call.results"],
3434
limit=0,
3535
order="asc",
3636
)
@@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOpenAI) -> N
8585
input_item = await async_client.responses.input_items.list(
8686
response_id="response_id",
8787
after="after",
88-
include=["code_interpreter_call.outputs"],
88+
include=["file_search_call.results"],
8989
limit=0,
9090
order="asc",
9191
)

0 commit comments

Comments
 (0)