-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api/types): correct audio duration & role types (#2091)
- Loading branch information
1 parent
6afde0d
commit f344db2
Showing
11 changed files
with
157 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 69 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-6204952a29973265b9c0d66fc67ffaf53c6a90ae4d75cdacf9d147676f5274c9.yml | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-fc5dbc19505b0035f9e7f88868619f4fb519b048bde011f6154f3132d4be71fb.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/openai/types/beta/realtime/conversation_item_with_reference.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from typing import List, Optional | ||
from typing_extensions import Literal | ||
|
||
from ...._models import BaseModel | ||
from .conversation_item_content import ConversationItemContent | ||
|
||
__all__ = ["ConversationItemWithReference"] | ||
|
||
|
||
class ConversationItemWithReference(BaseModel): | ||
id: Optional[str] = None | ||
""" | ||
For an item of type (`message` | `function_call` | `function_call_output`) this | ||
field allows the client to assign the unique ID of the item. It is not required | ||
because the server will generate one if not provided. | ||
For an item of type `item_reference`, this field is required and is a reference | ||
to any item that has previously existed in the conversation. | ||
""" | ||
|
||
arguments: Optional[str] = None | ||
"""The arguments of the function call (for `function_call` items).""" | ||
|
||
call_id: Optional[str] = None | ||
""" | ||
The ID of the function call (for `function_call` and `function_call_output` | ||
items). If passed on a `function_call_output` item, the server will check that a | ||
`function_call` item with the same ID exists in the conversation history. | ||
""" | ||
|
||
content: Optional[List[ConversationItemContent]] = None | ||
"""The content of the message, applicable for `message` items. | ||
- Message items of role `system` support only `input_text` content | ||
- Message items of role `user` support `input_text` and `input_audio` content | ||
- Message items of role `assistant` support `text` content. | ||
""" | ||
|
||
name: Optional[str] = None | ||
"""The name of the function being called (for `function_call` items).""" | ||
|
||
object: Optional[Literal["realtime.item"]] = None | ||
"""Identifier for the API object being returned - always `realtime.item`.""" | ||
|
||
output: Optional[str] = None | ||
"""The output of the function call (for `function_call_output` items).""" | ||
|
||
role: Optional[Literal["user", "assistant", "system"]] = None | ||
""" | ||
The role of the message sender (`user`, `assistant`, `system`), only applicable | ||
for `message` items. | ||
""" | ||
|
||
status: Optional[Literal["completed", "incomplete"]] = None | ||
"""The status of the item (`completed`, `incomplete`). | ||
These have no effect on the conversation, but are accepted for consistency with | ||
the `conversation.item.created` event. | ||
""" | ||
|
||
type: Optional[Literal["message", "function_call", "function_call_output", "item_reference"]] = None | ||
""" | ||
The type of the item (`message`, `function_call`, `function_call_output`, | ||
`item_reference`). | ||
""" |
68 changes: 68 additions & 0 deletions
68
src/openai/types/beta/realtime/conversation_item_with_reference_param.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Iterable | ||
from typing_extensions import Literal, TypedDict | ||
|
||
from .conversation_item_content_param import ConversationItemContentParam | ||
|
||
__all__ = ["ConversationItemWithReferenceParam"] | ||
|
||
|
||
class ConversationItemWithReferenceParam(TypedDict, total=False): | ||
id: str | ||
""" | ||
For an item of type (`message` | `function_call` | `function_call_output`) this | ||
field allows the client to assign the unique ID of the item. It is not required | ||
because the server will generate one if not provided. | ||
For an item of type `item_reference`, this field is required and is a reference | ||
to any item that has previously existed in the conversation. | ||
""" | ||
|
||
arguments: str | ||
"""The arguments of the function call (for `function_call` items).""" | ||
|
||
call_id: str | ||
""" | ||
The ID of the function call (for `function_call` and `function_call_output` | ||
items). If passed on a `function_call_output` item, the server will check that a | ||
`function_call` item with the same ID exists in the conversation history. | ||
""" | ||
|
||
content: Iterable[ConversationItemContentParam] | ||
"""The content of the message, applicable for `message` items. | ||
- Message items of role `system` support only `input_text` content | ||
- Message items of role `user` support `input_text` and `input_audio` content | ||
- Message items of role `assistant` support `text` content. | ||
""" | ||
|
||
name: str | ||
"""The name of the function being called (for `function_call` items).""" | ||
|
||
object: Literal["realtime.item"] | ||
"""Identifier for the API object being returned - always `realtime.item`.""" | ||
|
||
output: str | ||
"""The output of the function call (for `function_call_output` items).""" | ||
|
||
role: Literal["user", "assistant", "system"] | ||
""" | ||
The role of the message sender (`user`, `assistant`, `system`), only applicable | ||
for `message` items. | ||
""" | ||
|
||
status: Literal["completed", "incomplete"] | ||
"""The status of the item (`completed`, `incomplete`). | ||
These have no effect on the conversation, but are accepted for consistency with | ||
the `conversation.item.created` event. | ||
""" | ||
|
||
type: Literal["message", "function_call", "function_call_output", "item_reference"] | ||
""" | ||
The type of the item (`message`, `function_call`, `function_call_output`, | ||
`item_reference`). | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters