Commit 3876ddc2

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2025-07-16 05:27:39
chore(api): update realtime specs
1 parent 7bbb31c
src/openai/types/beta/realtime/conversation_item_content.py
@@ -23,7 +23,10 @@ class ConversationItemContent(BaseModel):
     """The text content, used for `input_text` and `text` content types."""
 
     transcript: Optional[str] = None
-    """The transcript of the audio, used for `input_audio` content type."""
+    """The transcript of the audio, used for `input_audio` and `audio` content types."""
 
-    type: Optional[Literal["input_text", "input_audio", "item_reference", "text"]] = None
-    """The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
+    type: Optional[Literal["input_text", "input_audio", "item_reference", "text", "audio"]] = None
+    """
+    The content type (`input_text`, `input_audio`, `item_reference`, `text`,
+    `audio`).
+    """
src/openai/types/beta/realtime/conversation_item_content_param.py
@@ -22,7 +22,10 @@ class ConversationItemContentParam(TypedDict, total=False):
     """The text content, used for `input_text` and `text` content types."""
 
     transcript: str
-    """The transcript of the audio, used for `input_audio` content type."""
+    """The transcript of the audio, used for `input_audio` and `audio` content types."""
 
-    type: Literal["input_text", "input_audio", "item_reference", "text"]
-    """The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
+    type: Literal["input_text", "input_audio", "item_reference", "text", "audio"]
+    """
+    The content type (`input_text`, `input_audio`, `item_reference`, `text`,
+    `audio`).
+    """
src/openai/types/beta/realtime/conversation_item_with_reference.py
@@ -4,9 +4,29 @@ from typing import List, Optional
 from typing_extensions import Literal
 
 from ...._models import BaseModel
-from .conversation_item_content import ConversationItemContent
 
-__all__ = ["ConversationItemWithReference"]
+__all__ = ["ConversationItemWithReference", "Content"]
+
+
+class Content(BaseModel):
+    id: Optional[str] = None
+    """
+    ID of a previous conversation item to reference (for `item_reference` content
+    types in `response.create` events). These can reference both client and server
+    created items.
+    """
+
+    audio: Optional[str] = None
+    """Base64-encoded audio bytes, used for `input_audio` content type."""
+
+    text: Optional[str] = None
+    """The text content, used for `input_text` and `text` content types."""
+
+    transcript: Optional[str] = None
+    """The transcript of the audio, used for `input_audio` content type."""
+
+    type: Optional[Literal["input_text", "input_audio", "item_reference", "text"]] = None
+    """The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
 
 
 class ConversationItemWithReference(BaseModel):
@@ -30,7 +50,7 @@ class ConversationItemWithReference(BaseModel):
     `function_call` item with the same ID exists in the conversation history.
     """
 
-    content: Optional[List[ConversationItemContent]] = None
+    content: Optional[List[Content]] = None
     """The content of the message, applicable for `message` items.
 
     - Message items of role `system` support only `input_text` content
src/openai/types/beta/realtime/conversation_item_with_reference_param.py
@@ -5,9 +5,28 @@ from __future__ import annotations
 from typing import Iterable
 from typing_extensions import Literal, TypedDict
 
-from .conversation_item_content_param import ConversationItemContentParam
+__all__ = ["ConversationItemWithReferenceParam", "Content"]
 
-__all__ = ["ConversationItemWithReferenceParam"]
+
+class Content(TypedDict, total=False):
+    id: str
+    """
+    ID of a previous conversation item to reference (for `item_reference` content
+    types in `response.create` events). These can reference both client and server
+    created items.
+    """
+
+    audio: str
+    """Base64-encoded audio bytes, used for `input_audio` content type."""
+
+    text: str
+    """The text content, used for `input_text` and `text` content types."""
+
+    transcript: str
+    """The transcript of the audio, used for `input_audio` content type."""
+
+    type: Literal["input_text", "input_audio", "item_reference", "text"]
+    """The content type (`input_text`, `input_audio`, `item_reference`, `text`)."""
 
 
 class ConversationItemWithReferenceParam(TypedDict, total=False):
@@ -31,7 +50,7 @@ class ConversationItemWithReferenceParam(TypedDict, total=False):
     `function_call` item with the same ID exists in the conversation history.
     """
 
-    content: Iterable[ConversationItemContentParam]
+    content: Iterable[Content]
     """The content of the message, applicable for `message` items.
 
     - Message items of role `system` support only `input_text` content
.stats.yml
@@ -1,4 +1,4 @@
 configured_endpoints: 111
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-79dcb0ae501ac17004f50aecb112a798290ab3727fbe7c7d1b34299e38ed4f8e.yml
-openapi_spec_hash: c8d54bd1ae3d704f6b6f72ffd2f876d8
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-c7dacca97e28bceff218684bb429481a70aa47aadad983ed9178bfda75ff4cd2.yml
+openapi_spec_hash: 28eb1bb901ca10d2e37db4606d2bcfa7
 config_hash: 167ad0ca036d0f023c78e6496b4311e8