openai 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +4 -0
- data/lib/openai/internal/stream.rb +3 -2
- data/lib/openai/models/audio/speech_create_params.rb +6 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -0
- data/lib/openai/models/evals/run_cancel_response.rb +2 -2
- data/lib/openai/models/evals/run_create_params.rb +2 -2
- data/lib/openai/models/evals/run_create_response.rb +2 -2
- data/lib/openai/models/evals/run_list_response.rb +2 -2
- data/lib/openai/models/evals/run_retrieve_response.rb +2 -2
- data/lib/openai/models/realtime/client_secret_create_params.rb +93 -0
- data/lib/openai/models/realtime/client_secret_create_response.rb +300 -0
- data/lib/openai/models/realtime/conversation_created_event.rb +70 -0
- data/lib/openai/models/realtime/conversation_item.rb +44 -0
- data/lib/openai/models/realtime/conversation_item_added.rb +48 -0
- data/lib/openai/models/realtime/conversation_item_create_event.rb +57 -0
- data/lib/openai/models/realtime/conversation_item_created_event.rb +59 -0
- data/lib/openai/models/realtime/conversation_item_delete_event.rb +39 -0
- data/lib/openai/models/realtime/conversation_item_deleted_event.rb +38 -0
- data/lib/openai/models/realtime/conversation_item_done.rb +48 -0
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rb +189 -0
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rb +63 -0
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rb +96 -0
- data/lib/openai/models/realtime/conversation_item_input_audio_transcription_segment.rb +84 -0
- data/lib/openai/models/realtime/conversation_item_retrieve_event.rb +40 -0
- data/lib/openai/models/realtime/conversation_item_truncate_event.rb +68 -0
- data/lib/openai/models/realtime/conversation_item_truncated_event.rb +60 -0
- data/lib/openai/models/realtime/conversation_item_with_reference.rb +235 -0
- data/lib/openai/models/realtime/input_audio_buffer_append_event.rb +49 -0
- data/lib/openai/models/realtime/input_audio_buffer_clear_event.rb +29 -0
- data/lib/openai/models/realtime/input_audio_buffer_cleared_event.rb +29 -0
- data/lib/openai/models/realtime/input_audio_buffer_commit_event.rb +35 -0
- data/lib/openai/models/realtime/input_audio_buffer_committed_event.rb +51 -0
- data/lib/openai/models/realtime/input_audio_buffer_speech_started_event.rb +59 -0
- data/lib/openai/models/realtime/input_audio_buffer_speech_stopped_event.rb +51 -0
- data/lib/openai/models/realtime/input_audio_buffer_timeout_triggered.rb +52 -0
- data/lib/openai/models/realtime/log_prob_properties.rb +39 -0
- data/lib/openai/models/realtime/mcp_list_tools_completed.rb +36 -0
- data/lib/openai/models/realtime/mcp_list_tools_failed.rb +36 -0
- data/lib/openai/models/realtime/mcp_list_tools_in_progress.rb +36 -0
- data/lib/openai/models/realtime/output_audio_buffer_clear_event.rb +32 -0
- data/lib/openai/models/realtime/rate_limits_updated_event.rb +91 -0
- data/lib/openai/models/realtime/realtime_audio_config.rb +446 -0
- data/lib/openai/models/realtime/realtime_client_event.rb +123 -0
- data/lib/openai/models/realtime/realtime_client_secret_config.rb +64 -0
- data/lib/openai/models/realtime/realtime_conversation_item_assistant_message.rb +118 -0
- data/lib/openai/models/realtime/realtime_conversation_item_function_call.rb +94 -0
- data/lib/openai/models/realtime/realtime_conversation_item_function_call_output.rb +86 -0
- data/lib/openai/models/realtime/realtime_conversation_item_system_message.rb +118 -0
- data/lib/openai/models/realtime/realtime_conversation_item_user_message.rb +135 -0
- data/lib/openai/models/realtime/realtime_error.rb +55 -0
- data/lib/openai/models/realtime/realtime_error_event.rb +38 -0
- data/lib/openai/models/realtime/realtime_mcp_approval_request.rb +52 -0
- data/lib/openai/models/realtime/realtime_mcp_approval_response.rb +52 -0
- data/lib/openai/models/realtime/realtime_mcp_list_tools.rb +84 -0
- data/lib/openai/models/realtime/realtime_mcp_protocol_error.rb +29 -0
- data/lib/openai/models/realtime/realtime_mcp_tool_call.rb +94 -0
- data/lib/openai/models/realtime/realtime_mcp_tool_execution_error.rb +23 -0
- data/lib/openai/models/realtime/realtime_mcphttp_error.rb +29 -0
- data/lib/openai/models/realtime/realtime_response.rb +259 -0
- data/lib/openai/models/realtime/realtime_response_status.rb +103 -0
- data/lib/openai/models/realtime/realtime_response_usage.rb +61 -0
- data/lib/openai/models/realtime/realtime_response_usage_input_token_details.rb +36 -0
- data/lib/openai/models/realtime/realtime_response_usage_output_token_details.rb +28 -0
- data/lib/openai/models/realtime/realtime_server_event.rb +369 -0
- data/lib/openai/models/realtime/realtime_session.rb +696 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +234 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +579 -0
- data/lib/openai/models/realtime/realtime_tool_choice_config.rb +32 -0
- data/lib/openai/models/realtime/realtime_tools_config.rb +11 -0
- data/lib/openai/models/realtime/realtime_tools_config_union.rb +379 -0
- data/lib/openai/models/realtime/realtime_tracing_config.rb +61 -0
- data/lib/openai/models/realtime/realtime_transcription_session_create_request.rb +312 -0
- data/lib/openai/models/realtime/realtime_truncation.rb +67 -0
- data/lib/openai/models/realtime/response_audio_delta_event.rb +68 -0
- data/lib/openai/models/realtime/response_audio_done_event.rb +61 -0
- data/lib/openai/models/realtime/response_audio_transcript_delta_event.rb +68 -0
- data/lib/openai/models/realtime/response_audio_transcript_done_event.rb +70 -0
- data/lib/openai/models/realtime/response_cancel_event.rb +42 -0
- data/lib/openai/models/realtime/response_content_part_added_event.rb +120 -0
- data/lib/openai/models/realtime/response_content_part_done_event.rb +120 -0
- data/lib/openai/models/realtime/response_create_event.rb +391 -0
- data/lib/openai/models/realtime/response_created_event.rb +37 -0
- data/lib/openai/models/realtime/response_done_event.rb +38 -0
- data/lib/openai/models/realtime/response_function_call_arguments_delta_event.rb +72 -0
- data/lib/openai/models/realtime/response_function_call_arguments_done_event.rb +73 -0
- data/lib/openai/models/realtime/response_mcp_call_arguments_delta.rb +68 -0
- data/lib/openai/models/realtime/response_mcp_call_arguments_done.rb +60 -0
- data/lib/openai/models/realtime/response_mcp_call_completed.rb +44 -0
- data/lib/openai/models/realtime/response_mcp_call_failed.rb +44 -0
- data/lib/openai/models/realtime/response_mcp_call_in_progress.rb +44 -0
- data/lib/openai/models/realtime/response_output_item_added_event.rb +52 -0
- data/lib/openai/models/realtime/response_output_item_done_event.rb +53 -0
- data/lib/openai/models/realtime/response_text_delta_event.rb +68 -0
- data/lib/openai/models/realtime/response_text_done_event.rb +69 -0
- data/lib/openai/models/realtime/session_created_event.rb +38 -0
- data/lib/openai/models/realtime/session_update_event.rb +44 -0
- data/lib/openai/models/realtime/session_updated_event.rb +37 -0
- data/lib/openai/models/realtime/transcription_session_created.rb +278 -0
- data/lib/openai/models/realtime/transcription_session_update.rb +36 -0
- data/lib/openai/models/realtime/transcription_session_updated_event.rb +279 -0
- data/lib/openai/models/responses/response.rb +6 -3
- data/lib/openai/models/responses/response_create_params.rb +6 -3
- data/lib/openai/models/responses/tool.rb +3 -156
- data/lib/openai/models/responses/web_search_preview_tool.rb +124 -0
- data/lib/openai/models/responses/web_search_tool.rb +58 -21
- data/lib/openai/models/webhooks/realtime_call_incoming_webhook_event.rb +119 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +4 -1
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/realtime/client_secrets.rb +44 -0
- data/lib/openai/resources/realtime.rb +18 -0
- data/lib/openai/resources/responses.rb +2 -2
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +95 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/models/audio/speech_create_params.rbi +10 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +10 -0
- data/rbi/openai/models/evals/run_cancel_response.rbi +4 -4
- data/rbi/openai/models/evals/run_create_params.rbi +8 -8
- data/rbi/openai/models/evals/run_create_response.rbi +4 -4
- data/rbi/openai/models/evals/run_list_response.rbi +4 -4
- data/rbi/openai/models/evals/run_retrieve_response.rbi +4 -4
- data/rbi/openai/models/realtime/client_secret_create_params.rbi +222 -0
- data/rbi/openai/models/realtime/client_secret_create_response.rbi +676 -0
- data/rbi/openai/models/realtime/conversation_created_event.rbi +164 -0
- data/rbi/openai/models/realtime/conversation_item.rbi +35 -0
- data/rbi/openai/models/realtime/conversation_item_added.rbi +105 -0
- data/rbi/openai/models/realtime/conversation_item_create_event.rbi +123 -0
- data/rbi/openai/models/realtime/conversation_item_created_event.rbi +117 -0
- data/rbi/openai/models/realtime/conversation_item_delete_event.rbi +57 -0
- data/rbi/openai/models/realtime/conversation_item_deleted_event.rbi +53 -0
- data/rbi/openai/models/realtime/conversation_item_done.rbi +105 -0
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +305 -0
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbi +93 -0
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rbi +158 -0
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_segment.rbi +107 -0
- data/rbi/openai/models/realtime/conversation_item_retrieve_event.rbi +58 -0
- data/rbi/openai/models/realtime/conversation_item_truncate_event.rbi +94 -0
- data/rbi/openai/models/realtime/conversation_item_truncated_event.rbi +80 -0
- data/rbi/openai/models/realtime/conversation_item_with_reference.rbi +549 -0
- data/rbi/openai/models/realtime/input_audio_buffer_append_event.rbi +65 -0
- data/rbi/openai/models/realtime/input_audio_buffer_clear_event.rbi +43 -0
- data/rbi/openai/models/realtime/input_audio_buffer_cleared_event.rbi +40 -0
- data/rbi/openai/models/realtime/input_audio_buffer_commit_event.rbi +49 -0
- data/rbi/openai/models/realtime/input_audio_buffer_committed_event.rbi +72 -0
- data/rbi/openai/models/realtime/input_audio_buffer_speech_started_event.rbi +82 -0
- data/rbi/openai/models/realtime/input_audio_buffer_speech_stopped_event.rbi +73 -0
- data/rbi/openai/models/realtime/input_audio_buffer_timeout_triggered.rbi +75 -0
- data/rbi/openai/models/realtime/log_prob_properties.rbi +55 -0
- data/rbi/openai/models/realtime/mcp_list_tools_completed.rbi +51 -0
- data/rbi/openai/models/realtime/mcp_list_tools_failed.rbi +51 -0
- data/rbi/openai/models/realtime/mcp_list_tools_in_progress.rbi +51 -0
- data/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi +46 -0
- data/rbi/openai/models/realtime/rate_limits_updated_event.rbi +187 -0
- data/rbi/openai/models/realtime/realtime_audio_config.rbi +1004 -0
- data/rbi/openai/models/realtime/realtime_client_event.rbi +38 -0
- data/rbi/openai/models/realtime/realtime_client_secret_config.rbi +147 -0
- data/rbi/openai/models/realtime/realtime_conversation_item_assistant_message.rbi +292 -0
- data/rbi/openai/models/realtime/realtime_conversation_item_function_call.rbi +199 -0
- data/rbi/openai/models/realtime/realtime_conversation_item_function_call_output.rbi +188 -0
- data/rbi/openai/models/realtime/realtime_conversation_item_system_message.rbi +292 -0
- data/rbi/openai/models/realtime/realtime_conversation_item_user_message.rbi +319 -0
- data/rbi/openai/models/realtime/realtime_error.rbi +72 -0
- data/rbi/openai/models/realtime/realtime_error_event.rbi +64 -0
- data/rbi/openai/models/realtime/realtime_mcp_approval_request.rbi +75 -0
- data/rbi/openai/models/realtime/realtime_mcp_approval_response.rbi +75 -0
- data/rbi/openai/models/realtime/realtime_mcp_list_tools.rbi +131 -0
- data/rbi/openai/models/realtime/realtime_mcp_protocol_error.rbi +40 -0
- data/rbi/openai/models/realtime/realtime_mcp_tool_call.rbi +145 -0
- data/rbi/openai/models/realtime/realtime_mcp_tool_execution_error.rbi +31 -0
- data/rbi/openai/models/realtime/realtime_mcphttp_error.rbi +40 -0
- data/rbi/openai/models/realtime/realtime_response.rbi +573 -0
- data/rbi/openai/models/realtime/realtime_response_status.rbi +233 -0
- data/rbi/openai/models/realtime/realtime_response_usage.rbi +121 -0
- data/rbi/openai/models/realtime/realtime_response_usage_input_token_details.rbi +68 -0
- data/rbi/openai/models/realtime/realtime_response_usage_output_token_details.rbi +51 -0
- data/rbi/openai/models/realtime/realtime_server_event.rbi +311 -0
- data/rbi/openai/models/realtime/realtime_session.rbi +1426 -0
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +560 -0
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +1249 -0
- data/rbi/openai/models/realtime/realtime_tool_choice_config.rbi +30 -0
- data/rbi/openai/models/realtime/realtime_tools_config.rbi +15 -0
- data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +755 -0
- data/rbi/openai/models/realtime/realtime_tracing_config.rbi +95 -0
- data/rbi/openai/models/realtime/realtime_transcription_session_create_request.rbi +703 -0
- data/rbi/openai/models/realtime/realtime_truncation.rbi +117 -0
- data/rbi/openai/models/realtime/response_audio_delta_event.rbi +91 -0
- data/rbi/openai/models/realtime/response_audio_done_event.rbi +84 -0
- data/rbi/openai/models/realtime/response_audio_transcript_delta_event.rbi +91 -0
- data/rbi/openai/models/realtime/response_audio_transcript_done_event.rbi +93 -0
- data/rbi/openai/models/realtime/response_cancel_event.rbi +63 -0
- data/rbi/openai/models/realtime/response_content_part_added_event.rbi +219 -0
- data/rbi/openai/models/realtime/response_content_part_done_event.rbi +219 -0
- data/rbi/openai/models/realtime/response_create_event.rbi +863 -0
- data/rbi/openai/models/realtime/response_created_event.rbi +65 -0
- data/rbi/openai/models/realtime/response_done_event.rbi +66 -0
- data/rbi/openai/models/realtime/response_function_call_arguments_delta_event.rbi +91 -0
- data/rbi/openai/models/realtime/response_function_call_arguments_done_event.rbi +92 -0
- data/rbi/openai/models/realtime/response_mcp_call_arguments_delta.rbi +91 -0
- data/rbi/openai/models/realtime/response_mcp_call_arguments_done.rbi +83 -0
- data/rbi/openai/models/realtime/response_mcp_call_completed.rbi +67 -0
- data/rbi/openai/models/realtime/response_mcp_call_failed.rbi +67 -0
- data/rbi/openai/models/realtime/response_mcp_call_in_progress.rbi +67 -0
- data/rbi/openai/models/realtime/response_output_item_added_event.rbi +111 -0
- data/rbi/openai/models/realtime/response_output_item_done_event.rbi +112 -0
- data/rbi/openai/models/realtime/response_text_delta_event.rbi +91 -0
- data/rbi/openai/models/realtime/response_text_done_event.rbi +92 -0
- data/rbi/openai/models/realtime/session_created_event.rbi +64 -0
- data/rbi/openai/models/realtime/session_update_event.rbi +77 -0
- data/rbi/openai/models/realtime/session_updated_event.rbi +63 -0
- data/rbi/openai/models/realtime/transcription_session_created.rbi +653 -0
- data/rbi/openai/models/realtime/transcription_session_update.rbi +74 -0
- data/rbi/openai/models/realtime/transcription_session_updated_event.rbi +657 -0
- data/rbi/openai/models/responses/response.rbi +10 -4
- data/rbi/openai/models/responses/response_create_params.rbi +16 -10
- data/rbi/openai/models/responses/tool.rbi +2 -348
- data/rbi/openai/models/responses/web_search_preview_tool.rbi +245 -0
- data/rbi/openai/models/responses/web_search_tool.rbi +120 -23
- data/rbi/openai/models/webhooks/realtime_call_incoming_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +1 -0
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/realtime/client_secrets.rbi +38 -0
- data/rbi/openai/resources/realtime.rbi +15 -0
- data/rbi/openai/resources/responses.rbi +12 -6
- data/rbi/openai/resources/webhooks.rbi +1 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/models/audio/speech_create_params.rbs +4 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -0
- data/sig/openai/models/realtime/client_secret_create_params.rbs +89 -0
- data/sig/openai/models/realtime/client_secret_create_response.rbs +292 -0
- data/sig/openai/models/realtime/conversation_created_event.rbs +70 -0
- data/sig/openai/models/realtime/conversation_item.rbs +22 -0
- data/sig/openai/models/realtime/conversation_item_added.rbs +37 -0
- data/sig/openai/models/realtime/conversation_item_create_event.rbs +41 -0
- data/sig/openai/models/realtime/conversation_item_created_event.rbs +37 -0
- data/sig/openai/models/realtime/conversation_item_delete_event.rbs +30 -0
- data/sig/openai/models/realtime/conversation_item_deleted_event.rbs +32 -0
- data/sig/openai/models/realtime/conversation_item_done.rbs +37 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbs +136 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbs +51 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rbs +77 -0
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_segment.rbs +62 -0
- data/sig/openai/models/realtime/conversation_item_retrieve_event.rbs +34 -0
- data/sig/openai/models/realtime/conversation_item_truncate_event.rbs +44 -0
- data/sig/openai/models/realtime/conversation_item_truncated_event.rbs +42 -0
- data/sig/openai/models/realtime/conversation_item_with_reference.rbs +207 -0
- data/sig/openai/models/realtime/input_audio_buffer_append_event.rbs +30 -0
- data/sig/openai/models/realtime/input_audio_buffer_clear_event.rbs +23 -0
- data/sig/openai/models/realtime/input_audio_buffer_cleared_event.rbs +24 -0
- data/sig/openai/models/realtime/input_audio_buffer_commit_event.rbs +23 -0
- data/sig/openai/models/realtime/input_audio_buffer_committed_event.rbs +37 -0
- data/sig/openai/models/realtime/input_audio_buffer_speech_started_event.rbs +37 -0
- data/sig/openai/models/realtime/input_audio_buffer_speech_stopped_event.rbs +37 -0
- data/sig/openai/models/realtime/input_audio_buffer_timeout_triggered.rbs +42 -0
- data/sig/openai/models/realtime/log_prob_properties.rbs +28 -0
- data/sig/openai/models/realtime/mcp_list_tools_completed.rbs +28 -0
- data/sig/openai/models/realtime/mcp_list_tools_failed.rbs +28 -0
- data/sig/openai/models/realtime/mcp_list_tools_in_progress.rbs +32 -0
- data/sig/openai/models/realtime/output_audio_buffer_clear_event.rbs +23 -0
- data/sig/openai/models/realtime/rate_limits_updated_event.rbs +85 -0
- data/sig/openai/models/realtime/realtime_audio_config.rbs +354 -0
- data/sig/openai/models/realtime/realtime_client_event.rbs +25 -0
- data/sig/openai/models/realtime/realtime_client_secret_config.rbs +60 -0
- data/sig/openai/models/realtime/realtime_conversation_item_assistant_message.rbs +117 -0
- data/sig/openai/models/realtime/realtime_conversation_item_function_call.rbs +86 -0
- data/sig/openai/models/realtime/realtime_conversation_item_function_call_output.rbs +79 -0
- data/sig/openai/models/realtime/realtime_conversation_item_system_message.rbs +117 -0
- data/sig/openai/models/realtime/realtime_conversation_item_user_message.rbs +132 -0
- data/sig/openai/models/realtime/realtime_error.rbs +42 -0
- data/sig/openai/models/realtime/realtime_error_event.rbs +32 -0
- data/sig/openai/models/realtime/realtime_mcp_approval_request.rbs +42 -0
- data/sig/openai/models/realtime/realtime_mcp_approval_response.rbs +42 -0
- data/sig/openai/models/realtime/realtime_mcp_list_tools.rbs +71 -0
- data/sig/openai/models/realtime/realtime_mcp_protocol_error.rbs +28 -0
- data/sig/openai/models/realtime/realtime_mcp_tool_call.rbs +68 -0
- data/sig/openai/models/realtime/realtime_mcp_tool_execution_error.rbs +18 -0
- data/sig/openai/models/realtime/realtime_mcphttp_error.rbs +24 -0
- data/sig/openai/models/realtime/realtime_response.rbs +210 -0
- data/sig/openai/models/realtime/realtime_response_status.rbs +90 -0
- data/sig/openai/models/realtime/realtime_response_usage.rbs +56 -0
- data/sig/openai/models/realtime/realtime_response_usage_input_token_details.rbs +34 -0
- data/sig/openai/models/realtime/realtime_response_usage_output_token_details.rbs +22 -0
- data/sig/openai/models/realtime/realtime_server_event.rbs +168 -0
- data/sig/openai/models/realtime/realtime_session.rbs +521 -0
- data/sig/openai/models/realtime/realtime_session_create_request.rbs +178 -0
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +526 -0
- data/sig/openai/models/realtime/realtime_tool_choice_config.rbs +16 -0
- data/sig/openai/models/realtime/realtime_tools_config.rbs +10 -0
- data/sig/openai/models/realtime/realtime_tools_config_union.rbs +280 -0
- data/sig/openai/models/realtime/realtime_tracing_config.rbs +43 -0
- data/sig/openai/models/realtime/realtime_transcription_session_create_request.rbs +242 -0
- data/sig/openai/models/realtime/realtime_truncation.rbs +53 -0
- data/sig/openai/models/realtime/response_audio_delta_event.rbs +52 -0
- data/sig/openai/models/realtime/response_audio_done_event.rbs +47 -0
- data/sig/openai/models/realtime/response_audio_transcript_delta_event.rbs +52 -0
- data/sig/openai/models/realtime/response_audio_transcript_done_event.rbs +52 -0
- data/sig/openai/models/realtime/response_cancel_event.rbs +32 -0
- data/sig/openai/models/realtime/response_content_part_added_event.rbs +105 -0
- data/sig/openai/models/realtime/response_content_part_done_event.rbs +105 -0
- data/sig/openai/models/realtime/response_create_event.rbs +281 -0
- data/sig/openai/models/realtime/response_created_event.rbs +32 -0
- data/sig/openai/models/realtime/response_done_event.rbs +32 -0
- data/sig/openai/models/realtime/response_function_call_arguments_delta_event.rbs +52 -0
- data/sig/openai/models/realtime/response_function_call_arguments_done_event.rbs +52 -0
- data/sig/openai/models/realtime/response_mcp_call_arguments_delta.rbs +52 -0
- data/sig/openai/models/realtime/response_mcp_call_arguments_done.rbs +47 -0
- data/sig/openai/models/realtime/response_mcp_call_completed.rbs +37 -0
- data/sig/openai/models/realtime/response_mcp_call_failed.rbs +37 -0
- data/sig/openai/models/realtime/response_mcp_call_in_progress.rbs +37 -0
- data/sig/openai/models/realtime/response_output_item_added_event.rbs +42 -0
- data/sig/openai/models/realtime/response_output_item_done_event.rbs +42 -0
- data/sig/openai/models/realtime/response_text_delta_event.rbs +52 -0
- data/sig/openai/models/realtime/response_text_done_event.rbs +52 -0
- data/sig/openai/models/realtime/session_created_event.rbs +32 -0
- data/sig/openai/models/realtime/session_update_event.rbs +34 -0
- data/sig/openai/models/realtime/session_updated_event.rbs +32 -0
- data/sig/openai/models/realtime/transcription_session_created.rbs +282 -0
- data/sig/openai/models/realtime/transcription_session_update.rbs +34 -0
- data/sig/openai/models/realtime/transcription_session_updated_event.rbs +282 -0
- data/sig/openai/models/responses/tool.rbs +1 -121
- data/sig/openai/models/responses/web_search_preview_tool.rbs +96 -0
- data/sig/openai/models/responses/web_search_tool.rbs +39 -10
- data/sig/openai/models/webhooks/realtime_call_incoming_webhook_event.rbs +90 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/realtime/client_secrets.rbs +15 -0
- data/sig/openai/resources/realtime.rbs +9 -0
- data/sig/openai/resources/webhooks.rbs +1 -0
- metadata +287 -2
@@ -0,0 +1,560 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module OpenAI
|
4
|
+
module Models
|
5
|
+
module Realtime
|
6
|
+
class RealtimeSessionCreateRequest < OpenAI::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(
|
10
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest,
|
11
|
+
OpenAI::Internal::AnyHash
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
# The Realtime model used for this session.
|
16
|
+
sig do
|
17
|
+
returns(
|
18
|
+
T.any(
|
19
|
+
String,
|
20
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::OrSymbol
|
21
|
+
)
|
22
|
+
)
|
23
|
+
end
|
24
|
+
attr_accessor :model
|
25
|
+
|
26
|
+
# The type of session to create. Always `realtime` for the Realtime API.
|
27
|
+
sig { returns(Symbol) }
|
28
|
+
attr_accessor :type
|
29
|
+
|
30
|
+
# Configuration for input and output audio.
|
31
|
+
sig { returns(T.nilable(OpenAI::Realtime::RealtimeAudioConfig)) }
|
32
|
+
attr_reader :audio
|
33
|
+
|
34
|
+
sig do
|
35
|
+
params(audio: OpenAI::Realtime::RealtimeAudioConfig::OrHash).void
|
36
|
+
end
|
37
|
+
attr_writer :audio
|
38
|
+
|
39
|
+
# Configuration options for the generated client secret.
|
40
|
+
sig { returns(T.nilable(OpenAI::Realtime::RealtimeClientSecretConfig)) }
|
41
|
+
attr_reader :client_secret
|
42
|
+
|
43
|
+
sig do
|
44
|
+
params(
|
45
|
+
client_secret: OpenAI::Realtime::RealtimeClientSecretConfig::OrHash
|
46
|
+
).void
|
47
|
+
end
|
48
|
+
attr_writer :client_secret
|
49
|
+
|
50
|
+
# Additional fields to include in server outputs.
|
51
|
+
#
|
52
|
+
# - `item.input_audio_transcription.logprobs`: Include logprobs for input audio
|
53
|
+
# transcription.
|
54
|
+
sig do
|
55
|
+
returns(
|
56
|
+
T.nilable(
|
57
|
+
T::Array[
|
58
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include::OrSymbol
|
59
|
+
]
|
60
|
+
)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
attr_reader :include
|
64
|
+
|
65
|
+
sig do
|
66
|
+
params(
|
67
|
+
include:
|
68
|
+
T::Array[
|
69
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include::OrSymbol
|
70
|
+
]
|
71
|
+
).void
|
72
|
+
end
|
73
|
+
attr_writer :include
|
74
|
+
|
75
|
+
# The default system instructions (i.e. system message) prepended to model calls.
|
76
|
+
# This field allows the client to guide the model on desired responses. The model
|
77
|
+
# can be instructed on response content and format, (e.g. "be extremely succinct",
|
78
|
+
# "act friendly", "here are examples of good responses") and on audio behavior
|
79
|
+
# (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
80
|
+
# instructions are not guaranteed to be followed by the model, but they provide
|
81
|
+
# guidance to the model on the desired behavior.
|
82
|
+
#
|
83
|
+
# Note that the server sets default instructions which will be used if this field
|
84
|
+
# is not set and are visible in the `session.created` event at the start of the
|
85
|
+
# session.
|
86
|
+
sig { returns(T.nilable(String)) }
|
87
|
+
attr_reader :instructions
|
88
|
+
|
89
|
+
sig { params(instructions: String).void }
|
90
|
+
attr_writer :instructions
|
91
|
+
|
92
|
+
# Maximum number of output tokens for a single assistant response, inclusive of
|
93
|
+
# tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
94
|
+
# `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
95
|
+
sig { returns(T.nilable(T.any(Integer, Symbol))) }
|
96
|
+
attr_reader :max_output_tokens
|
97
|
+
|
98
|
+
sig { params(max_output_tokens: T.any(Integer, Symbol)).void }
|
99
|
+
attr_writer :max_output_tokens
|
100
|
+
|
101
|
+
# The set of modalities the model can respond with. To disable audio, set this to
|
102
|
+
# ["text"].
|
103
|
+
sig do
|
104
|
+
returns(
|
105
|
+
T.nilable(
|
106
|
+
T::Array[
|
107
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::OrSymbol
|
108
|
+
]
|
109
|
+
)
|
110
|
+
)
|
111
|
+
end
|
112
|
+
attr_reader :output_modalities
|
113
|
+
|
114
|
+
sig do
|
115
|
+
params(
|
116
|
+
output_modalities:
|
117
|
+
T::Array[
|
118
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::OrSymbol
|
119
|
+
]
|
120
|
+
).void
|
121
|
+
end
|
122
|
+
attr_writer :output_modalities
|
123
|
+
|
124
|
+
# Reference to a prompt template and its variables.
|
125
|
+
# [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
126
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponsePrompt)) }
|
127
|
+
attr_reader :prompt
|
128
|
+
|
129
|
+
sig do
|
130
|
+
params(
|
131
|
+
prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash)
|
132
|
+
).void
|
133
|
+
end
|
134
|
+
attr_writer :prompt
|
135
|
+
|
136
|
+
# Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a
|
137
|
+
# temperature of 0.8 is highly recommended for best performance.
|
138
|
+
sig { returns(T.nilable(Float)) }
|
139
|
+
attr_reader :temperature
|
140
|
+
|
141
|
+
sig { params(temperature: Float).void }
|
142
|
+
attr_writer :temperature
|
143
|
+
|
144
|
+
# How the model chooses tools. Provide one of the string modes or force a specific
|
145
|
+
# function/MCP tool.
|
146
|
+
sig do
|
147
|
+
returns(
|
148
|
+
T.nilable(
|
149
|
+
T.any(
|
150
|
+
OpenAI::Responses::ToolChoiceOptions::OrSymbol,
|
151
|
+
OpenAI::Responses::ToolChoiceFunction,
|
152
|
+
OpenAI::Responses::ToolChoiceMcp
|
153
|
+
)
|
154
|
+
)
|
155
|
+
)
|
156
|
+
end
|
157
|
+
attr_reader :tool_choice
|
158
|
+
|
159
|
+
sig do
|
160
|
+
params(
|
161
|
+
tool_choice:
|
162
|
+
T.any(
|
163
|
+
OpenAI::Responses::ToolChoiceOptions::OrSymbol,
|
164
|
+
OpenAI::Responses::ToolChoiceFunction::OrHash,
|
165
|
+
OpenAI::Responses::ToolChoiceMcp::OrHash
|
166
|
+
)
|
167
|
+
).void
|
168
|
+
end
|
169
|
+
attr_writer :tool_choice
|
170
|
+
|
171
|
+
# Tools available to the model.
|
172
|
+
sig do
|
173
|
+
returns(
|
174
|
+
T.nilable(
|
175
|
+
T::Array[
|
176
|
+
T.any(
|
177
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Function,
|
178
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp
|
179
|
+
)
|
180
|
+
]
|
181
|
+
)
|
182
|
+
)
|
183
|
+
end
|
184
|
+
attr_reader :tools
|
185
|
+
|
186
|
+
sig do
|
187
|
+
params(
|
188
|
+
tools:
|
189
|
+
T::Array[
|
190
|
+
T.any(
|
191
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Function::OrHash,
|
192
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp::OrHash
|
193
|
+
)
|
194
|
+
]
|
195
|
+
).void
|
196
|
+
end
|
197
|
+
attr_writer :tools
|
198
|
+
|
199
|
+
# Configuration options for tracing. Set to null to disable tracing. Once tracing
|
200
|
+
# is enabled for a session, the configuration cannot be modified.
|
201
|
+
#
|
202
|
+
# `auto` will create a trace for the session with default values for the workflow
|
203
|
+
# name, group id, and metadata.
|
204
|
+
sig do
|
205
|
+
returns(
|
206
|
+
T.nilable(
|
207
|
+
T.any(
|
208
|
+
Symbol,
|
209
|
+
OpenAI::Realtime::RealtimeTracingConfig::TracingConfiguration
|
210
|
+
)
|
211
|
+
)
|
212
|
+
)
|
213
|
+
end
|
214
|
+
attr_accessor :tracing
|
215
|
+
|
216
|
+
# Controls how the realtime conversation is truncated prior to model inference.
|
217
|
+
# The default is `auto`. When set to `retention_ratio`, the server retains a
|
218
|
+
# fraction of the conversation tokens prior to the instructions.
|
219
|
+
sig do
|
220
|
+
returns(
|
221
|
+
T.nilable(
|
222
|
+
T.any(
|
223
|
+
OpenAI::Realtime::RealtimeTruncation::RealtimeTruncationStrategy::OrSymbol,
|
224
|
+
OpenAI::Realtime::RealtimeTruncation::RetentionRatioTruncation
|
225
|
+
)
|
226
|
+
)
|
227
|
+
)
|
228
|
+
end
|
229
|
+
attr_reader :truncation
|
230
|
+
|
231
|
+
sig do
|
232
|
+
params(
|
233
|
+
truncation:
|
234
|
+
T.any(
|
235
|
+
OpenAI::Realtime::RealtimeTruncation::RealtimeTruncationStrategy::OrSymbol,
|
236
|
+
OpenAI::Realtime::RealtimeTruncation::RetentionRatioTruncation::OrHash
|
237
|
+
)
|
238
|
+
).void
|
239
|
+
end
|
240
|
+
attr_writer :truncation
|
241
|
+
|
242
|
+
# Realtime session object configuration.
|
243
|
+
sig do
|
244
|
+
params(
|
245
|
+
model:
|
246
|
+
T.any(
|
247
|
+
String,
|
248
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::OrSymbol
|
249
|
+
),
|
250
|
+
audio: OpenAI::Realtime::RealtimeAudioConfig::OrHash,
|
251
|
+
client_secret: OpenAI::Realtime::RealtimeClientSecretConfig::OrHash,
|
252
|
+
include:
|
253
|
+
T::Array[
|
254
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include::OrSymbol
|
255
|
+
],
|
256
|
+
instructions: String,
|
257
|
+
max_output_tokens: T.any(Integer, Symbol),
|
258
|
+
output_modalities:
|
259
|
+
T::Array[
|
260
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::OrSymbol
|
261
|
+
],
|
262
|
+
prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash),
|
263
|
+
temperature: Float,
|
264
|
+
tool_choice:
|
265
|
+
T.any(
|
266
|
+
OpenAI::Responses::ToolChoiceOptions::OrSymbol,
|
267
|
+
OpenAI::Responses::ToolChoiceFunction::OrHash,
|
268
|
+
OpenAI::Responses::ToolChoiceMcp::OrHash
|
269
|
+
),
|
270
|
+
tools:
|
271
|
+
T::Array[
|
272
|
+
T.any(
|
273
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Function::OrHash,
|
274
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp::OrHash
|
275
|
+
)
|
276
|
+
],
|
277
|
+
tracing:
|
278
|
+
T.nilable(
|
279
|
+
T.any(
|
280
|
+
Symbol,
|
281
|
+
OpenAI::Realtime::RealtimeTracingConfig::TracingConfiguration::OrHash
|
282
|
+
)
|
283
|
+
),
|
284
|
+
truncation:
|
285
|
+
T.any(
|
286
|
+
OpenAI::Realtime::RealtimeTruncation::RealtimeTruncationStrategy::OrSymbol,
|
287
|
+
OpenAI::Realtime::RealtimeTruncation::RetentionRatioTruncation::OrHash
|
288
|
+
),
|
289
|
+
type: Symbol
|
290
|
+
).returns(T.attached_class)
|
291
|
+
end
|
292
|
+
def self.new(
|
293
|
+
# The Realtime model used for this session.
|
294
|
+
model:,
|
295
|
+
# Configuration for input and output audio.
|
296
|
+
audio: nil,
|
297
|
+
# Configuration options for the generated client secret.
|
298
|
+
client_secret: nil,
|
299
|
+
# Additional fields to include in server outputs.
|
300
|
+
#
|
301
|
+
# - `item.input_audio_transcription.logprobs`: Include logprobs for input audio
|
302
|
+
# transcription.
|
303
|
+
include: nil,
|
304
|
+
# The default system instructions (i.e. system message) prepended to model calls.
|
305
|
+
# This field allows the client to guide the model on desired responses. The model
|
306
|
+
# can be instructed on response content and format, (e.g. "be extremely succinct",
|
307
|
+
# "act friendly", "here are examples of good responses") and on audio behavior
|
308
|
+
# (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The
|
309
|
+
# instructions are not guaranteed to be followed by the model, but they provide
|
310
|
+
# guidance to the model on the desired behavior.
|
311
|
+
#
|
312
|
+
# Note that the server sets default instructions which will be used if this field
|
313
|
+
# is not set and are visible in the `session.created` event at the start of the
|
314
|
+
# session.
|
315
|
+
instructions: nil,
|
316
|
+
# Maximum number of output tokens for a single assistant response, inclusive of
|
317
|
+
# tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
318
|
+
# `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
319
|
+
max_output_tokens: nil,
|
320
|
+
# The set of modalities the model can respond with. To disable audio, set this to
|
321
|
+
# ["text"].
|
322
|
+
output_modalities: nil,
|
323
|
+
# Reference to a prompt template and its variables.
|
324
|
+
# [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
325
|
+
prompt: nil,
|
326
|
+
# Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a
|
327
|
+
# temperature of 0.8 is highly recommended for best performance.
|
328
|
+
temperature: nil,
|
329
|
+
# How the model chooses tools. Provide one of the string modes or force a specific
|
330
|
+
# function/MCP tool.
|
331
|
+
tool_choice: nil,
|
332
|
+
# Tools available to the model.
|
333
|
+
tools: nil,
|
334
|
+
# Configuration options for tracing. Set to null to disable tracing. Once tracing
|
335
|
+
# is enabled for a session, the configuration cannot be modified.
|
336
|
+
#
|
337
|
+
# `auto` will create a trace for the session with default values for the workflow
|
338
|
+
# name, group id, and metadata.
|
339
|
+
tracing: nil,
|
340
|
+
# Controls how the realtime conversation is truncated prior to model inference.
|
341
|
+
# The default is `auto`. When set to `retention_ratio`, the server retains a
|
342
|
+
# fraction of the conversation tokens prior to the instructions.
|
343
|
+
truncation: nil,
|
344
|
+
# The type of session to create. Always `realtime` for the Realtime API.
|
345
|
+
type: :realtime
|
346
|
+
)
|
347
|
+
end
|
348
|
+
|
349
|
+
sig do
|
350
|
+
override.returns(
|
351
|
+
{
|
352
|
+
model:
|
353
|
+
T.any(
|
354
|
+
String,
|
355
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::OrSymbol
|
356
|
+
),
|
357
|
+
type: Symbol,
|
358
|
+
audio: OpenAI::Realtime::RealtimeAudioConfig,
|
359
|
+
client_secret: OpenAI::Realtime::RealtimeClientSecretConfig,
|
360
|
+
include:
|
361
|
+
T::Array[
|
362
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include::OrSymbol
|
363
|
+
],
|
364
|
+
instructions: String,
|
365
|
+
max_output_tokens: T.any(Integer, Symbol),
|
366
|
+
output_modalities:
|
367
|
+
T::Array[
|
368
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::OrSymbol
|
369
|
+
],
|
370
|
+
prompt: T.nilable(OpenAI::Responses::ResponsePrompt),
|
371
|
+
temperature: Float,
|
372
|
+
tool_choice:
|
373
|
+
T.any(
|
374
|
+
OpenAI::Responses::ToolChoiceOptions::OrSymbol,
|
375
|
+
OpenAI::Responses::ToolChoiceFunction,
|
376
|
+
OpenAI::Responses::ToolChoiceMcp
|
377
|
+
),
|
378
|
+
tools:
|
379
|
+
T::Array[
|
380
|
+
T.any(
|
381
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Function,
|
382
|
+
OpenAI::Realtime::RealtimeToolsConfigUnion::Mcp
|
383
|
+
)
|
384
|
+
],
|
385
|
+
tracing:
|
386
|
+
T.nilable(
|
387
|
+
T.any(
|
388
|
+
Symbol,
|
389
|
+
OpenAI::Realtime::RealtimeTracingConfig::TracingConfiguration
|
390
|
+
)
|
391
|
+
),
|
392
|
+
truncation:
|
393
|
+
T.any(
|
394
|
+
OpenAI::Realtime::RealtimeTruncation::RealtimeTruncationStrategy::OrSymbol,
|
395
|
+
OpenAI::Realtime::RealtimeTruncation::RetentionRatioTruncation
|
396
|
+
)
|
397
|
+
}
|
398
|
+
)
|
399
|
+
end
|
400
|
+
def to_hash
|
401
|
+
end
|
402
|
+
|
403
|
+
# The Realtime model used for this session.
|
404
|
+
module Model
|
405
|
+
extend OpenAI::Internal::Type::Union
|
406
|
+
|
407
|
+
Variants =
|
408
|
+
T.type_alias do
|
409
|
+
T.any(
|
410
|
+
String,
|
411
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
412
|
+
)
|
413
|
+
end
|
414
|
+
|
415
|
+
sig do
|
416
|
+
override.returns(
|
417
|
+
T::Array[
|
418
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::Variants
|
419
|
+
]
|
420
|
+
)
|
421
|
+
end
|
422
|
+
def self.variants
|
423
|
+
end
|
424
|
+
|
425
|
+
TaggedSymbol =
|
426
|
+
T.type_alias do
|
427
|
+
T.all(
|
428
|
+
Symbol,
|
429
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model
|
430
|
+
)
|
431
|
+
end
|
432
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
433
|
+
|
434
|
+
GPT_4O_REALTIME =
|
435
|
+
T.let(
|
436
|
+
:"gpt-4o-realtime",
|
437
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
438
|
+
)
|
439
|
+
GPT_4O_MINI_REALTIME =
|
440
|
+
T.let(
|
441
|
+
:"gpt-4o-mini-realtime",
|
442
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
443
|
+
)
|
444
|
+
GPT_4O_REALTIME_PREVIEW =
|
445
|
+
T.let(
|
446
|
+
:"gpt-4o-realtime-preview",
|
447
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
448
|
+
)
|
449
|
+
GPT_4O_REALTIME_PREVIEW_2024_10_01 =
|
450
|
+
T.let(
|
451
|
+
:"gpt-4o-realtime-preview-2024-10-01",
|
452
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
453
|
+
)
|
454
|
+
GPT_4O_REALTIME_PREVIEW_2024_12_17 =
|
455
|
+
T.let(
|
456
|
+
:"gpt-4o-realtime-preview-2024-12-17",
|
457
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
458
|
+
)
|
459
|
+
GPT_4O_REALTIME_PREVIEW_2025_06_03 =
|
460
|
+
T.let(
|
461
|
+
:"gpt-4o-realtime-preview-2025-06-03",
|
462
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
463
|
+
)
|
464
|
+
GPT_4O_MINI_REALTIME_PREVIEW =
|
465
|
+
T.let(
|
466
|
+
:"gpt-4o-mini-realtime-preview",
|
467
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
468
|
+
)
|
469
|
+
GPT_4O_MINI_REALTIME_PREVIEW_2024_12_17 =
|
470
|
+
T.let(
|
471
|
+
:"gpt-4o-mini-realtime-preview-2024-12-17",
|
472
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Model::TaggedSymbol
|
473
|
+
)
|
474
|
+
end
|
475
|
+
|
476
|
+
module Include
|
477
|
+
extend OpenAI::Internal::Type::Enum
|
478
|
+
|
479
|
+
TaggedSymbol =
|
480
|
+
T.type_alias do
|
481
|
+
T.all(
|
482
|
+
Symbol,
|
483
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include
|
484
|
+
)
|
485
|
+
end
|
486
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
487
|
+
|
488
|
+
ITEM_INPUT_AUDIO_TRANSCRIPTION_LOGPROBS =
|
489
|
+
T.let(
|
490
|
+
:"item.input_audio_transcription.logprobs",
|
491
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include::TaggedSymbol
|
492
|
+
)
|
493
|
+
|
494
|
+
sig do
|
495
|
+
override.returns(
|
496
|
+
T::Array[
|
497
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::Include::TaggedSymbol
|
498
|
+
]
|
499
|
+
)
|
500
|
+
end
|
501
|
+
def self.values
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
505
|
+
# Maximum number of output tokens for a single assistant response, inclusive of
|
506
|
+
# tool calls. Provide an integer between 1 and 4096 to limit output tokens, or
|
507
|
+
# `inf` for the maximum available tokens for a given model. Defaults to `inf`.
|
508
|
+
module MaxOutputTokens
|
509
|
+
extend OpenAI::Internal::Type::Union
|
510
|
+
|
511
|
+
Variants = T.type_alias { T.any(Integer, Symbol) }
|
512
|
+
|
513
|
+
sig do
|
514
|
+
override.returns(
|
515
|
+
T::Array[
|
516
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::MaxOutputTokens::Variants
|
517
|
+
]
|
518
|
+
)
|
519
|
+
end
|
520
|
+
def self.variants
|
521
|
+
end
|
522
|
+
end
|
523
|
+
|
524
|
+
module OutputModality
|
525
|
+
extend OpenAI::Internal::Type::Enum
|
526
|
+
|
527
|
+
TaggedSymbol =
|
528
|
+
T.type_alias do
|
529
|
+
T.all(
|
530
|
+
Symbol,
|
531
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality
|
532
|
+
)
|
533
|
+
end
|
534
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
535
|
+
|
536
|
+
TEXT =
|
537
|
+
T.let(
|
538
|
+
:text,
|
539
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::TaggedSymbol
|
540
|
+
)
|
541
|
+
AUDIO =
|
542
|
+
T.let(
|
543
|
+
:audio,
|
544
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::TaggedSymbol
|
545
|
+
)
|
546
|
+
|
547
|
+
sig do
|
548
|
+
override.returns(
|
549
|
+
T::Array[
|
550
|
+
OpenAI::Realtime::RealtimeSessionCreateRequest::OutputModality::TaggedSymbol
|
551
|
+
]
|
552
|
+
)
|
553
|
+
end
|
554
|
+
def self.values
|
555
|
+
end
|
556
|
+
end
|
557
|
+
end
|
558
|
+
end
|
559
|
+
end
|
560
|
+
end
|