Skip to content

Commit 34a5651

Browse files
chore(api): update realtime specs, build config
1 parent 1cb2bf6 commit 34a5651

20 files changed

+266
-48
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: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-de3e91790d0b9f3ce26d679ac07079880ccc695bd8c878f961c4d577a5025a2e.yml
3-
openapi_spec_hash: 4b44e3f287583d01fbe7b10cd943254a
4-
config_hash: cc92d0be2a0f3c77bfc988082dd0573e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-82fd6fcb3eea81cbbe09a6f831c82219f1251e1b76474b4c41f424bf277e6a71.yml
3+
openapi_spec_hash: c8d54bd1ae3d704f6b6f72ffd2f876d8
4+
config_hash: 3315d58b60faf63b1bee251b81837cda

src/openai/types/beta/realtime/conversation_item.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class ConversationItem(BaseModel):
5050
for `message` items.
5151
"""
5252

53-
status: Optional[Literal["completed", "incomplete"]] = None
54-
"""The status of the item (`completed`, `incomplete`).
53+
status: Optional[Literal["completed", "incomplete", "in_progress"]] = None
54+
"""The status of the item (`completed`, `incomplete`, `in_progress`).
5555
5656
These have no effect on the conversation, but are accepted for consistency with
5757
the `conversation.item.created` event.

src/openai/types/beta/realtime/conversation_item_created_event.py

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

3+
from typing import Optional
34
from typing_extensions import Literal
45

56
from ...._models import BaseModel
@@ -15,11 +16,12 @@ class ConversationItemCreatedEvent(BaseModel):
1516
item: ConversationItem
1617
"""The item to add to the conversation."""
1718

18-
previous_item_id: str
19+
type: Literal["conversation.item.created"]
20+
"""The event type, must be `conversation.item.created`."""
21+
22+
previous_item_id: Optional[str] = None
1923
"""
2024
The ID of the preceding item in the Conversation context, allows the client to
21-
understand the order of the conversation.
25+
understand the order of the conversation. Can be `null` if the item has no
26+
predecessor.
2227
"""
23-
24-
type: Literal["conversation.item.created"]
25-
"""The event type, must be `conversation.item.created`."""

src/openai/types/beta/realtime/conversation_item_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class ConversationItemParam(TypedDict, total=False):
5151
for `message` items.
5252
"""
5353

54-
status: Literal["completed", "incomplete"]
55-
"""The status of the item (`completed`, `incomplete`).
54+
status: Literal["completed", "incomplete", "in_progress"]
55+
"""The status of the item (`completed`, `incomplete`, `in_progress`).
5656
5757
These have no effect on the conversation, but are accepted for consistency with
5858
the `conversation.item.created` event.

src/openai/types/beta/realtime/conversation_item_with_reference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ class ConversationItemWithReference(BaseModel):
5353
for `message` items.
5454
"""
5555

56-
status: Optional[Literal["completed", "incomplete"]] = None
57-
"""The status of the item (`completed`, `incomplete`).
56+
status: Optional[Literal["completed", "incomplete", "in_progress"]] = None
57+
"""The status of the item (`completed`, `incomplete`, `in_progress`).
5858
5959
These have no effect on the conversation, but are accepted for consistency with
6060
the `conversation.item.created` event.

src/openai/types/beta/realtime/conversation_item_with_reference_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class ConversationItemWithReferenceParam(TypedDict, total=False):
5454
for `message` items.
5555
"""
5656

57-
status: Literal["completed", "incomplete"]
58-
"""The status of the item (`completed`, `incomplete`).
57+
status: Literal["completed", "incomplete", "in_progress"]
58+
"""The status of the item (`completed`, `incomplete`, `in_progress`).
5959
6060
These have no effect on the conversation, but are accepted for consistency with
6161
the `conversation.item.created` event.

src/openai/types/beta/realtime/input_audio_buffer_committed_event.py

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

3+
from typing import Optional
34
from typing_extensions import Literal
45

56
from ...._models import BaseModel
@@ -14,8 +15,11 @@ class InputAudioBufferCommittedEvent(BaseModel):
1415
item_id: str
1516
"""The ID of the user message item that will be created."""
1617

17-
previous_item_id: str
18-
"""The ID of the preceding item after which the new item will be inserted."""
19-
2018
type: Literal["input_audio_buffer.committed"]
2119
"""The event type, must be `input_audio_buffer.committed`."""
20+
21+
previous_item_id: Optional[str] = None
22+
"""
23+
The ID of the preceding item after which the new item will be inserted. Can be
24+
`null` if the item has no predecessor.
25+
"""

src/openai/types/beta/realtime/realtime_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ class RealtimeResponse(BaseModel):
6060
output_audio_format: Optional[Literal["pcm16", "g711_ulaw", "g711_alaw"]] = None
6161
"""The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`."""
6262

63-
status: Optional[Literal["completed", "cancelled", "failed", "incomplete"]] = None
63+
status: Optional[Literal["completed", "cancelled", "failed", "incomplete", "in_progress"]] = None
6464
"""
6565
The final status of the response (`completed`, `cancelled`, `failed`, or
66-
`incomplete`).
66+
`incomplete`, `in_progress`).
6767
"""
6868

6969
status_details: Optional[RealtimeResponseStatus] = None

src/openai/types/eval_create_params.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"TestingCriterionLabelModelInputEvalItem",
2626
"TestingCriterionLabelModelInputEvalItemContent",
2727
"TestingCriterionLabelModelInputEvalItemContentOutputText",
28+
"TestingCriterionLabelModelInputEvalItemContentInputImage",
2829
"TestingCriterionTextSimilarity",
2930
"TestingCriterionPython",
3031
"TestingCriterionScoreModel",
@@ -109,14 +110,32 @@ class TestingCriterionLabelModelInputEvalItemContentOutputText(TypedDict, total=
109110
"""The type of the output text. Always `output_text`."""
110111

111112

113+
class TestingCriterionLabelModelInputEvalItemContentInputImage(TypedDict, total=False):
114+
image_url: Required[str]
115+
"""The URL of the image input."""
116+
117+
type: Required[Literal["input_image"]]
118+
"""The type of the image input. Always `input_image`."""
119+
120+
detail: str
121+
"""The detail level of the image to be sent to the model.
122+
123+
One of `high`, `low`, or `auto`. Defaults to `auto`.
124+
"""
125+
126+
112127
TestingCriterionLabelModelInputEvalItemContent: TypeAlias = Union[
113-
str, ResponseInputTextParam, TestingCriterionLabelModelInputEvalItemContentOutputText
128+
str,
129+
ResponseInputTextParam,
130+
TestingCriterionLabelModelInputEvalItemContentOutputText,
131+
TestingCriterionLabelModelInputEvalItemContentInputImage,
132+
Iterable[object],
114133
]
115134

116135

117136
class TestingCriterionLabelModelInputEvalItem(TypedDict, total=False):
118137
content: Required[TestingCriterionLabelModelInputEvalItemContent]
119-
"""Text inputs to the model - can contain template strings."""
138+
"""Inputs to the model - can contain template strings."""
120139

121140
role: Required[Literal["user", "assistant", "system", "developer"]]
122141
"""The role of the message input.

src/openai/types/evals/create_eval_completions_run_data_source.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"InputMessagesTemplateTemplateMessage",
2727
"InputMessagesTemplateTemplateMessageContent",
2828
"InputMessagesTemplateTemplateMessageContentOutputText",
29+
"InputMessagesTemplateTemplateMessageContentInputImage",
2930
"InputMessagesItemReference",
3031
"SamplingParams",
3132
"SamplingParamsResponseFormat",
@@ -94,14 +95,32 @@ class InputMessagesTemplateTemplateMessageContentOutputText(BaseModel):
9495
"""The type of the output text. Always `output_text`."""
9596

9697

98+
class InputMessagesTemplateTemplateMessageContentInputImage(BaseModel):
99+
image_url: str
100+
"""The URL of the image input."""
101+
102+
type: Literal["input_image"]
103+
"""The type of the image input. Always `input_image`."""
104+
105+
detail: Optional[str] = None
106+
"""The detail level of the image to be sent to the model.
107+
108+
One of `high`, `low`, or `auto`. Defaults to `auto`.
109+
"""
110+
111+
97112
InputMessagesTemplateTemplateMessageContent: TypeAlias = Union[
98-
str, ResponseInputText, InputMessagesTemplateTemplateMessageContentOutputText
113+
str,
114+
ResponseInputText,
115+
InputMessagesTemplateTemplateMessageContentOutputText,
116+
InputMessagesTemplateTemplateMessageContentInputImage,
117+
List[object],
99118
]
100119

101120

102121
class InputMessagesTemplateTemplateMessage(BaseModel):
103122
content: InputMessagesTemplateTemplateMessageContent
104-
"""Text inputs to the model - can contain template strings."""
123+
"""Inputs to the model - can contain template strings."""
105124

106125
role: Literal["user", "assistant", "system", "developer"]
107126
"""The role of the message input.

0 commit comments

Comments
 (0)