Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_allowed_tools_param.py +34 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_assistant_message_param.py +82 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_content_part_image.py +29 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_message_tool_call_param.py +14 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_prediction_content_param.py +30 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/completion_list_params.py +33 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/__init__.py +242 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/audio_transcription.py +55 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/audio_transcription_param.py +54 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_accept_params.py +143 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_create_params.py +17 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_refer_params.py +15 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_reject_params.py +15 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/client_secret_create_params.py +54 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_created_event.py +31 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item.py +32 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_added.py +36 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_created_event.py +40 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_delete_event_param.py +26 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_deleted_event.py +24 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_done.py +31 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_input_audio_transcription_delta_event.py +40 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_input_audio_transcription_failed_event.py +47 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_param.py +30 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_truncate_event.py +47 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_truncated_event.py +33 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_append_event_param.py +39 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_cleared_event.py +20 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_commit_event.py +22 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_commit_event_param.py +21 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_committed_event.py +32 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_dtmf_event_received_event.py +26 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_speech_stopped_event.py +31 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/mcp_list_tools_failed.py +20 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/mcp_list_tools_in_progress.py +20 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/noise_reduction_type.py +7 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/output_audio_buffer_clear_event.py +25 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/output_audio_buffer_clear_event_param.py +24 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/rate_limits_updated_event.py +41 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_config.py +17 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_config_input.py +73 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_config_output_param.py +48 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_formats.py +36 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_input_turn_detection_param.py +112 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_assistant_message.py +60 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_assistant_message_param.py +60 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_function_call_output.py +39 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_function_call_output_param.py +38 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_function_call_param.py +42 -0
- data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_system_message.py +46 -0
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_allowed_tools_param.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Dict, Iterable
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["ChatCompletionAllowedToolsParam"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ChatCompletionAllowedToolsParam(TypedDict, total=False):
|
| 12 |
+
"""Constrains the tools available to the model to a pre-defined set."""
|
| 13 |
+
|
| 14 |
+
mode: Required[Literal["auto", "required"]]
|
| 15 |
+
"""Constrains the tools available to the model to a pre-defined set.
|
| 16 |
+
|
| 17 |
+
`auto` allows the model to pick from among the allowed tools and generate a
|
| 18 |
+
message.
|
| 19 |
+
|
| 20 |
+
`required` requires the model to call one or more of the allowed tools.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
tools: Required[Iterable[Dict[str, object]]]
|
| 24 |
+
"""A list of tool definitions that the model should be allowed to call.
|
| 25 |
+
|
| 26 |
+
For the Chat Completions API, the list of tool definitions might look like:
|
| 27 |
+
|
| 28 |
+
```json
|
| 29 |
+
[
|
| 30 |
+
{ "type": "function", "function": { "name": "get_weather" } },
|
| 31 |
+
{ "type": "function", "function": { "name": "get_time" } }
|
| 32 |
+
]
|
| 33 |
+
```
|
| 34 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_assistant_message_param.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union, Iterable, Optional
|
| 6 |
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
| 7 |
+
|
| 8 |
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
| 9 |
+
from .chat_completion_content_part_refusal_param import ChatCompletionContentPartRefusalParam
|
| 10 |
+
from .chat_completion_message_tool_call_union_param import ChatCompletionMessageToolCallUnionParam
|
| 11 |
+
|
| 12 |
+
__all__ = ["ChatCompletionAssistantMessageParam", "Audio", "ContentArrayOfContentPart", "FunctionCall"]
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class Audio(TypedDict, total=False):
|
| 16 |
+
"""
|
| 17 |
+
Data about a previous audio response from the model.
|
| 18 |
+
[Learn more](https://platform.openai.com/docs/guides/audio).
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
id: Required[str]
|
| 22 |
+
"""Unique identifier for a previous audio response from the model."""
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
ContentArrayOfContentPart: TypeAlias = Union[ChatCompletionContentPartTextParam, ChatCompletionContentPartRefusalParam]
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class FunctionCall(TypedDict, total=False):
|
| 29 |
+
"""Deprecated and replaced by `tool_calls`.
|
| 30 |
+
|
| 31 |
+
The name and arguments of a function that should be called, as generated by the model.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
arguments: Required[str]
|
| 35 |
+
"""
|
| 36 |
+
The arguments to call the function with, as generated by the model in JSON
|
| 37 |
+
format. Note that the model does not always generate valid JSON, and may
|
| 38 |
+
hallucinate parameters not defined by your function schema. Validate the
|
| 39 |
+
arguments in your code before calling your function.
|
| 40 |
+
"""
|
| 41 |
+
|
| 42 |
+
name: Required[str]
|
| 43 |
+
"""The name of the function to call."""
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
class ChatCompletionAssistantMessageParam(TypedDict, total=False):
|
| 47 |
+
"""Messages sent by the model in response to user messages."""
|
| 48 |
+
|
| 49 |
+
role: Required[Literal["assistant"]]
|
| 50 |
+
"""The role of the messages author, in this case `assistant`."""
|
| 51 |
+
|
| 52 |
+
audio: Optional[Audio]
|
| 53 |
+
"""
|
| 54 |
+
Data about a previous audio response from the model.
|
| 55 |
+
[Learn more](https://platform.openai.com/docs/guides/audio).
|
| 56 |
+
"""
|
| 57 |
+
|
| 58 |
+
content: Union[str, Iterable[ContentArrayOfContentPart], None]
|
| 59 |
+
"""The contents of the assistant message.
|
| 60 |
+
|
| 61 |
+
Required unless `tool_calls` or `function_call` is specified.
|
| 62 |
+
"""
|
| 63 |
+
|
| 64 |
+
function_call: Optional[FunctionCall]
|
| 65 |
+
"""Deprecated and replaced by `tool_calls`.
|
| 66 |
+
|
| 67 |
+
The name and arguments of a function that should be called, as generated by the
|
| 68 |
+
model.
|
| 69 |
+
"""
|
| 70 |
+
|
| 71 |
+
name: str
|
| 72 |
+
"""An optional name for the participant.
|
| 73 |
+
|
| 74 |
+
Provides the model information to differentiate between participants of the same
|
| 75 |
+
role.
|
| 76 |
+
"""
|
| 77 |
+
|
| 78 |
+
refusal: Optional[str]
|
| 79 |
+
"""The refusal message by the assistant."""
|
| 80 |
+
|
| 81 |
+
tool_calls: Iterable[ChatCompletionMessageToolCallUnionParam]
|
| 82 |
+
"""The tool calls generated by the model, such as function calls."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_content_part_image.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["ChatCompletionContentPartImage", "ImageURL"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ImageURL(BaseModel):
|
| 12 |
+
url: str
|
| 13 |
+
"""Either a URL of the image or the base64 encoded image data."""
|
| 14 |
+
|
| 15 |
+
detail: Optional[Literal["auto", "low", "high"]] = None
|
| 16 |
+
"""Specifies the detail level of the image.
|
| 17 |
+
|
| 18 |
+
Learn more in the
|
| 19 |
+
[Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class ChatCompletionContentPartImage(BaseModel):
|
| 24 |
+
"""Learn about [image inputs](https://platform.openai.com/docs/guides/vision)."""
|
| 25 |
+
|
| 26 |
+
image_url: ImageURL
|
| 27 |
+
|
| 28 |
+
type: Literal["image_url"]
|
| 29 |
+
"""The type of the content part."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_message_tool_call_param.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import TypeAlias
|
| 6 |
+
|
| 7 |
+
from .chat_completion_message_function_tool_call_param import (
|
| 8 |
+
Function as Function,
|
| 9 |
+
ChatCompletionMessageFunctionToolCallParam,
|
| 10 |
+
)
|
| 11 |
+
|
| 12 |
+
__all__ = ["ChatCompletionMessageToolCallParam", "Function"]
|
| 13 |
+
|
| 14 |
+
ChatCompletionMessageToolCallParam: TypeAlias = ChatCompletionMessageFunctionToolCallParam
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/chat_completion_prediction_content_param.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union, Iterable
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
|
| 9 |
+
|
| 10 |
+
__all__ = ["ChatCompletionPredictionContentParam"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class ChatCompletionPredictionContentParam(TypedDict, total=False):
|
| 14 |
+
"""
|
| 15 |
+
Static predicted output content, such as the content of a text file that is
|
| 16 |
+
being regenerated.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
content: Required[Union[str, Iterable[ChatCompletionContentPartTextParam]]]
|
| 20 |
+
"""
|
| 21 |
+
The content that should be matched when generating a model response. If
|
| 22 |
+
generated tokens would match this content, the entire model response can be
|
| 23 |
+
returned much more quickly.
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
type: Required[Literal["content"]]
|
| 27 |
+
"""The type of the predicted content you want to provide.
|
| 28 |
+
|
| 29 |
+
This type is currently always `content`.
|
| 30 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/chat/completion_list_params.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Optional
|
| 6 |
+
from typing_extensions import Literal, TypedDict
|
| 7 |
+
|
| 8 |
+
from ..shared_params.metadata import Metadata
|
| 9 |
+
|
| 10 |
+
__all__ = ["CompletionListParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class CompletionListParams(TypedDict, total=False):
|
| 14 |
+
after: str
|
| 15 |
+
"""Identifier for the last chat completion from the previous pagination request."""
|
| 16 |
+
|
| 17 |
+
limit: int
|
| 18 |
+
"""Number of Chat Completions to retrieve."""
|
| 19 |
+
|
| 20 |
+
metadata: Optional[Metadata]
|
| 21 |
+
"""A list of metadata keys to filter the Chat Completions by. Example:
|
| 22 |
+
|
| 23 |
+
`metadata[key1]=value1&metadata[key2]=value2`
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
model: str
|
| 27 |
+
"""The model used to generate the Chat Completions."""
|
| 28 |
+
|
| 29 |
+
order: Literal["asc", "desc"]
|
| 30 |
+
"""Sort order for Chat Completions by timestamp.
|
| 31 |
+
|
| 32 |
+
Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.
|
| 33 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/__init__.py
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from .realtime_error import RealtimeError as RealtimeError
|
| 6 |
+
from .call_refer_params import CallReferParams as CallReferParams
|
| 7 |
+
from .conversation_item import ConversationItem as ConversationItem
|
| 8 |
+
from .realtime_response import RealtimeResponse as RealtimeResponse
|
| 9 |
+
from .call_accept_params import CallAcceptParams as CallAcceptParams
|
| 10 |
+
from .call_create_params import CallCreateParams as CallCreateParams
|
| 11 |
+
from .call_reject_params import CallRejectParams as CallRejectParams
|
| 12 |
+
from .realtime_reasoning import RealtimeReasoning as RealtimeReasoning
|
| 13 |
+
from .audio_transcription import AudioTranscription as AudioTranscription
|
| 14 |
+
from .log_prob_properties import LogProbProperties as LogProbProperties
|
| 15 |
+
from .realtime_truncation import RealtimeTruncation as RealtimeTruncation
|
| 16 |
+
from .response_done_event import ResponseDoneEvent as ResponseDoneEvent
|
| 17 |
+
from .noise_reduction_type import NoiseReductionType as NoiseReductionType
|
| 18 |
+
from .realtime_error_event import RealtimeErrorEvent as RealtimeErrorEvent
|
| 19 |
+
from .session_update_event import SessionUpdateEvent as SessionUpdateEvent
|
| 20 |
+
from .mcp_list_tools_failed import McpListToolsFailed as McpListToolsFailed
|
| 21 |
+
from .realtime_audio_config import RealtimeAudioConfig as RealtimeAudioConfig
|
| 22 |
+
from .realtime_client_event import RealtimeClientEvent as RealtimeClientEvent
|
| 23 |
+
from .realtime_server_event import RealtimeServerEvent as RealtimeServerEvent
|
| 24 |
+
from .realtime_tools_config import RealtimeToolsConfig as RealtimeToolsConfig
|
| 25 |
+
from .response_cancel_event import ResponseCancelEvent as ResponseCancelEvent
|
| 26 |
+
from .response_create_event import ResponseCreateEvent as ResponseCreateEvent
|
| 27 |
+
from .session_created_event import SessionCreatedEvent as SessionCreatedEvent
|
| 28 |
+
from .session_updated_event import SessionUpdatedEvent as SessionUpdatedEvent
|
| 29 |
+
from .conversation_item_done import ConversationItemDone as ConversationItemDone
|
| 30 |
+
from .realtime_audio_formats import RealtimeAudioFormats as RealtimeAudioFormats
|
| 31 |
+
from .realtime_function_tool import RealtimeFunctionTool as RealtimeFunctionTool
|
| 32 |
+
from .realtime_mcp_tool_call import RealtimeMcpToolCall as RealtimeMcpToolCall
|
| 33 |
+
from .realtime_mcphttp_error import RealtimeMcphttpError as RealtimeMcphttpError
|
| 34 |
+
from .response_created_event import ResponseCreatedEvent as ResponseCreatedEvent
|
| 35 |
+
from .conversation_item_added import ConversationItemAdded as ConversationItemAdded
|
| 36 |
+
from .conversation_item_param import ConversationItemParam as ConversationItemParam
|
| 37 |
+
from .realtime_connect_params import RealtimeConnectParams as RealtimeConnectParams
|
| 38 |
+
from .realtime_mcp_list_tools import RealtimeMcpListTools as RealtimeMcpListTools
|
| 39 |
+
from .realtime_response_usage import RealtimeResponseUsage as RealtimeResponseUsage
|
| 40 |
+
from .realtime_tracing_config import RealtimeTracingConfig as RealtimeTracingConfig
|
| 41 |
+
from .mcp_list_tools_completed import McpListToolsCompleted as McpListToolsCompleted
|
| 42 |
+
from .realtime_reasoning_param import RealtimeReasoningParam as RealtimeReasoningParam
|
| 43 |
+
from .realtime_response_status import RealtimeResponseStatus as RealtimeResponseStatus
|
| 44 |
+
from .response_mcp_call_failed import ResponseMcpCallFailed as ResponseMcpCallFailed
|
| 45 |
+
from .response_text_done_event import ResponseTextDoneEvent as ResponseTextDoneEvent
|
| 46 |
+
from .audio_transcription_param import AudioTranscriptionParam as AudioTranscriptionParam
|
| 47 |
+
from .rate_limits_updated_event import RateLimitsUpdatedEvent as RateLimitsUpdatedEvent
|
| 48 |
+
from .realtime_reasoning_effort import RealtimeReasoningEffort as RealtimeReasoningEffort
|
| 49 |
+
from .realtime_truncation_param import RealtimeTruncationParam as RealtimeTruncationParam
|
| 50 |
+
from .response_audio_done_event import ResponseAudioDoneEvent as ResponseAudioDoneEvent
|
| 51 |
+
from .response_text_delta_event import ResponseTextDeltaEvent as ResponseTextDeltaEvent
|
| 52 |
+
from .conversation_created_event import ConversationCreatedEvent as ConversationCreatedEvent
|
| 53 |
+
from .mcp_list_tools_in_progress import McpListToolsInProgress as McpListToolsInProgress
|
| 54 |
+
from .response_audio_delta_event import ResponseAudioDeltaEvent as ResponseAudioDeltaEvent
|
| 55 |
+
from .session_update_event_param import SessionUpdateEventParam as SessionUpdateEventParam
|
| 56 |
+
from .client_secret_create_params import ClientSecretCreateParams as ClientSecretCreateParams
|
| 57 |
+
from .realtime_audio_config_input import RealtimeAudioConfigInput as RealtimeAudioConfigInput
|
| 58 |
+
from .realtime_audio_config_param import RealtimeAudioConfigParam as RealtimeAudioConfigParam
|
| 59 |
+
from .realtime_client_event_param import RealtimeClientEventParam as RealtimeClientEventParam
|
| 60 |
+
from .realtime_mcp_protocol_error import RealtimeMcpProtocolError as RealtimeMcpProtocolError
|
| 61 |
+
from .realtime_tool_choice_config import RealtimeToolChoiceConfig as RealtimeToolChoiceConfig
|
| 62 |
+
from .realtime_tools_config_param import RealtimeToolsConfigParam as RealtimeToolsConfigParam
|
| 63 |
+
from .realtime_tools_config_union import RealtimeToolsConfigUnion as RealtimeToolsConfigUnion
|
| 64 |
+
from .response_cancel_event_param import ResponseCancelEventParam as ResponseCancelEventParam
|
| 65 |
+
from .response_create_event_param import ResponseCreateEventParam as ResponseCreateEventParam
|
| 66 |
+
from .response_mcp_call_completed import ResponseMcpCallCompleted as ResponseMcpCallCompleted
|
| 67 |
+
from .realtime_audio_config_output import RealtimeAudioConfigOutput as RealtimeAudioConfigOutput
|
| 68 |
+
from .realtime_audio_formats_param import RealtimeAudioFormatsParam as RealtimeAudioFormatsParam
|
| 69 |
+
from .realtime_function_tool_param import RealtimeFunctionToolParam as RealtimeFunctionToolParam
|
| 70 |
+
from .realtime_mcp_tool_call_param import RealtimeMcpToolCallParam as RealtimeMcpToolCallParam
|
| 71 |
+
from .realtime_mcphttp_error_param import RealtimeMcphttpErrorParam as RealtimeMcphttpErrorParam
|
| 72 |
+
from .client_secret_create_response import ClientSecretCreateResponse as ClientSecretCreateResponse
|
| 73 |
+
from .realtime_mcp_approval_request import RealtimeMcpApprovalRequest as RealtimeMcpApprovalRequest
|
| 74 |
+
from .realtime_mcp_list_tools_param import RealtimeMcpListToolsParam as RealtimeMcpListToolsParam
|
| 75 |
+
from .realtime_tracing_config_param import RealtimeTracingConfigParam as RealtimeTracingConfigParam
|
| 76 |
+
from .response_mcp_call_in_progress import ResponseMcpCallInProgress as ResponseMcpCallInProgress
|
| 77 |
+
from .conversation_item_create_event import ConversationItemCreateEvent as ConversationItemCreateEvent
|
| 78 |
+
from .conversation_item_delete_event import ConversationItemDeleteEvent as ConversationItemDeleteEvent
|
| 79 |
+
from .input_audio_buffer_clear_event import InputAudioBufferClearEvent as InputAudioBufferClearEvent
|
| 80 |
+
from .realtime_mcp_approval_response import RealtimeMcpApprovalResponse as RealtimeMcpApprovalResponse
|
| 81 |
+
from .conversation_item_created_event import ConversationItemCreatedEvent as ConversationItemCreatedEvent
|
| 82 |
+
from .conversation_item_deleted_event import ConversationItemDeletedEvent as ConversationItemDeletedEvent
|
| 83 |
+
from .input_audio_buffer_append_event import InputAudioBufferAppendEvent as InputAudioBufferAppendEvent
|
| 84 |
+
from .input_audio_buffer_commit_event import InputAudioBufferCommitEvent as InputAudioBufferCommitEvent
|
| 85 |
+
from .output_audio_buffer_clear_event import OutputAudioBufferClearEvent as OutputAudioBufferClearEvent
|
| 86 |
+
from .realtime_response_create_params import RealtimeResponseCreateParams as RealtimeResponseCreateParams
|
| 87 |
+
from .realtime_session_create_request import RealtimeSessionCreateRequest as RealtimeSessionCreateRequest
|
| 88 |
+
from .response_output_item_done_event import ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent
|
| 89 |
+
from .conversation_item_retrieve_event import ConversationItemRetrieveEvent as ConversationItemRetrieveEvent
|
| 90 |
+
from .conversation_item_truncate_event import ConversationItemTruncateEvent as ConversationItemTruncateEvent
|
| 91 |
+
from .input_audio_buffer_cleared_event import InputAudioBufferClearedEvent as InputAudioBufferClearedEvent
|
| 92 |
+
from .realtime_session_create_response import RealtimeSessionCreateResponse as RealtimeSessionCreateResponse
|
| 93 |
+
from .response_content_part_done_event import ResponseContentPartDoneEvent as ResponseContentPartDoneEvent
|
| 94 |
+
from .response_mcp_call_arguments_done import ResponseMcpCallArgumentsDone as ResponseMcpCallArgumentsDone
|
| 95 |
+
from .response_output_item_added_event import ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent
|
| 96 |
+
from .conversation_item_truncated_event import ConversationItemTruncatedEvent as ConversationItemTruncatedEvent
|
| 97 |
+
from .realtime_audio_config_input_param import RealtimeAudioConfigInputParam as RealtimeAudioConfigInputParam
|
| 98 |
+
from .realtime_mcp_protocol_error_param import RealtimeMcpProtocolErrorParam as RealtimeMcpProtocolErrorParam
|
| 99 |
+
from .realtime_mcp_tool_execution_error import RealtimeMcpToolExecutionError as RealtimeMcpToolExecutionError
|
| 100 |
+
from .realtime_response_create_mcp_tool import RealtimeResponseCreateMcpTool as RealtimeResponseCreateMcpTool
|
| 101 |
+
from .realtime_tool_choice_config_param import RealtimeToolChoiceConfigParam as RealtimeToolChoiceConfigParam
|
| 102 |
+
from .realtime_tools_config_union_param import RealtimeToolsConfigUnionParam as RealtimeToolsConfigUnionParam
|
| 103 |
+
from .response_content_part_added_event import ResponseContentPartAddedEvent as ResponseContentPartAddedEvent
|
| 104 |
+
from .response_mcp_call_arguments_delta import ResponseMcpCallArgumentsDelta as ResponseMcpCallArgumentsDelta
|
| 105 |
+
from .input_audio_buffer_committed_event import InputAudioBufferCommittedEvent as InputAudioBufferCommittedEvent
|
| 106 |
+
from .realtime_audio_config_output_param import RealtimeAudioConfigOutputParam as RealtimeAudioConfigOutputParam
|
| 107 |
+
from .realtime_audio_input_turn_detection import RealtimeAudioInputTurnDetection as RealtimeAudioInputTurnDetection
|
| 108 |
+
from .realtime_mcp_approval_request_param import RealtimeMcpApprovalRequestParam as RealtimeMcpApprovalRequestParam
|
| 109 |
+
from .realtime_truncation_retention_ratio import RealtimeTruncationRetentionRatio as RealtimeTruncationRetentionRatio
|
| 110 |
+
from .conversation_item_create_event_param import ConversationItemCreateEventParam as ConversationItemCreateEventParam
|
| 111 |
+
from .conversation_item_delete_event_param import ConversationItemDeleteEventParam as ConversationItemDeleteEventParam
|
| 112 |
+
from .input_audio_buffer_clear_event_param import InputAudioBufferClearEventParam as InputAudioBufferClearEventParam
|
| 113 |
+
from .input_audio_buffer_timeout_triggered import InputAudioBufferTimeoutTriggered as InputAudioBufferTimeoutTriggered
|
| 114 |
+
from .realtime_mcp_approval_response_param import RealtimeMcpApprovalResponseParam as RealtimeMcpApprovalResponseParam
|
| 115 |
+
from .realtime_transcription_session_audio import RealtimeTranscriptionSessionAudio as RealtimeTranscriptionSessionAudio
|
| 116 |
+
from .response_audio_transcript_done_event import ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent
|
| 117 |
+
from .input_audio_buffer_append_event_param import InputAudioBufferAppendEventParam as InputAudioBufferAppendEventParam
|
| 118 |
+
from .input_audio_buffer_commit_event_param import InputAudioBufferCommitEventParam as InputAudioBufferCommitEventParam
|
| 119 |
+
from .output_audio_buffer_clear_event_param import OutputAudioBufferClearEventParam as OutputAudioBufferClearEventParam
|
| 120 |
+
from .realtime_response_create_audio_output import (
|
| 121 |
+
RealtimeResponseCreateAudioOutput as RealtimeResponseCreateAudioOutput,
|
| 122 |
+
)
|
| 123 |
+
from .realtime_response_create_params_param import (
|
| 124 |
+
RealtimeResponseCreateParamsParam as RealtimeResponseCreateParamsParam,
|
| 125 |
+
)
|
| 126 |
+
from .realtime_session_create_request_param import (
|
| 127 |
+
RealtimeSessionCreateRequestParam as RealtimeSessionCreateRequestParam,
|
| 128 |
+
)
|
| 129 |
+
from .response_audio_transcript_delta_event import (
|
| 130 |
+
ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent,
|
| 131 |
+
)
|
| 132 |
+
from .conversation_item_retrieve_event_param import (
|
| 133 |
+
ConversationItemRetrieveEventParam as ConversationItemRetrieveEventParam,
|
| 134 |
+
)
|
| 135 |
+
from .conversation_item_truncate_event_param import (
|
| 136 |
+
ConversationItemTruncateEventParam as ConversationItemTruncateEventParam,
|
| 137 |
+
)
|
| 138 |
+
from .input_audio_buffer_speech_started_event import (
|
| 139 |
+
InputAudioBufferSpeechStartedEvent as InputAudioBufferSpeechStartedEvent,
|
| 140 |
+
)
|
| 141 |
+
from .input_audio_buffer_speech_stopped_event import (
|
| 142 |
+
InputAudioBufferSpeechStoppedEvent as InputAudioBufferSpeechStoppedEvent,
|
| 143 |
+
)
|
| 144 |
+
from .realtime_conversation_item_user_message import (
|
| 145 |
+
RealtimeConversationItemUserMessage as RealtimeConversationItemUserMessage,
|
| 146 |
+
)
|
| 147 |
+
from .realtime_mcp_tool_execution_error_param import (
|
| 148 |
+
RealtimeMcpToolExecutionErrorParam as RealtimeMcpToolExecutionErrorParam,
|
| 149 |
+
)
|
| 150 |
+
from .realtime_response_create_mcp_tool_param import (
|
| 151 |
+
RealtimeResponseCreateMcpToolParam as RealtimeResponseCreateMcpToolParam,
|
| 152 |
+
)
|
| 153 |
+
from .realtime_conversation_item_function_call import (
|
| 154 |
+
RealtimeConversationItemFunctionCall as RealtimeConversationItemFunctionCall,
|
| 155 |
+
)
|
| 156 |
+
from .realtime_audio_input_turn_detection_param import (
|
| 157 |
+
RealtimeAudioInputTurnDetectionParam as RealtimeAudioInputTurnDetectionParam,
|
| 158 |
+
)
|
| 159 |
+
from .realtime_conversation_item_system_message import (
|
| 160 |
+
RealtimeConversationItemSystemMessage as RealtimeConversationItemSystemMessage,
|
| 161 |
+
)
|
| 162 |
+
from .realtime_truncation_retention_ratio_param import (
|
| 163 |
+
RealtimeTruncationRetentionRatioParam as RealtimeTruncationRetentionRatioParam,
|
| 164 |
+
)
|
| 165 |
+
from .realtime_transcription_session_audio_input import (
|
| 166 |
+
RealtimeTranscriptionSessionAudioInput as RealtimeTranscriptionSessionAudioInput,
|
| 167 |
+
)
|
| 168 |
+
from .realtime_transcription_session_audio_param import (
|
| 169 |
+
RealtimeTranscriptionSessionAudioParam as RealtimeTranscriptionSessionAudioParam,
|
| 170 |
+
)
|
| 171 |
+
from .realtime_response_create_audio_output_param import (
|
| 172 |
+
RealtimeResponseCreateAudioOutputParam as RealtimeResponseCreateAudioOutputParam,
|
| 173 |
+
)
|
| 174 |
+
from .realtime_response_usage_input_token_details import (
|
| 175 |
+
RealtimeResponseUsageInputTokenDetails as RealtimeResponseUsageInputTokenDetails,
|
| 176 |
+
)
|
| 177 |
+
from .response_function_call_arguments_done_event import (
|
| 178 |
+
ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent,
|
| 179 |
+
)
|
| 180 |
+
from .input_audio_buffer_dtmf_event_received_event import (
|
| 181 |
+
InputAudioBufferDtmfEventReceivedEvent as InputAudioBufferDtmfEventReceivedEvent,
|
| 182 |
+
)
|
| 183 |
+
from .realtime_conversation_item_assistant_message import (
|
| 184 |
+
RealtimeConversationItemAssistantMessage as RealtimeConversationItemAssistantMessage,
|
| 185 |
+
)
|
| 186 |
+
from .realtime_response_usage_output_token_details import (
|
| 187 |
+
RealtimeResponseUsageOutputTokenDetails as RealtimeResponseUsageOutputTokenDetails,
|
| 188 |
+
)
|
| 189 |
+
from .response_function_call_arguments_delta_event import (
|
| 190 |
+
ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent,
|
| 191 |
+
)
|
| 192 |
+
from .realtime_conversation_item_user_message_param import (
|
| 193 |
+
RealtimeConversationItemUserMessageParam as RealtimeConversationItemUserMessageParam,
|
| 194 |
+
)
|
| 195 |
+
from .realtime_transcription_session_create_request import (
|
| 196 |
+
RealtimeTranscriptionSessionCreateRequest as RealtimeTranscriptionSessionCreateRequest,
|
| 197 |
+
)
|
| 198 |
+
from .realtime_transcription_session_turn_detection import (
|
| 199 |
+
RealtimeTranscriptionSessionTurnDetection as RealtimeTranscriptionSessionTurnDetection,
|
| 200 |
+
)
|
| 201 |
+
from .realtime_conversation_item_function_call_param import (
|
| 202 |
+
RealtimeConversationItemFunctionCallParam as RealtimeConversationItemFunctionCallParam,
|
| 203 |
+
)
|
| 204 |
+
from .realtime_transcription_session_create_response import (
|
| 205 |
+
RealtimeTranscriptionSessionCreateResponse as RealtimeTranscriptionSessionCreateResponse,
|
| 206 |
+
)
|
| 207 |
+
from .realtime_conversation_item_function_call_output import (
|
| 208 |
+
RealtimeConversationItemFunctionCallOutput as RealtimeConversationItemFunctionCallOutput,
|
| 209 |
+
)
|
| 210 |
+
from .realtime_conversation_item_system_message_param import (
|
| 211 |
+
RealtimeConversationItemSystemMessageParam as RealtimeConversationItemSystemMessageParam,
|
| 212 |
+
)
|
| 213 |
+
from .realtime_transcription_session_audio_input_param import (
|
| 214 |
+
RealtimeTranscriptionSessionAudioInputParam as RealtimeTranscriptionSessionAudioInputParam,
|
| 215 |
+
)
|
| 216 |
+
from .realtime_conversation_item_assistant_message_param import (
|
| 217 |
+
RealtimeConversationItemAssistantMessageParam as RealtimeConversationItemAssistantMessageParam,
|
| 218 |
+
)
|
| 219 |
+
from .conversation_item_input_audio_transcription_segment import (
|
| 220 |
+
ConversationItemInputAudioTranscriptionSegment as ConversationItemInputAudioTranscriptionSegment,
|
| 221 |
+
)
|
| 222 |
+
from .realtime_transcription_session_create_request_param import (
|
| 223 |
+
RealtimeTranscriptionSessionCreateRequestParam as RealtimeTranscriptionSessionCreateRequestParam,
|
| 224 |
+
)
|
| 225 |
+
from .realtime_conversation_item_function_call_output_param import (
|
| 226 |
+
RealtimeConversationItemFunctionCallOutputParam as RealtimeConversationItemFunctionCallOutputParam,
|
| 227 |
+
)
|
| 228 |
+
from .conversation_item_input_audio_transcription_delta_event import (
|
| 229 |
+
ConversationItemInputAudioTranscriptionDeltaEvent as ConversationItemInputAudioTranscriptionDeltaEvent,
|
| 230 |
+
)
|
| 231 |
+
from .conversation_item_input_audio_transcription_failed_event import (
|
| 232 |
+
ConversationItemInputAudioTranscriptionFailedEvent as ConversationItemInputAudioTranscriptionFailedEvent,
|
| 233 |
+
)
|
| 234 |
+
from .realtime_transcription_session_audio_input_turn_detection import (
|
| 235 |
+
RealtimeTranscriptionSessionAudioInputTurnDetection as RealtimeTranscriptionSessionAudioInputTurnDetection,
|
| 236 |
+
)
|
| 237 |
+
from .conversation_item_input_audio_transcription_completed_event import (
|
| 238 |
+
ConversationItemInputAudioTranscriptionCompletedEvent as ConversationItemInputAudioTranscriptionCompletedEvent,
|
| 239 |
+
)
|
| 240 |
+
from .realtime_transcription_session_audio_input_turn_detection_param import (
|
| 241 |
+
RealtimeTranscriptionSessionAudioInputTurnDetectionParam as RealtimeTranscriptionSessionAudioInputTurnDetectionParam,
|
| 242 |
+
)
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/audio_transcription.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Union, Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["AudioTranscription"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class AudioTranscription(BaseModel):
|
| 12 |
+
delay: Optional[Literal["minimal", "low", "medium", "high", "xhigh"]] = None
|
| 13 |
+
"""
|
| 14 |
+
Controls how long the model waits before emitting transcription text. Higher
|
| 15 |
+
values can improve transcription accuracy at the cost of latency. Only supported
|
| 16 |
+
with `gpt-realtime-whisper` in GA Realtime sessions.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
language: Optional[str] = None
|
| 20 |
+
"""The language of the input audio.
|
| 21 |
+
|
| 22 |
+
Supplying the input language in
|
| 23 |
+
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
| 24 |
+
format will improve accuracy and latency.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
model: Union[
|
| 28 |
+
str,
|
| 29 |
+
Literal[
|
| 30 |
+
"whisper-1",
|
| 31 |
+
"gpt-4o-mini-transcribe",
|
| 32 |
+
"gpt-4o-mini-transcribe-2025-12-15",
|
| 33 |
+
"gpt-4o-transcribe",
|
| 34 |
+
"gpt-4o-transcribe-diarize",
|
| 35 |
+
"gpt-realtime-whisper",
|
| 36 |
+
],
|
| 37 |
+
None,
|
| 38 |
+
] = None
|
| 39 |
+
"""The model to use for transcription.
|
| 40 |
+
|
| 41 |
+
Current options are `whisper-1`, `gpt-4o-mini-transcribe`,
|
| 42 |
+
`gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
| 43 |
+
`gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
| 44 |
+
`gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
| 45 |
+
"""
|
| 46 |
+
|
| 47 |
+
prompt: Optional[str] = None
|
| 48 |
+
"""
|
| 49 |
+
An optional text to guide the model's style or continue a previous audio
|
| 50 |
+
segment. For `whisper-1`, the
|
| 51 |
+
[prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
|
| 52 |
+
For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the
|
| 53 |
+
prompt is a free text string, for example "expect words related to technology".
|
| 54 |
+
Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.
|
| 55 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/audio_transcription_param.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import Literal, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["AudioTranscriptionParam"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class AudioTranscriptionParam(TypedDict, total=False):
|
| 12 |
+
delay: Literal["minimal", "low", "medium", "high", "xhigh"]
|
| 13 |
+
"""
|
| 14 |
+
Controls how long the model waits before emitting transcription text. Higher
|
| 15 |
+
values can improve transcription accuracy at the cost of latency. Only supported
|
| 16 |
+
with `gpt-realtime-whisper` in GA Realtime sessions.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
language: str
|
| 20 |
+
"""The language of the input audio.
|
| 21 |
+
|
| 22 |
+
Supplying the input language in
|
| 23 |
+
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`)
|
| 24 |
+
format will improve accuracy and latency.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
model: Union[
|
| 28 |
+
str,
|
| 29 |
+
Literal[
|
| 30 |
+
"whisper-1",
|
| 31 |
+
"gpt-4o-mini-transcribe",
|
| 32 |
+
"gpt-4o-mini-transcribe-2025-12-15",
|
| 33 |
+
"gpt-4o-transcribe",
|
| 34 |
+
"gpt-4o-transcribe-diarize",
|
| 35 |
+
"gpt-realtime-whisper",
|
| 36 |
+
],
|
| 37 |
+
]
|
| 38 |
+
"""The model to use for transcription.
|
| 39 |
+
|
| 40 |
+
Current options are `whisper-1`, `gpt-4o-mini-transcribe`,
|
| 41 |
+
`gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
|
| 42 |
+
`gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
|
| 43 |
+
`gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
prompt: str
|
| 47 |
+
"""
|
| 48 |
+
An optional text to guide the model's style or continue a previous audio
|
| 49 |
+
segment. For `whisper-1`, the
|
| 50 |
+
[prompt is a list of keywords](https://platform.openai.com/docs/guides/speech-to-text#prompting).
|
| 51 |
+
For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the
|
| 52 |
+
prompt is a free text string, for example "expect words related to technology".
|
| 53 |
+
Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.
|
| 54 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_accept_params.py
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import List, Union, Optional
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from .realtime_reasoning_param import RealtimeReasoningParam
|
| 9 |
+
from .realtime_truncation_param import RealtimeTruncationParam
|
| 10 |
+
from .realtime_audio_config_param import RealtimeAudioConfigParam
|
| 11 |
+
from .realtime_tools_config_param import RealtimeToolsConfigParam
|
| 12 |
+
from .realtime_tracing_config_param import RealtimeTracingConfigParam
|
| 13 |
+
from ..responses.response_prompt_param import ResponsePromptParam
|
| 14 |
+
from .realtime_tool_choice_config_param import RealtimeToolChoiceConfigParam
|
| 15 |
+
|
| 16 |
+
__all__ = ["CallAcceptParams"]
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class CallAcceptParams(TypedDict, total=False):
|
| 20 |
+
type: Required[Literal["realtime"]]
|
| 21 |
+
"""The type of session to create. Always `realtime` for the Realtime API."""
|
| 22 |
+
|
| 23 |
+
audio: RealtimeAudioConfigParam
|
| 24 |
+
"""Configuration for input and output audio."""
|
| 25 |
+
|
| 26 |
+
include: List[Literal["item.input_audio_transcription.logprobs"]]
|
| 27 |
+
"""Additional fields to include in server outputs.
|
| 28 |
+
|
| 29 |
+
`item.input_audio_transcription.logprobs`: Include logprobs for input audio
|
| 30 |
+
transcription.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
instructions: str
|
| 34 |
+
"""The default system instructions (i.e.
|
| 35 |
+
|
| 36 |
+
system message) prepended to model calls. This field allows the client to guide
|
| 37 |
+
the model on desired responses. The model can be instructed on response content
|
| 38 |
+
and format, (e.g. "be extremely succinct", "act friendly", "here are examples of
|
| 39 |
+
good responses") and on audio behavior (e.g. "talk quickly", "inject emotion
|
| 40 |
+
into your voice", "laugh frequently"). The instructions are not guaranteed to be
|
| 41 |
+
followed by the model, but they provide guidance to the model on the desired
|
| 42 |
+
behavior.
|
| 43 |
+
|
| 44 |
+
Note that the server sets default instructions which will be used if this field
|
| 45 |
+
is not set and are visible in the `session.created` event at the start of the
|
| 46 |
+
session.
|
| 47 |
+
"""
|
| 48 |
+
|
| 49 |
+
max_output_tokens: Union[int, Literal["inf"]]
|
| 50 |
+
"""
|
| 51 |
+
Maximum number of output tokens for a single assistant response, inclusive of
|
| 52 |
+
tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
| 53 |
+
`inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
model: Union[
|
| 57 |
+
str,
|
| 58 |
+
Literal[
|
| 59 |
+
"gpt-realtime",
|
| 60 |
+
"gpt-realtime-1.5",
|
| 61 |
+
"gpt-realtime-2",
|
| 62 |
+
"gpt-realtime-2025-08-28",
|
| 63 |
+
"gpt-4o-realtime-preview",
|
| 64 |
+
"gpt-4o-realtime-preview-2024-10-01",
|
| 65 |
+
"gpt-4o-realtime-preview-2024-12-17",
|
| 66 |
+
"gpt-4o-realtime-preview-2025-06-03",
|
| 67 |
+
"gpt-4o-mini-realtime-preview",
|
| 68 |
+
"gpt-4o-mini-realtime-preview-2024-12-17",
|
| 69 |
+
"gpt-realtime-mini",
|
| 70 |
+
"gpt-realtime-mini-2025-10-06",
|
| 71 |
+
"gpt-realtime-mini-2025-12-15",
|
| 72 |
+
"gpt-audio-1.5",
|
| 73 |
+
"gpt-audio-mini",
|
| 74 |
+
"gpt-audio-mini-2025-10-06",
|
| 75 |
+
"gpt-audio-mini-2025-12-15",
|
| 76 |
+
],
|
| 77 |
+
]
|
| 78 |
+
"""The Realtime model used for this session."""
|
| 79 |
+
|
| 80 |
+
output_modalities: List[Literal["text", "audio"]]
|
| 81 |
+
"""The set of modalities the model can respond with.
|
| 82 |
+
|
| 83 |
+
It defaults to `["audio"]`, indicating that the model will respond with audio
|
| 84 |
+
plus a transcript. `["text"]` can be used to make the model respond with text
|
| 85 |
+
only. It is not possible to request both `text` and `audio` at the same time.
|
| 86 |
+
"""
|
| 87 |
+
|
| 88 |
+
parallel_tool_calls: bool
|
| 89 |
+
"""Whether the model may call multiple tools in parallel.
|
| 90 |
+
|
| 91 |
+
Only supported by reasoning Realtime models such as `gpt-realtime-2`.
|
| 92 |
+
"""
|
| 93 |
+
|
| 94 |
+
prompt: Optional[ResponsePromptParam]
|
| 95 |
+
"""
|
| 96 |
+
Reference to a prompt template and its variables.
|
| 97 |
+
[Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
| 98 |
+
"""
|
| 99 |
+
|
| 100 |
+
reasoning: RealtimeReasoningParam
|
| 101 |
+
"""Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`."""
|
| 102 |
+
|
| 103 |
+
tool_choice: RealtimeToolChoiceConfigParam
|
| 104 |
+
"""How the model chooses tools.
|
| 105 |
+
|
| 106 |
+
Provide one of the string modes or force a specific function/MCP tool.
|
| 107 |
+
"""
|
| 108 |
+
|
| 109 |
+
tools: RealtimeToolsConfigParam
|
| 110 |
+
"""Tools available to the model."""
|
| 111 |
+
|
| 112 |
+
tracing: Optional[RealtimeTracingConfigParam]
|
| 113 |
+
"""
|
| 114 |
+
Realtime API can write session traces to the
|
| 115 |
+
[Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to
|
| 116 |
+
disable tracing. Once tracing is enabled for a session, the configuration cannot
|
| 117 |
+
be modified.
|
| 118 |
+
|
| 119 |
+
`auto` will create a trace for the session with default values for the workflow
|
| 120 |
+
name, group id, and metadata.
|
| 121 |
+
"""
|
| 122 |
+
|
| 123 |
+
truncation: RealtimeTruncationParam
|
| 124 |
+
"""
|
| 125 |
+
When the number of tokens in a conversation exceeds the model's input token
|
| 126 |
+
limit, the conversation be truncated, meaning messages (starting from the
|
| 127 |
+
oldest) will not be included in the model's context. A 32k context model with
|
| 128 |
+
4,096 max output tokens can only include 28,224 tokens in the context before
|
| 129 |
+
truncation occurs.
|
| 130 |
+
|
| 131 |
+
Clients can configure truncation behavior to truncate with a lower max token
|
| 132 |
+
limit, which is an effective way to control token usage and cost.
|
| 133 |
+
|
| 134 |
+
Truncation will reduce the number of cached tokens on the next turn (busting the
|
| 135 |
+
cache), since messages are dropped from the beginning of the context. However,
|
| 136 |
+
clients can also configure truncation to retain messages up to a fraction of the
|
| 137 |
+
maximum context size, which will reduce the need for future truncations and thus
|
| 138 |
+
improve the cache rate.
|
| 139 |
+
|
| 140 |
+
Truncation can be disabled entirely, which means the server will never truncate
|
| 141 |
+
but would instead return an error if the conversation exceeds the model's input
|
| 142 |
+
token limit.
|
| 143 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_create_params.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Required, TypedDict
|
| 6 |
+
|
| 7 |
+
from .realtime_session_create_request_param import RealtimeSessionCreateRequestParam
|
| 8 |
+
|
| 9 |
+
__all__ = ["CallCreateParams"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class CallCreateParams(TypedDict, total=False):
|
| 13 |
+
sdp: Required[str]
|
| 14 |
+
"""WebRTC Session Description Protocol (SDP) offer generated by the caller."""
|
| 15 |
+
|
| 16 |
+
session: RealtimeSessionCreateRequestParam
|
| 17 |
+
"""Realtime session object configuration."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_refer_params.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["CallReferParams"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class CallReferParams(TypedDict, total=False):
|
| 11 |
+
target_uri: Required[str]
|
| 12 |
+
"""URI that should appear in the SIP Refer-To header.
|
| 13 |
+
|
| 14 |
+
Supports values like `tel:+14155550123` or `sip:agent@example.com`.
|
| 15 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/call_reject_params.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["CallRejectParams"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class CallRejectParams(TypedDict, total=False):
|
| 11 |
+
status_code: int
|
| 12 |
+
"""SIP response code to send back to the caller.
|
| 13 |
+
|
| 14 |
+
Defaults to `603` (Decline) when omitted.
|
| 15 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/client_secret_create_params.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import Literal, TypeAlias, TypedDict
|
| 7 |
+
|
| 8 |
+
from .realtime_session_create_request_param import RealtimeSessionCreateRequestParam
|
| 9 |
+
from .realtime_transcription_session_create_request_param import RealtimeTranscriptionSessionCreateRequestParam
|
| 10 |
+
|
| 11 |
+
__all__ = ["ClientSecretCreateParams", "ExpiresAfter", "Session"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class ClientSecretCreateParams(TypedDict, total=False):
|
| 15 |
+
expires_after: ExpiresAfter
|
| 16 |
+
"""Configuration for the client secret expiration.
|
| 17 |
+
|
| 18 |
+
Expiration refers to the time after which a client secret will no longer be
|
| 19 |
+
valid for creating sessions. The session itself may continue after that time
|
| 20 |
+
once started. A secret can be used to create multiple sessions until it expires.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
session: Session
|
| 24 |
+
"""Session configuration to use for the client secret.
|
| 25 |
+
|
| 26 |
+
Choose either a realtime session or a transcription session.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
class ExpiresAfter(TypedDict, total=False):
|
| 31 |
+
"""Configuration for the client secret expiration.
|
| 32 |
+
|
| 33 |
+
Expiration refers to the time after which
|
| 34 |
+
a client secret will no longer be valid for creating sessions. The session itself may
|
| 35 |
+
continue after that time once started. A secret can be used to create multiple sessions
|
| 36 |
+
until it expires.
|
| 37 |
+
"""
|
| 38 |
+
|
| 39 |
+
anchor: Literal["created_at"]
|
| 40 |
+
"""
|
| 41 |
+
The anchor point for the client secret expiration, meaning that `seconds` will
|
| 42 |
+
be added to the `created_at` time of the client secret to produce an expiration
|
| 43 |
+
timestamp. Only `created_at` is currently supported.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
seconds: int
|
| 47 |
+
"""The number of seconds from the anchor point to the expiration.
|
| 48 |
+
|
| 49 |
+
Select a value between `10` and `7200` (2 hours). This default to 600 seconds
|
| 50 |
+
(10 minutes) if not specified.
|
| 51 |
+
"""
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
Session: TypeAlias = Union[RealtimeSessionCreateRequestParam, RealtimeTranscriptionSessionCreateRequestParam]
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_created_event.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["ConversationCreatedEvent", "Conversation"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Conversation(BaseModel):
|
| 12 |
+
"""The conversation resource."""
|
| 13 |
+
|
| 14 |
+
id: Optional[str] = None
|
| 15 |
+
"""The unique ID of the conversation."""
|
| 16 |
+
|
| 17 |
+
object: Optional[Literal["realtime.conversation"]] = None
|
| 18 |
+
"""The object type, must be `realtime.conversation`."""
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class ConversationCreatedEvent(BaseModel):
|
| 22 |
+
"""Returned when a conversation is created. Emitted right after session creation."""
|
| 23 |
+
|
| 24 |
+
conversation: Conversation
|
| 25 |
+
"""The conversation resource."""
|
| 26 |
+
|
| 27 |
+
event_id: str
|
| 28 |
+
"""The unique ID of the server event."""
|
| 29 |
+
|
| 30 |
+
type: Literal["conversation.created"]
|
| 31 |
+
"""The event type, must be `conversation.created`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Union
|
| 4 |
+
from typing_extensions import Annotated, TypeAlias
|
| 5 |
+
|
| 6 |
+
from ..._utils import PropertyInfo
|
| 7 |
+
from .realtime_mcp_tool_call import RealtimeMcpToolCall
|
| 8 |
+
from .realtime_mcp_list_tools import RealtimeMcpListTools
|
| 9 |
+
from .realtime_mcp_approval_request import RealtimeMcpApprovalRequest
|
| 10 |
+
from .realtime_mcp_approval_response import RealtimeMcpApprovalResponse
|
| 11 |
+
from .realtime_conversation_item_user_message import RealtimeConversationItemUserMessage
|
| 12 |
+
from .realtime_conversation_item_function_call import RealtimeConversationItemFunctionCall
|
| 13 |
+
from .realtime_conversation_item_system_message import RealtimeConversationItemSystemMessage
|
| 14 |
+
from .realtime_conversation_item_assistant_message import RealtimeConversationItemAssistantMessage
|
| 15 |
+
from .realtime_conversation_item_function_call_output import RealtimeConversationItemFunctionCallOutput
|
| 16 |
+
|
| 17 |
+
__all__ = ["ConversationItem"]
|
| 18 |
+
|
| 19 |
+
ConversationItem: TypeAlias = Annotated[
|
| 20 |
+
Union[
|
| 21 |
+
RealtimeConversationItemSystemMessage,
|
| 22 |
+
RealtimeConversationItemUserMessage,
|
| 23 |
+
RealtimeConversationItemAssistantMessage,
|
| 24 |
+
RealtimeConversationItemFunctionCall,
|
| 25 |
+
RealtimeConversationItemFunctionCallOutput,
|
| 26 |
+
RealtimeMcpApprovalResponse,
|
| 27 |
+
RealtimeMcpListTools,
|
| 28 |
+
RealtimeMcpToolCall,
|
| 29 |
+
RealtimeMcpApprovalRequest,
|
| 30 |
+
],
|
| 31 |
+
PropertyInfo(discriminator="type"),
|
| 32 |
+
]
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_added.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
from .conversation_item import ConversationItem
|
| 8 |
+
|
| 9 |
+
__all__ = ["ConversationItemAdded"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class ConversationItemAdded(BaseModel):
|
| 13 |
+
"""Sent by the server when an Item is added to the default Conversation.
|
| 14 |
+
|
| 15 |
+
This can happen in several cases:
|
| 16 |
+
- When the client sends a `conversation.item.create` event.
|
| 17 |
+
- When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer.
|
| 18 |
+
- When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`).
|
| 19 |
+
|
| 20 |
+
The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
event_id: str
|
| 24 |
+
"""The unique ID of the server event."""
|
| 25 |
+
|
| 26 |
+
item: ConversationItem
|
| 27 |
+
"""A single item within a Realtime conversation."""
|
| 28 |
+
|
| 29 |
+
type: Literal["conversation.item.added"]
|
| 30 |
+
"""The event type, must be `conversation.item.added`."""
|
| 31 |
+
|
| 32 |
+
previous_item_id: Optional[str] = None
|
| 33 |
+
"""The ID of the item that precedes this one, if any.
|
| 34 |
+
|
| 35 |
+
This is used to maintain ordering when items are inserted.
|
| 36 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_created_event.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
from .conversation_item import ConversationItem
|
| 8 |
+
|
| 9 |
+
__all__ = ["ConversationItemCreatedEvent"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class ConversationItemCreatedEvent(BaseModel):
|
| 13 |
+
"""Returned when a conversation item is created.
|
| 14 |
+
|
| 15 |
+
There are several scenarios that produce this event:
|
| 16 |
+
- The server is generating a Response, which if successful will produce
|
| 17 |
+
either one or two Items, which will be of type `message`
|
| 18 |
+
(role `assistant`) or type `function_call`.
|
| 19 |
+
- The input audio buffer has been committed, either by the client or the
|
| 20 |
+
server (in `server_vad` mode). The server will take the content of the
|
| 21 |
+
input audio buffer and add it to a new user message Item.
|
| 22 |
+
- The client has sent a `conversation.item.create` event to add a new Item
|
| 23 |
+
to the Conversation.
|
| 24 |
+
"""
|
| 25 |
+
|
| 26 |
+
event_id: str
|
| 27 |
+
"""The unique ID of the server event."""
|
| 28 |
+
|
| 29 |
+
item: ConversationItem
|
| 30 |
+
"""A single item within a Realtime conversation."""
|
| 31 |
+
|
| 32 |
+
type: Literal["conversation.item.created"]
|
| 33 |
+
"""The event type, must be `conversation.item.created`."""
|
| 34 |
+
|
| 35 |
+
previous_item_id: Optional[str] = None
|
| 36 |
+
"""
|
| 37 |
+
The ID of the preceding item in the Conversation context, allows the client to
|
| 38 |
+
understand the order of the conversation. Can be `null` if the item has no
|
| 39 |
+
predecessor.
|
| 40 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_delete_event_param.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["ConversationItemDeleteEventParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class ConversationItemDeleteEventParam(TypedDict, total=False):
|
| 11 |
+
"""Send this event when you want to remove any item from the conversation
|
| 12 |
+
history.
|
| 13 |
+
|
| 14 |
+
The server will respond with a `conversation.item.deleted` event,
|
| 15 |
+
unless the item does not exist in the conversation history, in which case the
|
| 16 |
+
server will respond with an error.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
item_id: Required[str]
|
| 20 |
+
"""The ID of the item to delete."""
|
| 21 |
+
|
| 22 |
+
type: Required[Literal["conversation.item.delete"]]
|
| 23 |
+
"""The event type, must be `conversation.item.delete`."""
|
| 24 |
+
|
| 25 |
+
event_id: str
|
| 26 |
+
"""Optional client-generated ID used to identify this event."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_deleted_event.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["ConversationItemDeletedEvent"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class ConversationItemDeletedEvent(BaseModel):
|
| 11 |
+
"""
|
| 12 |
+
Returned when an item in the conversation is deleted by the client with a
|
| 13 |
+
`conversation.item.delete` event. This event is used to synchronize the
|
| 14 |
+
server's understanding of the conversation history with the client's view.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
event_id: str
|
| 18 |
+
"""The unique ID of the server event."""
|
| 19 |
+
|
| 20 |
+
item_id: str
|
| 21 |
+
"""The ID of the item that was deleted."""
|
| 22 |
+
|
| 23 |
+
type: Literal["conversation.item.deleted"]
|
| 24 |
+
"""The event type, must be `conversation.item.deleted`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_done.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
from .conversation_item import ConversationItem
|
| 8 |
+
|
| 9 |
+
__all__ = ["ConversationItemDone"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class ConversationItemDone(BaseModel):
|
| 13 |
+
"""Returned when a conversation item is finalized.
|
| 14 |
+
|
| 15 |
+
The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
event_id: str
|
| 19 |
+
"""The unique ID of the server event."""
|
| 20 |
+
|
| 21 |
+
item: ConversationItem
|
| 22 |
+
"""A single item within a Realtime conversation."""
|
| 23 |
+
|
| 24 |
+
type: Literal["conversation.item.done"]
|
| 25 |
+
"""The event type, must be `conversation.item.done`."""
|
| 26 |
+
|
| 27 |
+
previous_item_id: Optional[str] = None
|
| 28 |
+
"""The ID of the item that precedes this one, if any.
|
| 29 |
+
|
| 30 |
+
This is used to maintain ordering when items are inserted.
|
| 31 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_input_audio_transcription_delta_event.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
from .log_prob_properties import LogProbProperties
|
| 8 |
+
|
| 9 |
+
__all__ = ["ConversationItemInputAudioTranscriptionDeltaEvent"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class ConversationItemInputAudioTranscriptionDeltaEvent(BaseModel):
|
| 13 |
+
"""
|
| 14 |
+
Returned when the text value of an input audio transcription content part is updated with incremental transcription results.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
event_id: str
|
| 18 |
+
"""The unique ID of the server event."""
|
| 19 |
+
|
| 20 |
+
item_id: str
|
| 21 |
+
"""The ID of the item containing the audio that is being transcribed."""
|
| 22 |
+
|
| 23 |
+
type: Literal["conversation.item.input_audio_transcription.delta"]
|
| 24 |
+
"""The event type, must be `conversation.item.input_audio_transcription.delta`."""
|
| 25 |
+
|
| 26 |
+
content_index: Optional[int] = None
|
| 27 |
+
"""The index of the content part in the item's content array."""
|
| 28 |
+
|
| 29 |
+
delta: Optional[str] = None
|
| 30 |
+
"""The text delta."""
|
| 31 |
+
|
| 32 |
+
logprobs: Optional[List[LogProbProperties]] = None
|
| 33 |
+
"""The log probabilities of the transcription.
|
| 34 |
+
|
| 35 |
+
These can be enabled by configurating the session with
|
| 36 |
+
`"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the
|
| 37 |
+
array corresponds a log probability of which token would be selected for this
|
| 38 |
+
chunk of transcription. This can help to identify if it was possible there were
|
| 39 |
+
multiple valid options for a given chunk of transcription.
|
| 40 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_input_audio_transcription_failed_event.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["ConversationItemInputAudioTranscriptionFailedEvent", "Error"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Error(BaseModel):
|
| 12 |
+
"""Details of the transcription error."""
|
| 13 |
+
|
| 14 |
+
code: Optional[str] = None
|
| 15 |
+
"""Error code, if any."""
|
| 16 |
+
|
| 17 |
+
message: Optional[str] = None
|
| 18 |
+
"""A human-readable error message."""
|
| 19 |
+
|
| 20 |
+
param: Optional[str] = None
|
| 21 |
+
"""Parameter related to the error, if any."""
|
| 22 |
+
|
| 23 |
+
type: Optional[str] = None
|
| 24 |
+
"""The type of error."""
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class ConversationItemInputAudioTranscriptionFailedEvent(BaseModel):
|
| 28 |
+
"""
|
| 29 |
+
Returned when input audio transcription is configured, and a transcription
|
| 30 |
+
request for a user message failed. These events are separate from other
|
| 31 |
+
`error` events so that the client can identify the related Item.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
content_index: int
|
| 35 |
+
"""The index of the content part containing the audio."""
|
| 36 |
+
|
| 37 |
+
error: Error
|
| 38 |
+
"""Details of the transcription error."""
|
| 39 |
+
|
| 40 |
+
event_id: str
|
| 41 |
+
"""The unique ID of the server event."""
|
| 42 |
+
|
| 43 |
+
item_id: str
|
| 44 |
+
"""The ID of the user message item."""
|
| 45 |
+
|
| 46 |
+
type: Literal["conversation.item.input_audio_transcription.failed"]
|
| 47 |
+
"""The event type, must be `conversation.item.input_audio_transcription.failed`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_param.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import TypeAlias
|
| 7 |
+
|
| 8 |
+
from .realtime_mcp_tool_call_param import RealtimeMcpToolCallParam
|
| 9 |
+
from .realtime_mcp_list_tools_param import RealtimeMcpListToolsParam
|
| 10 |
+
from .realtime_mcp_approval_request_param import RealtimeMcpApprovalRequestParam
|
| 11 |
+
from .realtime_mcp_approval_response_param import RealtimeMcpApprovalResponseParam
|
| 12 |
+
from .realtime_conversation_item_user_message_param import RealtimeConversationItemUserMessageParam
|
| 13 |
+
from .realtime_conversation_item_function_call_param import RealtimeConversationItemFunctionCallParam
|
| 14 |
+
from .realtime_conversation_item_system_message_param import RealtimeConversationItemSystemMessageParam
|
| 15 |
+
from .realtime_conversation_item_assistant_message_param import RealtimeConversationItemAssistantMessageParam
|
| 16 |
+
from .realtime_conversation_item_function_call_output_param import RealtimeConversationItemFunctionCallOutputParam
|
| 17 |
+
|
| 18 |
+
__all__ = ["ConversationItemParam"]
|
| 19 |
+
|
| 20 |
+
ConversationItemParam: TypeAlias = Union[
|
| 21 |
+
RealtimeConversationItemSystemMessageParam,
|
| 22 |
+
RealtimeConversationItemUserMessageParam,
|
| 23 |
+
RealtimeConversationItemAssistantMessageParam,
|
| 24 |
+
RealtimeConversationItemFunctionCallParam,
|
| 25 |
+
RealtimeConversationItemFunctionCallOutputParam,
|
| 26 |
+
RealtimeMcpApprovalResponseParam,
|
| 27 |
+
RealtimeMcpListToolsParam,
|
| 28 |
+
RealtimeMcpToolCallParam,
|
| 29 |
+
RealtimeMcpApprovalRequestParam,
|
| 30 |
+
]
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_truncate_event.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["ConversationItemTruncateEvent"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ConversationItemTruncateEvent(BaseModel):
|
| 12 |
+
"""Send this event to truncate a previous assistant message’s audio.
|
| 13 |
+
|
| 14 |
+
The server
|
| 15 |
+
will produce audio faster than realtime, so this event is useful when the user
|
| 16 |
+
interrupts to truncate audio that has already been sent to the client but not
|
| 17 |
+
yet played. This will synchronize the server's understanding of the audio with
|
| 18 |
+
the client's playback.
|
| 19 |
+
|
| 20 |
+
Truncating audio will delete the server-side text transcript to ensure there
|
| 21 |
+
is not text in the context that hasn't been heard by the user.
|
| 22 |
+
|
| 23 |
+
If successful, the server will respond with a `conversation.item.truncated`
|
| 24 |
+
event.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
audio_end_ms: int
|
| 28 |
+
"""Inclusive duration up to which audio is truncated, in milliseconds.
|
| 29 |
+
|
| 30 |
+
If the audio_end_ms is greater than the actual audio duration, the server will
|
| 31 |
+
respond with an error.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
content_index: int
|
| 35 |
+
"""The index of the content part to truncate. Set this to `0`."""
|
| 36 |
+
|
| 37 |
+
item_id: str
|
| 38 |
+
"""The ID of the assistant message item to truncate.
|
| 39 |
+
|
| 40 |
+
Only assistant message items can be truncated.
|
| 41 |
+
"""
|
| 42 |
+
|
| 43 |
+
type: Literal["conversation.item.truncate"]
|
| 44 |
+
"""The event type, must be `conversation.item.truncate`."""
|
| 45 |
+
|
| 46 |
+
event_id: Optional[str] = None
|
| 47 |
+
"""Optional client-generated ID used to identify this event."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/conversation_item_truncated_event.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["ConversationItemTruncatedEvent"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class ConversationItemTruncatedEvent(BaseModel):
|
| 11 |
+
"""
|
| 12 |
+
Returned when an earlier assistant audio message item is truncated by the
|
| 13 |
+
client with a `conversation.item.truncate` event. This event is used to
|
| 14 |
+
synchronize the server's understanding of the audio with the client's playback.
|
| 15 |
+
|
| 16 |
+
This action will truncate the audio and remove the server-side text transcript
|
| 17 |
+
to ensure there is no text in the context that hasn't been heard by the user.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
audio_end_ms: int
|
| 21 |
+
"""The duration up to which the audio was truncated, in milliseconds."""
|
| 22 |
+
|
| 23 |
+
content_index: int
|
| 24 |
+
"""The index of the content part that was truncated."""
|
| 25 |
+
|
| 26 |
+
event_id: str
|
| 27 |
+
"""The unique ID of the server event."""
|
| 28 |
+
|
| 29 |
+
item_id: str
|
| 30 |
+
"""The ID of the assistant message item that was truncated."""
|
| 31 |
+
|
| 32 |
+
type: Literal["conversation.item.truncated"]
|
| 33 |
+
"""The event type, must be `conversation.item.truncated`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_append_event_param.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["InputAudioBufferAppendEventParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class InputAudioBufferAppendEventParam(TypedDict, total=False):
|
| 11 |
+
"""Send this event to append audio bytes to the input audio buffer.
|
| 12 |
+
|
| 13 |
+
The audio
|
| 14 |
+
buffer is temporary storage you can write to and later commit. A "commit" will create a new
|
| 15 |
+
user message item in the conversation history from the buffer content and clear the buffer.
|
| 16 |
+
Input audio transcription (if enabled) will be generated when the buffer is committed.
|
| 17 |
+
|
| 18 |
+
If VAD is enabled the audio buffer is used to detect speech and the server will decide
|
| 19 |
+
when to commit. When Server VAD is disabled, you must commit the audio buffer
|
| 20 |
+
manually. Input audio noise reduction operates on writes to the audio buffer.
|
| 21 |
+
|
| 22 |
+
The client may choose how much audio to place in each event up to a maximum
|
| 23 |
+
of 15 MiB, for example streaming smaller chunks from the client may allow the
|
| 24 |
+
VAD to be more responsive. Unlike most other client events, the server will
|
| 25 |
+
not send a confirmation response to this event.
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
audio: Required[str]
|
| 29 |
+
"""Base64-encoded audio bytes.
|
| 30 |
+
|
| 31 |
+
This must be in the format specified by the `input_audio_format` field in the
|
| 32 |
+
session configuration.
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
type: Required[Literal["input_audio_buffer.append"]]
|
| 36 |
+
"""The event type, must be `input_audio_buffer.append`."""
|
| 37 |
+
|
| 38 |
+
event_id: str
|
| 39 |
+
"""Optional client-generated ID used to identify this event."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_cleared_event.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["InputAudioBufferClearedEvent"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class InputAudioBufferClearedEvent(BaseModel):
|
| 11 |
+
"""
|
| 12 |
+
Returned when the input audio buffer is cleared by the client with a
|
| 13 |
+
`input_audio_buffer.clear` event.
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
event_id: str
|
| 17 |
+
"""The unique ID of the server event."""
|
| 18 |
+
|
| 19 |
+
type: Literal["input_audio_buffer.cleared"]
|
| 20 |
+
"""The event type, must be `input_audio_buffer.cleared`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_commit_event.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["InputAudioBufferCommitEvent"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class InputAudioBufferCommitEvent(BaseModel):
|
| 12 |
+
"""
|
| 13 |
+
Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically.
|
| 14 |
+
|
| 15 |
+
Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
type: Literal["input_audio_buffer.commit"]
|
| 19 |
+
"""The event type, must be `input_audio_buffer.commit`."""
|
| 20 |
+
|
| 21 |
+
event_id: Optional[str] = None
|
| 22 |
+
"""Optional client-generated ID used to identify this event."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_commit_event_param.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["InputAudioBufferCommitEventParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class InputAudioBufferCommitEventParam(TypedDict, total=False):
|
| 11 |
+
"""
|
| 12 |
+
Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically.
|
| 13 |
+
|
| 14 |
+
Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
type: Required[Literal["input_audio_buffer.commit"]]
|
| 18 |
+
"""The event type, must be `input_audio_buffer.commit`."""
|
| 19 |
+
|
| 20 |
+
event_id: str
|
| 21 |
+
"""Optional client-generated ID used to identify this event."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_committed_event.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["InputAudioBufferCommittedEvent"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class InputAudioBufferCommittedEvent(BaseModel):
|
| 12 |
+
"""
|
| 13 |
+
Returned when an input audio buffer is committed, either by the client or
|
| 14 |
+
automatically in server VAD mode. The `item_id` property is the ID of the user
|
| 15 |
+
message item that will be created, thus a `conversation.item.created` event
|
| 16 |
+
will also be sent to the client.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
event_id: str
|
| 20 |
+
"""The unique ID of the server event."""
|
| 21 |
+
|
| 22 |
+
item_id: str
|
| 23 |
+
"""The ID of the user message item that will be created."""
|
| 24 |
+
|
| 25 |
+
type: Literal["input_audio_buffer.committed"]
|
| 26 |
+
"""The event type, must be `input_audio_buffer.committed`."""
|
| 27 |
+
|
| 28 |
+
previous_item_id: Optional[str] = None
|
| 29 |
+
"""
|
| 30 |
+
The ID of the preceding item after which the new item will be inserted. Can be
|
| 31 |
+
`null` if the item has no predecessor.
|
| 32 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_dtmf_event_received_event.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["InputAudioBufferDtmfEventReceivedEvent"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class InputAudioBufferDtmfEventReceivedEvent(BaseModel):
|
| 11 |
+
"""**SIP Only:** Returned when an DTMF event is received.
|
| 12 |
+
|
| 13 |
+
A DTMF event is a message that
|
| 14 |
+
represents a telephone keypad press (0–9, *, #, A–D). The `event` property
|
| 15 |
+
is the keypad that the user press. The `received_at` is the UTC Unix Timestamp
|
| 16 |
+
that the server received the event.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
event: str
|
| 20 |
+
"""The telephone keypad that was pressed by the user."""
|
| 21 |
+
|
| 22 |
+
received_at: int
|
| 23 |
+
"""UTC Unix Timestamp when DTMF Event was received by server."""
|
| 24 |
+
|
| 25 |
+
type: Literal["input_audio_buffer.dtmf_event_received"]
|
| 26 |
+
"""The event type, must be `input_audio_buffer.dtmf_event_received`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/input_audio_buffer_speech_stopped_event.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["InputAudioBufferSpeechStoppedEvent"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class InputAudioBufferSpeechStoppedEvent(BaseModel):
|
| 11 |
+
"""
|
| 12 |
+
Returned in `server_vad` mode when the server detects the end of speech in
|
| 13 |
+
the audio buffer. The server will also send an `conversation.item.created`
|
| 14 |
+
event with the user message item that is created from the audio buffer.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
audio_end_ms: int
|
| 18 |
+
"""Milliseconds since the session started when speech stopped.
|
| 19 |
+
|
| 20 |
+
This will correspond to the end of audio sent to the model, and thus includes
|
| 21 |
+
the `min_silence_duration_ms` configured in the Session.
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
event_id: str
|
| 25 |
+
"""The unique ID of the server event."""
|
| 26 |
+
|
| 27 |
+
item_id: str
|
| 28 |
+
"""The ID of the user message item that will be created."""
|
| 29 |
+
|
| 30 |
+
type: Literal["input_audio_buffer.speech_stopped"]
|
| 31 |
+
"""The event type, must be `input_audio_buffer.speech_stopped`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/mcp_list_tools_failed.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["McpListToolsFailed"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class McpListToolsFailed(BaseModel):
|
| 11 |
+
"""Returned when listing MCP tools has failed for an item."""
|
| 12 |
+
|
| 13 |
+
event_id: str
|
| 14 |
+
"""The unique ID of the server event."""
|
| 15 |
+
|
| 16 |
+
item_id: str
|
| 17 |
+
"""The ID of the MCP list tools item."""
|
| 18 |
+
|
| 19 |
+
type: Literal["mcp_list_tools.failed"]
|
| 20 |
+
"""The event type, must be `mcp_list_tools.failed`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/mcp_list_tools_in_progress.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["McpListToolsInProgress"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class McpListToolsInProgress(BaseModel):
|
| 11 |
+
"""Returned when listing MCP tools is in progress for an item."""
|
| 12 |
+
|
| 13 |
+
event_id: str
|
| 14 |
+
"""The unique ID of the server event."""
|
| 15 |
+
|
| 16 |
+
item_id: str
|
| 17 |
+
"""The ID of the MCP list tools item."""
|
| 18 |
+
|
| 19 |
+
type: Literal["mcp_list_tools.in_progress"]
|
| 20 |
+
"""The event type, must be `mcp_list_tools.in_progress`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/noise_reduction_type.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal, TypeAlias
|
| 4 |
+
|
| 5 |
+
__all__ = ["NoiseReductionType"]
|
| 6 |
+
|
| 7 |
+
NoiseReductionType: TypeAlias = Literal["near_field", "far_field"]
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/output_audio_buffer_clear_event.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["OutputAudioBufferClearEvent"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class OutputAudioBufferClearEvent(BaseModel):
|
| 12 |
+
"""**WebRTC/SIP Only:** Emit to cut off the current audio response.
|
| 13 |
+
|
| 14 |
+
This will trigger the server to
|
| 15 |
+
stop generating audio and emit a `output_audio_buffer.cleared` event. This
|
| 16 |
+
event should be preceded by a `response.cancel` client event to stop the
|
| 17 |
+
generation of the current response.
|
| 18 |
+
[Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
type: Literal["output_audio_buffer.clear"]
|
| 22 |
+
"""The event type, must be `output_audio_buffer.clear`."""
|
| 23 |
+
|
| 24 |
+
event_id: Optional[str] = None
|
| 25 |
+
"""The unique ID of the client event used for error handling."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/output_audio_buffer_clear_event_param.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["OutputAudioBufferClearEventParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class OutputAudioBufferClearEventParam(TypedDict, total=False):
|
| 11 |
+
"""**WebRTC/SIP Only:** Emit to cut off the current audio response.
|
| 12 |
+
|
| 13 |
+
This will trigger the server to
|
| 14 |
+
stop generating audio and emit a `output_audio_buffer.cleared` event. This
|
| 15 |
+
event should be preceded by a `response.cancel` client event to stop the
|
| 16 |
+
generation of the current response.
|
| 17 |
+
[Learn more](https://platform.openai.com/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
type: Required[Literal["output_audio_buffer.clear"]]
|
| 21 |
+
"""The event type, must be `output_audio_buffer.clear`."""
|
| 22 |
+
|
| 23 |
+
event_id: str
|
| 24 |
+
"""The unique ID of the client event used for error handling."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/rate_limits_updated_event.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["RateLimitsUpdatedEvent", "RateLimit"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class RateLimit(BaseModel):
|
| 12 |
+
limit: Optional[int] = None
|
| 13 |
+
"""The maximum allowed value for the rate limit."""
|
| 14 |
+
|
| 15 |
+
name: Optional[Literal["requests", "tokens"]] = None
|
| 16 |
+
"""The name of the rate limit (`requests`, `tokens`)."""
|
| 17 |
+
|
| 18 |
+
remaining: Optional[int] = None
|
| 19 |
+
"""The remaining value before the limit is reached."""
|
| 20 |
+
|
| 21 |
+
reset_seconds: Optional[float] = None
|
| 22 |
+
"""Seconds until the rate limit resets."""
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class RateLimitsUpdatedEvent(BaseModel):
|
| 26 |
+
"""Emitted at the beginning of a Response to indicate the updated rate limits.
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
When a Response is created some tokens will be "reserved" for the output
|
| 30 |
+
tokens, the rate limits shown here reflect that reservation, which is then
|
| 31 |
+
adjusted accordingly once the Response is completed.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
event_id: str
|
| 35 |
+
"""The unique ID of the server event."""
|
| 36 |
+
|
| 37 |
+
rate_limits: List[RateLimit]
|
| 38 |
+
"""List of rate limit information."""
|
| 39 |
+
|
| 40 |
+
type: Literal["rate_limits.updated"]
|
| 41 |
+
"""The event type, must be `rate_limits.updated`."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_config.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
from .realtime_audio_config_input import RealtimeAudioConfigInput
|
| 7 |
+
from .realtime_audio_config_output import RealtimeAudioConfigOutput
|
| 8 |
+
|
| 9 |
+
__all__ = ["RealtimeAudioConfig"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class RealtimeAudioConfig(BaseModel):
|
| 13 |
+
"""Configuration for input and output audio."""
|
| 14 |
+
|
| 15 |
+
input: Optional[RealtimeAudioConfigInput] = None
|
| 16 |
+
|
| 17 |
+
output: Optional[RealtimeAudioConfigOutput] = None
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_config_input.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
|
| 5 |
+
from ..._models import BaseModel
|
| 6 |
+
from .audio_transcription import AudioTranscription
|
| 7 |
+
from .noise_reduction_type import NoiseReductionType
|
| 8 |
+
from .realtime_audio_formats import RealtimeAudioFormats
|
| 9 |
+
from .realtime_audio_input_turn_detection import RealtimeAudioInputTurnDetection
|
| 10 |
+
|
| 11 |
+
__all__ = ["RealtimeAudioConfigInput", "NoiseReduction"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class NoiseReduction(BaseModel):
|
| 15 |
+
"""Configuration for input audio noise reduction.
|
| 16 |
+
|
| 17 |
+
This can be set to `null` to turn off.
|
| 18 |
+
Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
|
| 19 |
+
Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
type: Optional[NoiseReductionType] = None
|
| 23 |
+
"""Type of noise reduction.
|
| 24 |
+
|
| 25 |
+
`near_field` is for close-talking microphones such as headphones, `far_field` is
|
| 26 |
+
for far-field microphones such as laptop or conference room microphones.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
class RealtimeAudioConfigInput(BaseModel):
|
| 31 |
+
format: Optional[RealtimeAudioFormats] = None
|
| 32 |
+
"""The format of the input audio."""
|
| 33 |
+
|
| 34 |
+
noise_reduction: Optional[NoiseReduction] = None
|
| 35 |
+
"""Configuration for input audio noise reduction.
|
| 36 |
+
|
| 37 |
+
This can be set to `null` to turn off. Noise reduction filters audio added to
|
| 38 |
+
the input audio buffer before it is sent to VAD and the model. Filtering the
|
| 39 |
+
audio can improve VAD and turn detection accuracy (reducing false positives) and
|
| 40 |
+
model performance by improving perception of the input audio.
|
| 41 |
+
"""
|
| 42 |
+
|
| 43 |
+
transcription: Optional[AudioTranscription] = None
|
| 44 |
+
"""
|
| 45 |
+
Configuration for input audio transcription, defaults to off and can be set to
|
| 46 |
+
`null` to turn off once on. Input audio transcription is not native to the
|
| 47 |
+
model, since the model consumes audio directly. Transcription runs
|
| 48 |
+
asynchronously through
|
| 49 |
+
[the /audio/transcriptions endpoint](https://platform.openai.com/docs/api-reference/audio/createTranscription)
|
| 50 |
+
and should be treated as guidance of input audio content rather than precisely
|
| 51 |
+
what the model heard. The client can optionally set the language and prompt for
|
| 52 |
+
transcription, these offer additional guidance to the transcription service.
|
| 53 |
+
"""
|
| 54 |
+
|
| 55 |
+
turn_detection: Optional[RealtimeAudioInputTurnDetection] = None
|
| 56 |
+
"""Configuration for turn detection, ether Server VAD or Semantic VAD.
|
| 57 |
+
|
| 58 |
+
This can be set to `null` to turn off, in which case the client must manually
|
| 59 |
+
trigger model response.
|
| 60 |
+
|
| 61 |
+
Server VAD means that the model will detect the start and end of speech based on
|
| 62 |
+
audio volume and respond at the end of user speech.
|
| 63 |
+
|
| 64 |
+
Semantic VAD is more advanced and uses a turn detection model (in conjunction
|
| 65 |
+
with VAD) to semantically estimate whether the user has finished speaking, then
|
| 66 |
+
dynamically sets a timeout based on this probability. For example, if user audio
|
| 67 |
+
trails off with "uhhm", the model will score a low probability of turn end and
|
| 68 |
+
wait longer for the user to continue speaking. This can be useful for more
|
| 69 |
+
natural conversations, but may have a higher latency.
|
| 70 |
+
|
| 71 |
+
For `gpt-realtime-whisper` transcription sessions, turn detection must be set to
|
| 72 |
+
`null`; VAD is not supported.
|
| 73 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_config_output_param.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
| 7 |
+
|
| 8 |
+
from .realtime_audio_formats_param import RealtimeAudioFormatsParam
|
| 9 |
+
|
| 10 |
+
__all__ = ["RealtimeAudioConfigOutputParam", "Voice", "VoiceID"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class VoiceID(TypedDict, total=False):
|
| 14 |
+
"""Custom voice reference."""
|
| 15 |
+
|
| 16 |
+
id: Required[str]
|
| 17 |
+
"""The custom voice ID, e.g. `voice_1234`."""
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
Voice: TypeAlias = Union[
|
| 21 |
+
str, Literal["alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse", "marin", "cedar"], VoiceID
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class RealtimeAudioConfigOutputParam(TypedDict, total=False):
|
| 26 |
+
format: RealtimeAudioFormatsParam
|
| 27 |
+
"""The format of the output audio."""
|
| 28 |
+
|
| 29 |
+
speed: float
|
| 30 |
+
"""
|
| 31 |
+
The speed of the model's spoken response as a multiple of the original speed.
|
| 32 |
+
1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed.
|
| 33 |
+
This value can only be changed in between model turns, not while a response is
|
| 34 |
+
in progress.
|
| 35 |
+
|
| 36 |
+
This parameter is a post-processing adjustment to the audio after it is
|
| 37 |
+
generated, it's also possible to prompt the model to speak faster or slower.
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
voice: Voice
|
| 41 |
+
"""The voice the model uses to respond.
|
| 42 |
+
|
| 43 |
+
Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,
|
| 44 |
+
`shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice
|
| 45 |
+
object with an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be
|
| 46 |
+
changed during the session once the model has responded with audio at least
|
| 47 |
+
once. We recommend `marin` and `cedar` for best quality.
|
| 48 |
+
"""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_formats.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Union, Optional
|
| 4 |
+
from typing_extensions import Literal, Annotated, TypeAlias
|
| 5 |
+
|
| 6 |
+
from ..._utils import PropertyInfo
|
| 7 |
+
from ..._models import BaseModel
|
| 8 |
+
|
| 9 |
+
__all__ = ["RealtimeAudioFormats", "AudioPCM", "AudioPCMU", "AudioPCMA"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class AudioPCM(BaseModel):
|
| 13 |
+
"""The PCM audio format. Only a 24kHz sample rate is supported."""
|
| 14 |
+
|
| 15 |
+
rate: Optional[Literal[24000]] = None
|
| 16 |
+
"""The sample rate of the audio. Always `24000`."""
|
| 17 |
+
|
| 18 |
+
type: Optional[Literal["audio/pcm"]] = None
|
| 19 |
+
"""The audio format. Always `audio/pcm`."""
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class AudioPCMU(BaseModel):
|
| 23 |
+
"""The G.711 μ-law format."""
|
| 24 |
+
|
| 25 |
+
type: Optional[Literal["audio/pcmu"]] = None
|
| 26 |
+
"""The audio format. Always `audio/pcmu`."""
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
class AudioPCMA(BaseModel):
|
| 30 |
+
"""The G.711 A-law format."""
|
| 31 |
+
|
| 32 |
+
type: Optional[Literal["audio/pcma"]] = None
|
| 33 |
+
"""The audio format. Always `audio/pcma`."""
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
RealtimeAudioFormats: TypeAlias = Annotated[Union[AudioPCM, AudioPCMU, AudioPCMA], PropertyInfo(discriminator="type")]
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_audio_input_turn_detection_param.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union, Optional
|
| 6 |
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["RealtimeAudioInputTurnDetectionParam", "ServerVad", "SemanticVad"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ServerVad(TypedDict, total=False):
|
| 12 |
+
"""
|
| 13 |
+
Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
type: Required[Literal["server_vad"]]
|
| 17 |
+
"""Type of turn detection, `server_vad` to turn on simple Server VAD."""
|
| 18 |
+
|
| 19 |
+
create_response: bool
|
| 20 |
+
"""Whether or not to automatically generate a response when a VAD stop event
|
| 21 |
+
occurs.
|
| 22 |
+
|
| 23 |
+
If `interrupt_response` is set to `false` this may fail to create a response if
|
| 24 |
+
the model is already responding.
|
| 25 |
+
|
| 26 |
+
If both `create_response` and `interrupt_response` are set to `false`, the model
|
| 27 |
+
will never respond automatically but VAD events will still be emitted.
|
| 28 |
+
"""
|
| 29 |
+
|
| 30 |
+
idle_timeout_ms: Optional[int]
|
| 31 |
+
"""Optional timeout after which a model response will be triggered automatically.
|
| 32 |
+
|
| 33 |
+
This is useful for situations in which a long pause from the user is unexpected,
|
| 34 |
+
such as a phone call. The model will effectively prompt the user to continue the
|
| 35 |
+
conversation based on the current context.
|
| 36 |
+
|
| 37 |
+
The timeout value will be applied after the last model response's audio has
|
| 38 |
+
finished playing, i.e. it's set to the `response.done` time plus audio playback
|
| 39 |
+
duration.
|
| 40 |
+
|
| 41 |
+
An `input_audio_buffer.timeout_triggered` event (plus events associated with the
|
| 42 |
+
Response) will be emitted when the timeout is reached. Idle timeout is currently
|
| 43 |
+
only supported for `server_vad` mode.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
interrupt_response: bool
|
| 47 |
+
"""
|
| 48 |
+
Whether or not to automatically interrupt (cancel) any ongoing response with
|
| 49 |
+
output to the default conversation (i.e. `conversation` of `auto`) when a VAD
|
| 50 |
+
start event occurs. If `true` then the response will be cancelled, otherwise it
|
| 51 |
+
will continue until complete.
|
| 52 |
+
|
| 53 |
+
If both `create_response` and `interrupt_response` are set to `false`, the model
|
| 54 |
+
will never respond automatically but VAD events will still be emitted.
|
| 55 |
+
"""
|
| 56 |
+
|
| 57 |
+
prefix_padding_ms: int
|
| 58 |
+
"""Used only for `server_vad` mode.
|
| 59 |
+
|
| 60 |
+
Amount of audio to include before the VAD detected speech (in milliseconds).
|
| 61 |
+
Defaults to 300ms.
|
| 62 |
+
"""
|
| 63 |
+
|
| 64 |
+
silence_duration_ms: int
|
| 65 |
+
"""Used only for `server_vad` mode.
|
| 66 |
+
|
| 67 |
+
Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
|
| 68 |
+
With shorter values the model will respond more quickly, but may jump in on
|
| 69 |
+
short pauses from the user.
|
| 70 |
+
"""
|
| 71 |
+
|
| 72 |
+
threshold: float
|
| 73 |
+
"""Used only for `server_vad` mode.
|
| 74 |
+
|
| 75 |
+
Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
|
| 76 |
+
threshold will require louder audio to activate the model, and thus might
|
| 77 |
+
perform better in noisy environments.
|
| 78 |
+
"""
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
class SemanticVad(TypedDict, total=False):
|
| 82 |
+
"""
|
| 83 |
+
Server-side semantic turn detection which uses a model to determine when the user has finished speaking.
|
| 84 |
+
"""
|
| 85 |
+
|
| 86 |
+
type: Required[Literal["semantic_vad"]]
|
| 87 |
+
"""Type of turn detection, `semantic_vad` to turn on Semantic VAD."""
|
| 88 |
+
|
| 89 |
+
create_response: bool
|
| 90 |
+
"""
|
| 91 |
+
Whether or not to automatically generate a response when a VAD stop event
|
| 92 |
+
occurs.
|
| 93 |
+
"""
|
| 94 |
+
|
| 95 |
+
eagerness: Literal["low", "medium", "high", "auto"]
|
| 96 |
+
"""Used only for `semantic_vad` mode.
|
| 97 |
+
|
| 98 |
+
The eagerness of the model to respond. `low` will wait longer for the user to
|
| 99 |
+
continue speaking, `high` will respond more quickly. `auto` is the default and
|
| 100 |
+
is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s,
|
| 101 |
+
4s, and 2s respectively.
|
| 102 |
+
"""
|
| 103 |
+
|
| 104 |
+
interrupt_response: bool
|
| 105 |
+
"""
|
| 106 |
+
Whether or not to automatically interrupt any ongoing response with output to
|
| 107 |
+
the default conversation (i.e. `conversation` of `auto`) when a VAD start event
|
| 108 |
+
occurs.
|
| 109 |
+
"""
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
RealtimeAudioInputTurnDetectionParam: TypeAlias = Union[ServerVad, SemanticVad]
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_assistant_message.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["RealtimeConversationItemAssistantMessage", "Content"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Content(BaseModel):
|
| 12 |
+
audio: Optional[str] = None
|
| 13 |
+
"""
|
| 14 |
+
Base64-encoded audio bytes, these will be parsed as the format specified in the
|
| 15 |
+
session output audio type configuration. This defaults to PCM 16-bit 24kHz mono
|
| 16 |
+
if not specified.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
text: Optional[str] = None
|
| 20 |
+
"""The text content."""
|
| 21 |
+
|
| 22 |
+
transcript: Optional[str] = None
|
| 23 |
+
"""
|
| 24 |
+
The transcript of the audio content, this will always be present if the output
|
| 25 |
+
type is `audio`.
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
type: Optional[Literal["output_text", "output_audio"]] = None
|
| 29 |
+
"""
|
| 30 |
+
The content type, `output_text` or `output_audio` depending on the session
|
| 31 |
+
`output_modalities` configuration.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
class RealtimeConversationItemAssistantMessage(BaseModel):
|
| 36 |
+
"""An assistant message item in a Realtime conversation."""
|
| 37 |
+
|
| 38 |
+
content: List[Content]
|
| 39 |
+
"""The content of the message."""
|
| 40 |
+
|
| 41 |
+
role: Literal["assistant"]
|
| 42 |
+
"""The role of the message sender. Always `assistant`."""
|
| 43 |
+
|
| 44 |
+
type: Literal["message"]
|
| 45 |
+
"""The type of the item. Always `message`."""
|
| 46 |
+
|
| 47 |
+
id: Optional[str] = None
|
| 48 |
+
"""The unique ID of the item.
|
| 49 |
+
|
| 50 |
+
This may be provided by the client or generated by the server.
|
| 51 |
+
"""
|
| 52 |
+
|
| 53 |
+
object: Optional[Literal["realtime.item"]] = None
|
| 54 |
+
"""Identifier for the API object being returned - always `realtime.item`.
|
| 55 |
+
|
| 56 |
+
Optional when creating a new item.
|
| 57 |
+
"""
|
| 58 |
+
|
| 59 |
+
status: Optional[Literal["completed", "incomplete", "in_progress"]] = None
|
| 60 |
+
"""The status of the item. Has no effect on the conversation."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_assistant_message_param.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Iterable
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["RealtimeConversationItemAssistantMessageParam", "Content"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Content(TypedDict, total=False):
|
| 12 |
+
audio: str
|
| 13 |
+
"""
|
| 14 |
+
Base64-encoded audio bytes, these will be parsed as the format specified in the
|
| 15 |
+
session output audio type configuration. This defaults to PCM 16-bit 24kHz mono
|
| 16 |
+
if not specified.
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
text: str
|
| 20 |
+
"""The text content."""
|
| 21 |
+
|
| 22 |
+
transcript: str
|
| 23 |
+
"""
|
| 24 |
+
The transcript of the audio content, this will always be present if the output
|
| 25 |
+
type is `audio`.
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
type: Literal["output_text", "output_audio"]
|
| 29 |
+
"""
|
| 30 |
+
The content type, `output_text` or `output_audio` depending on the session
|
| 31 |
+
`output_modalities` configuration.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
class RealtimeConversationItemAssistantMessageParam(TypedDict, total=False):
|
| 36 |
+
"""An assistant message item in a Realtime conversation."""
|
| 37 |
+
|
| 38 |
+
content: Required[Iterable[Content]]
|
| 39 |
+
"""The content of the message."""
|
| 40 |
+
|
| 41 |
+
role: Required[Literal["assistant"]]
|
| 42 |
+
"""The role of the message sender. Always `assistant`."""
|
| 43 |
+
|
| 44 |
+
type: Required[Literal["message"]]
|
| 45 |
+
"""The type of the item. Always `message`."""
|
| 46 |
+
|
| 47 |
+
id: str
|
| 48 |
+
"""The unique ID of the item.
|
| 49 |
+
|
| 50 |
+
This may be provided by the client or generated by the server.
|
| 51 |
+
"""
|
| 52 |
+
|
| 53 |
+
object: Literal["realtime.item"]
|
| 54 |
+
"""Identifier for the API object being returned - always `realtime.item`.
|
| 55 |
+
|
| 56 |
+
Optional when creating a new item.
|
| 57 |
+
"""
|
| 58 |
+
|
| 59 |
+
status: Literal["completed", "incomplete", "in_progress"]
|
| 60 |
+
"""The status of the item. Has no effect on the conversation."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_function_call_output.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["RealtimeConversationItemFunctionCallOutput"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class RealtimeConversationItemFunctionCallOutput(BaseModel):
|
| 12 |
+
"""A function call output item in a Realtime conversation."""
|
| 13 |
+
|
| 14 |
+
call_id: str
|
| 15 |
+
"""The ID of the function call this output is for."""
|
| 16 |
+
|
| 17 |
+
output: str
|
| 18 |
+
"""
|
| 19 |
+
The output of the function call, this is free text and can contain any
|
| 20 |
+
information or simply be empty.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
type: Literal["function_call_output"]
|
| 24 |
+
"""The type of the item. Always `function_call_output`."""
|
| 25 |
+
|
| 26 |
+
id: Optional[str] = None
|
| 27 |
+
"""The unique ID of the item.
|
| 28 |
+
|
| 29 |
+
This may be provided by the client or generated by the server.
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
object: Optional[Literal["realtime.item"]] = None
|
| 33 |
+
"""Identifier for the API object being returned - always `realtime.item`.
|
| 34 |
+
|
| 35 |
+
Optional when creating a new item.
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
+
status: Optional[Literal["completed", "incomplete", "in_progress"]] = None
|
| 39 |
+
"""The status of the item. Has no effect on the conversation."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_function_call_output_param.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["RealtimeConversationItemFunctionCallOutputParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class RealtimeConversationItemFunctionCallOutputParam(TypedDict, total=False):
|
| 11 |
+
"""A function call output item in a Realtime conversation."""
|
| 12 |
+
|
| 13 |
+
call_id: Required[str]
|
| 14 |
+
"""The ID of the function call this output is for."""
|
| 15 |
+
|
| 16 |
+
output: Required[str]
|
| 17 |
+
"""
|
| 18 |
+
The output of the function call, this is free text and can contain any
|
| 19 |
+
information or simply be empty.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
type: Required[Literal["function_call_output"]]
|
| 23 |
+
"""The type of the item. Always `function_call_output`."""
|
| 24 |
+
|
| 25 |
+
id: str
|
| 26 |
+
"""The unique ID of the item.
|
| 27 |
+
|
| 28 |
+
This may be provided by the client or generated by the server.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
object: Literal["realtime.item"]
|
| 32 |
+
"""Identifier for the API object being returned - always `realtime.item`.
|
| 33 |
+
|
| 34 |
+
Optional when creating a new item.
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
status: Literal["completed", "incomplete", "in_progress"]
|
| 38 |
+
"""The status of the item. Has no effect on the conversation."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_function_call_param.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["RealtimeConversationItemFunctionCallParam"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class RealtimeConversationItemFunctionCallParam(TypedDict, total=False):
|
| 11 |
+
"""A function call item in a Realtime conversation."""
|
| 12 |
+
|
| 13 |
+
arguments: Required[str]
|
| 14 |
+
"""The arguments of the function call.
|
| 15 |
+
|
| 16 |
+
This is a JSON-encoded string representing the arguments passed to the function,
|
| 17 |
+
for example `{"arg1": "value1", "arg2": 42}`.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
name: Required[str]
|
| 21 |
+
"""The name of the function being called."""
|
| 22 |
+
|
| 23 |
+
type: Required[Literal["function_call"]]
|
| 24 |
+
"""The type of the item. Always `function_call`."""
|
| 25 |
+
|
| 26 |
+
id: str
|
| 27 |
+
"""The unique ID of the item.
|
| 28 |
+
|
| 29 |
+
This may be provided by the client or generated by the server.
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
call_id: str
|
| 33 |
+
"""The ID of the function call."""
|
| 34 |
+
|
| 35 |
+
object: Literal["realtime.item"]
|
| 36 |
+
"""Identifier for the API object being returned - always `realtime.item`.
|
| 37 |
+
|
| 38 |
+
Optional when creating a new item.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
status: Literal["completed", "incomplete", "in_progress"]
|
| 42 |
+
"""The status of the item. Has no effect on the conversation."""
|
data/tefig/envs/olmes-eval/lib/python3.10/site-packages/openai/types/realtime/realtime_conversation_item_system_message.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ..._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["RealtimeConversationItemSystemMessage", "Content"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class Content(BaseModel):
|
| 12 |
+
text: Optional[str] = None
|
| 13 |
+
"""The text content."""
|
| 14 |
+
|
| 15 |
+
type: Optional[Literal["input_text"]] = None
|
| 16 |
+
"""The content type. Always `input_text` for system messages."""
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class RealtimeConversationItemSystemMessage(BaseModel):
|
| 20 |
+
"""
|
| 21 |
+
A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
content: List[Content]
|
| 25 |
+
"""The content of the message."""
|
| 26 |
+
|
| 27 |
+
role: Literal["system"]
|
| 28 |
+
"""The role of the message sender. Always `system`."""
|
| 29 |
+
|
| 30 |
+
type: Literal["message"]
|
| 31 |
+
"""The type of the item. Always `message`."""
|
| 32 |
+
|
| 33 |
+
id: Optional[str] = None
|
| 34 |
+
"""The unique ID of the item.
|
| 35 |
+
|
| 36 |
+
This may be provided by the client or generated by the server.
|
| 37 |
+
"""
|
| 38 |
+
|
| 39 |
+
object: Optional[Literal["realtime.item"]] = None
|
| 40 |
+
"""Identifier for the API object being returned - always `realtime.item`.
|
| 41 |
+
|
| 42 |
+
Optional when creating a new item.
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
status: Optional[Literal["completed", "incomplete", "in_progress"]] = None
|
| 46 |
+
"""The status of the item. Has no effect on the conversation."""
|