Skip to content

Commit 3876ddc

Browse files
chore(api): update realtime specs
1 parent 7bbb31c commit 3876ddc

File tree

5 files changed

+59
-14
lines changed

5 files changed

+59
-14
lines changed

.stats.yml

Lines changed: 2 additions & 2 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-79dcb0ae501ac17004f50aecb112a798290ab3727fbe7c7d1b34299e38ed4f8e.yml
3-
openapi_spec_hash: c8d54bd1ae3d704f6b6f72ffd2f876d8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-c7dacca97e28bceff218684bb429481a70aa47aadad983ed9178bfda75ff4cd2.yml
3+
openapi_spec_hash: 28eb1bb901ca10d2e37db4606d2bcfa7
44
config_hash: 167ad0ca036d0f023c78e6496b4311e8

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ class ConversationItemContent(BaseModel):
2323
"""The text content, used for `input_text` and `text` content types."""
2424

2525
transcript: Optional[str] = None
26-
"""The transcript of the audio, used for `input_audio` content type."""
26+
"""The transcript of the audio, used for `input_audio` and `audio` content types."""
2727

28-
type: Optional[Literal["input_text", "input_audio", "item_reference", "text"]] = None
29-
"""The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
28+
type: Optional[Literal["input_text", "input_audio", "item_reference", "text", "audio"]] = None
29+
"""
30+
The content type (`input_text`, `input_audio`, `item_reference`, `text`,
31+
`audio`).
32+
"""

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ class ConversationItemContentParam(TypedDict, total=False):
2222
"""The text content, used for `input_text` and `text` content types."""
2323

2424
transcript: str
25-
"""The transcript of the audio, used for `input_audio` content type."""
25+
"""The transcript of the audio, used for `input_audio` and `audio` content types."""
2626

27-
type: Literal["input_text", "input_audio", "item_reference", "text"]
28-
"""The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
27+
type: Literal["input_text", "input_audio", "item_reference", "text", "audio"]
28+
"""
29+
The content type (`input_text`, `input_audio`, `item_reference`, `text`,
30+
`audio`).
31+
"""

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

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,29 @@
44
from typing_extensions import Literal
55

66
from ...._models import BaseModel
7-
from .conversation_item_content import ConversationItemContent
87

9-
__all__ = ["ConversationItemWithReference"]
8+
__all__ = ["ConversationItemWithReference", "Content"]
9+
10+
11+
class Content(BaseModel):
12+
id: Optional[str] = None
13+
"""
14+
ID of a previous conversation item to reference (for `item_reference` content
15+
types in `response.create` events). These can reference both client and server
16+
created items.
17+
"""
18+
19+
audio: Optional[str] = None
20+
"""Base64-encoded audio bytes, used for `input_audio` content type."""
21+
22+
text: Optional[str] = None
23+
"""The text content, used for `input_text` and `text` content types."""
24+
25+
transcript: Optional[str] = None
26+
"""The transcript of the audio, used for `input_audio` content type."""
27+
28+
type: Optional[Literal["input_text", "input_audio", "item_reference", "text"]] = None
29+
"""The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
1030

1131

1232
class ConversationItemWithReference(BaseModel):
@@ -30,7 +50,7 @@ class ConversationItemWithReference(BaseModel):
3050
`function_call` item with the same ID exists in the conversation history.
3151
"""
3252

33-
content: Optional[List[ConversationItemContent]] = None
53+
content: Optional[List[Content]] = None
3454
"""The content of the message, applicable for `message` items.
3555
3656
- Message items of role `system` support only `input_text` content

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

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,28 @@
55
from typing import Iterable
66
from typing_extensions import Literal, TypedDict
77

8-
from .conversation_item_content_param import ConversationItemContentParam
8+
__all__ = ["ConversationItemWithReferenceParam", "Content"]
99

10-
__all__ = ["ConversationItemWithReferenceParam"]
10+
11+
class Content(TypedDict, total=False):
12+
id: str
13+
"""
14+
ID of a previous conversation item to reference (for `item_reference` content
15+
types in `response.create` events). These can reference both client and server
16+
created items.
17+
"""
18+
19+
audio: str
20+
"""Base64-encoded audio bytes, used for `input_audio` content type."""
21+
22+
text: str
23+
"""The text content, used for `input_text` and `text` content types."""
24+
25+
transcript: str
26+
"""The transcript of the audio, used for `input_audio` content type."""
27+
28+
type: Literal["input_text", "input_audio", "item_reference", "text"]
29+
"""The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
1130

1231

1332
class ConversationItemWithReferenceParam(TypedDict, total=False):
@@ -31,7 +50,7 @@ class ConversationItemWithReferenceParam(TypedDict, total=False):
3150
`function_call` item with the same ID exists in the conversation history.
3251
"""
3352

34-
content: Iterable[ConversationItemContentParam]
53+
content: Iterable[Content]
3554
"""The content of the message, applicable for `message` items.
3655
3756
- Message items of role `system` support only `input_text` content

0 commit comments

Comments
 (0)