openai 0.102.0 → 0.104.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 +88 -0
- data/README.md +23 -1
- data/lib/openai/client.rb +3 -386
- data/lib/openai/helpers/admin/organization/projects/api_keys.rb +42 -0
- data/lib/openai/helpers/agents/session_stream_resource.rb +60 -0
- data/lib/openai/helpers/beta/agents/artifacts.rb +18 -0
- data/lib/openai/helpers/beta/agents/files.rb +41 -0
- data/lib/openai/helpers/client_runtime.rb +391 -0
- data/lib/openai/helpers/files.rb +47 -0
- data/lib/openai/helpers/live/websocket.rb +8 -57
- data/lib/openai/helpers/models/chat/parsed.rb +32 -0
- data/lib/openai/helpers/models/responses/parsed.rb +30 -0
- data/lib/openai/helpers/models/responses/response.rb +32 -0
- data/lib/openai/helpers/models/webhooks/webhook_endpoint_with_secret.rb +20 -0
- data/lib/openai/helpers/realtime/client_extension.rb +1 -2
- data/lib/openai/helpers/realtime/connection_manager.rb +1 -1
- data/lib/openai/helpers/realtime/translation.rb +7 -50
- data/lib/openai/helpers/responses_websocket/client_extension.rb +1 -2
- data/lib/openai/helpers/streaming/chat_completion_resource.rb +36 -0
- data/lib/openai/helpers/streaming/response_stream.rb +1 -16
- data/lib/openai/helpers/streaming/response_stream_resource.rb +78 -0
- data/lib/openai/helpers/vector_stores/file_batches.rb +188 -0
- data/lib/openai/helpers/vector_stores/files.rb +198 -0
- data/lib/openai/helpers/websocket/client_request.rb +31 -6
- data/lib/openai/helpers/websocket/connection.rb +58 -0
- data/lib/openai/helpers/websocket/connection_manager.rb +4 -2
- data/lib/openai/helpers/websocket/protocol.rb +2 -1
- data/lib/openai/helpers/websocket/resource.rb +54 -0
- data/lib/openai/helpers/websocket/typed_connection.rb +95 -0
- data/lib/openai/helpers/websocket.rb +4 -0
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +5 -3
- data/lib/openai/models/admin/organization/external_storage_configuration.rb +5 -3
- data/lib/openai/models/admin/organization/external_storage_create_params.rb +33 -3
- data/lib/openai/models/admin/organization/oci_external_storage_provider.rb +37 -0
- data/lib/openai/models/admin/organization/project_residency.rb +3 -0
- data/lib/openai/models/admin/organization/projects/api_key_update_params.rb +64 -0
- data/lib/openai/models/admin/organization/projects/api_key_update_scopes_params.rb +34 -0
- data/lib/openai/models/admin/organization/usage_decisions_params.rb +177 -0
- data/lib/openai/models/admin/organization/usage_decisions_response.rb +351 -0
- data/lib/openai/models/audio/speech_create_params.rb +6 -3
- data/lib/openai/models/audio/translation_create_response.rb +0 -1
- data/lib/openai/models/audio/voice.rb +17 -2
- data/lib/openai/models/audio/voice_create_params.rb +100 -3
- data/lib/openai/models/beta/agent_create_params.rb +4 -2
- data/lib/openai/models/beta/agent_list_params.rb +4 -4
- data/lib/openai/models/beta/agent_session.rb +37 -1
- data/lib/openai/models/beta/agent_session_environment_expired_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_environment_state.rb +6 -0
- data/lib/openai/models/beta/agent_session_environment_suspended_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_event.rb +7 -1
- data/lib/openai/models/beta/agent_update_params.rb +4 -2
- data/lib/openai/models/beta/agents/environment_info.rb +3 -0
- data/lib/openai/models/beta/agents/environment_list_params.rb +7 -7
- data/lib/openai/models/beta/agents/session_create_params.rb +39 -3
- data/lib/openai/models/beta/agents/session_list_params.rb +7 -10
- data/lib/openai/models/beta/agents/session_update_params.rb +33 -1
- data/lib/openai/models/beta/agents/sessions/artifact_list_params.rb +11 -11
- data/lib/openai/models/beta/agents/vault_list_params.rb +23 -13
- data/lib/openai/models/beta/agents/vault_status_filter.rb +1 -3
- data/lib/openai/models/beta/agents/vault_update_params.rb +47 -0
- data/lib/openai/models/beta/agents/vaults/credential_list_params.rb +23 -13
- data/lib/openai/models/beta/beta_response.rb +23 -2
- data/lib/openai/models/beta/beta_response_error.rb +19 -1
- data/lib/openai/models/beta/beta_response_input_item.rb +107 -1
- data/lib/openai/models/beta/beta_response_item.rb +107 -1
- data/lib/openai/models/beta/beta_response_output_item.rb +107 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +23 -2
- data/lib/openai/models/beta/response_compact_params.rb +21 -0
- data/lib/openai/models/beta/response_create_params.rb +23 -2
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +3 -3
- data/lib/openai/models/chat/chat_completion_message.rb +0 -8
- data/lib/openai/models/chat/chat_completion_message_function_tool_call.rb +0 -8
- data/lib/openai/models/chat/completion_create_params.rb +5 -12
- data/lib/openai/models/chat_model.rb +21 -0
- data/lib/openai/models/conversations/conversation_item.rb +107 -1
- data/lib/openai/models/decision.rb +17 -2
- data/lib/openai/models/decision_create_params.rb +29 -12
- data/lib/openai/models/decision_input_image.rb +4 -3
- data/lib/openai/models/decision_input_message.rb +4 -4
- data/lib/openai/models/decision_input_part.rb +3 -2
- data/lib/openai/models/image_edit_completed_event.rb +1 -2
- data/lib/openai/models/image_edit_partial_image_event.rb +1 -2
- data/lib/openai/models/image_gen_completed_event.rb +1 -2
- data/lib/openai/models/image_gen_partial_image_event.rb +1 -2
- data/lib/openai/models/images_response.rb +1 -2
- data/lib/openai/models/live/built_in_voice.rb +1 -0
- data/lib/openai/models/live/client_event.rb +14 -2
- data/lib/openai/models/live/decision_create_event.rb +26 -0
- data/lib/openai/models/live/decision_event.rb +117 -0
- data/lib/openai/models/live/decision_item_create_event.rb +194 -0
- data/lib/openai/models/live/decision_item_created_event.rb +202 -0
- data/lib/openai/models/live/decision_item_delete_event.rb +38 -0
- data/lib/openai/models/live/decision_item_deleted_event.rb +46 -0
- data/lib/openai/models/live/decision_trigger.rb +244 -0
- data/lib/openai/models/live/decisions_delegation_config.rb +201 -0
- data/lib/openai/models/live/decisions_delegation_update_config.rb +208 -0
- data/lib/openai/models/live/delegation_created_event.rb +10 -10
- data/lib/openai/models/live/fork_client_event.rb +14 -2
- data/lib/openai/models/live/fork_server_event.rb +17 -2
- data/lib/openai/models/live/media_session_config.rb +47 -11
- data/lib/openai/models/live/output_audio_fixture_play_event.rb +48 -0
- data/lib/openai/models/live/output_audio_fixture_played_event.rb +42 -0
- data/lib/openai/models/live/output_audio_fixture_playing_event.rb +41 -0
- data/lib/openai/models/live/server_event.rb +17 -2
- data/lib/openai/models/live/session_accept_params.rb +47 -11
- data/lib/openai/models/live/session_config.rb +47 -11
- data/lib/openai/models/live/session_resource.rb +47 -11
- data/lib/openai/models/live/session_update_config.rb +38 -6
- data/lib/openai/models/live/session_update_event.rb +8 -8
- data/lib/openai/models/live/sideband_client_event.rb +57 -0
- data/lib/openai/models/live/sideband_server_event.rb +78 -0
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +6 -3
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +6 -3
- data/lib/openai/models/realtime/realtime_response_status.rb +10 -1
- data/lib/openai/models/response_format_json_schema.rb +1 -1
- data/lib/openai/models/responses/function_tool.rb +8 -6
- data/lib/openai/models/responses/response.rb +2 -23
- data/lib/openai/models/responses/response_compact_params.rb +21 -0
- data/lib/openai/models/responses/response_create_params.rb +3 -6
- data/lib/openai/models/responses/response_error.rb +19 -1
- data/lib/openai/models/responses/response_format_text_config.rb +0 -4
- data/lib/openai/models/responses/response_function_tool_call.rb +0 -8
- data/lib/openai/models/responses/response_input_item.rb +107 -1
- data/lib/openai/models/responses/response_item.rb +107 -1
- data/lib/openai/models/responses/response_output_item.rb +107 -1
- data/lib/openai/models/responses/response_output_text.rb +0 -8
- data/lib/openai/models/responses/responses_client_event.rb +2 -2
- data/lib/openai/models/safety/safety_alert.rb +12 -1
- data/lib/openai/models/video_create_error.rb +19 -1
- data/lib/openai/models/webhooks/agent_environment_expired_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/agent_environment_suspended_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +8 -3
- data/lib/openai/models/webhooks/webhook_create_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_endpoint_with_secret.rb +0 -9
- data/lib/openai/models/webhooks/webhook_test_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +2 -0
- data/lib/openai/resources/admin/organization/external_storage.rb +1 -1
- data/lib/openai/resources/admin/organization/projects/api_keys.rb +61 -0
- data/lib/openai/resources/admin/organization/usage.rb +67 -0
- data/lib/openai/resources/audio/speech.rb +2 -1
- data/lib/openai/resources/audio/voices.rb +10 -10
- data/lib/openai/resources/beta/agents/environments/files.rb +3 -31
- data/lib/openai/resources/beta/agents/environments.rb +3 -3
- data/lib/openai/resources/beta/agents/sessions/artifacts.rb +5 -11
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions.rb +20 -56
- data/lib/openai/resources/beta/agents/vaults/credentials.rb +10 -6
- data/lib/openai/resources/beta/agents/vaults.rb +45 -6
- data/lib/openai/resources/beta/agents.rb +6 -4
- data/lib/openai/resources/beta/responses.rb +2 -2
- data/lib/openai/resources/chat/completions.rb +11 -37
- data/lib/openai/resources/decisions.rb +9 -15
- data/lib/openai/resources/files.rb +0 -39
- data/lib/openai/resources/live/forks.rb +19 -0
- data/lib/openai/resources/live/sideband.rb +19 -0
- data/lib/openai/resources/live.rb +19 -0
- data/lib/openai/resources/realtime/translations.rb +19 -0
- data/lib/openai/resources/realtime.rb +19 -0
- data/lib/openai/resources/responses.rb +44 -95
- data/lib/openai/resources/vector_stores/file_batches.rb +0 -178
- data/lib/openai/resources/vector_stores/files.rb +0 -188
- data/lib/openai/resources/webhooks.rb +13 -29
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +35 -0
- data/rbi/openai/client.rbi +0 -103
- data/rbi/openai/helpers/admin/organization/projects/api_keys.rbi +25 -0
- data/rbi/openai/helpers/beta/agents/artifacts.rbi +25 -0
- data/rbi/openai/helpers/beta/agents/files.rbi +48 -0
- data/rbi/openai/helpers/client_runtime.rbi +108 -0
- data/rbi/openai/helpers/files.rbi +25 -0
- data/rbi/openai/helpers/models/chat/parsed.rbi +21 -0
- data/rbi/openai/helpers/models/responses/parsed.rbi +19 -0
- data/rbi/openai/helpers/models/responses/response.rbi +15 -0
- data/rbi/openai/helpers/streaming/response_stream.rbi +301 -0
- data/rbi/openai/helpers/vector_stores/file_batches.rbi +102 -0
- data/rbi/openai/helpers/vector_stores/files.rbi +122 -0
- data/rbi/openai/helpers/websocket.rbi +82 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +6 -3
- data/rbi/openai/models/admin/organization/external_storage_configuration.rbi +4 -2
- data/rbi/openai/models/admin/organization/external_storage_create_params.rbi +63 -4
- data/rbi/openai/models/admin/organization/oci_external_storage_provider.rbi +71 -0
- data/rbi/openai/models/admin/organization/project_residency.rbi +12 -0
- data/rbi/openai/models/admin/organization/projects/api_key_update_params.rbi +110 -0
- data/rbi/openai/models/admin/organization/projects/api_key_update_scopes_params.rbi +72 -0
- data/rbi/openai/models/admin/organization/usage_decisions_params.rbi +229 -0
- data/rbi/openai/models/admin/organization/usage_decisions_response.rbi +479 -0
- data/rbi/openai/models/audio/speech_create_params.rbi +6 -3
- data/rbi/openai/models/audio/voice.rbi +21 -2
- data/rbi/openai/models/audio/voice_create_params.rbi +149 -4
- data/rbi/openai/models/beta/agent_create_params.rbi +4 -2
- data/rbi/openai/models/beta/agent_list_params.rbi +8 -5
- data/rbi/openai/models/beta/agent_session.rbi +64 -1
- data/rbi/openai/models/beta/agent_session_environment_expired_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_environment_state.rbi +6 -0
- data/rbi/openai/models/beta/agent_session_environment_suspended_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_event.rbi +2 -0
- data/rbi/openai/models/beta/agent_update_params.rbi +4 -2
- data/rbi/openai/models/beta/agents/environment_info.rbi +3 -0
- data/rbi/openai/models/beta/agents/environment_list_params.rbi +7 -7
- data/rbi/openai/models/beta/agents/session_create_params.rbi +62 -2
- data/rbi/openai/models/beta/agents/session_list_params.rbi +11 -11
- data/rbi/openai/models/beta/agents/session_update_params.rbi +56 -0
- data/rbi/openai/models/beta/agents/sessions/artifact_list_params.rbi +19 -13
- data/rbi/openai/models/beta/agents/vault_list_params.rbi +30 -13
- data/rbi/openai/models/beta/agents/vault_status_filter.rbi +1 -3
- data/rbi/openai/models/beta/agents/vault_update_params.rbi +87 -0
- data/rbi/openai/models/beta/agents/vaults/credential_list_params.rbi +30 -13
- data/rbi/openai/models/beta/beta_response.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_error.rbi +24 -3
- data/rbi/openai/models/beta/beta_response_input_item.rbi +191 -0
- data/rbi/openai/models/beta/beta_response_item.rbi +189 -0
- data/rbi/openai/models/beta/beta_response_output_item.rbi +191 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +2 -2
- data/rbi/openai/models/beta/response_create_params.rbi +2 -2
- data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +3 -3
- data/rbi/openai/models/chat/chat_completion_message.rbi +0 -4
- data/rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi +0 -4
- data/rbi/openai/models/chat/completion_create_params.rbi +63 -78
- data/rbi/openai/models/conversations/conversation_item.rbi +191 -0
- data/rbi/openai/models/decision.rbi +14 -1
- data/rbi/openai/models/decision_create_params.rbi +23 -12
- data/rbi/openai/models/decision_input_image.rbi +4 -3
- data/rbi/openai/models/decision_input_message.rbi +4 -4
- data/rbi/openai/models/decision_input_part.rbi +2 -1
- data/rbi/openai/models/image_edit_completed_event.rbi +1 -0
- data/rbi/openai/models/image_edit_partial_image_event.rbi +1 -0
- data/rbi/openai/models/image_gen_completed_event.rbi +1 -0
- data/rbi/openai/models/image_gen_partial_image_event.rbi +1 -0
- data/rbi/openai/models/images_response.rbi +1 -0
- data/rbi/openai/models/live/built_in_voice.rbi +1 -0
- data/rbi/openai/models/live/client_event.rbi +4 -0
- data/rbi/openai/models/live/decision_create_event.rbi +55 -0
- data/rbi/openai/models/live/decision_event.rbi +185 -0
- data/rbi/openai/models/live/decision_item_create_event.rbi +338 -0
- data/rbi/openai/models/live/decision_item_created_event.rbi +354 -0
- data/rbi/openai/models/live/decision_item_delete_event.rbi +66 -0
- data/rbi/openai/models/live/decision_item_deleted_event.rbi +77 -0
- data/rbi/openai/models/live/decision_trigger.rbi +465 -0
- data/rbi/openai/models/live/decisions_delegation_config.rbi +393 -0
- data/rbi/openai/models/live/decisions_delegation_update_config.rbi +412 -0
- data/rbi/openai/models/live/delegation_created_event.rbi +8 -10
- data/rbi/openai/models/live/fork_client_event.rbi +4 -0
- data/rbi/openai/models/live/fork_server_event.rbi +5 -0
- data/rbi/openai/models/live/media_session_config.rbi +95 -14
- data/rbi/openai/models/live/output_audio_fixture_play_event.rbi +76 -0
- data/rbi/openai/models/live/output_audio_fixture_played_event.rbi +73 -0
- data/rbi/openai/models/live/output_audio_fixture_playing_event.rbi +72 -0
- data/rbi/openai/models/live/server_event.rbi +5 -0
- data/rbi/openai/models/live/session_accept_params.rbi +88 -12
- data/rbi/openai/models/live/session_config.rbi +100 -14
- data/rbi/openai/models/live/session_resource.rbi +81 -10
- data/rbi/openai/models/live/session_update_config.rbi +86 -9
- data/rbi/openai/models/live/session_update_event.rbi +8 -8
- data/rbi/openai/models/live/sideband_client_event.rbi +40 -0
- data/rbi/openai/models/live/sideband_server_event.rbi +47 -0
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +6 -3
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +6 -3
- data/rbi/openai/models/realtime/realtime_response_status.rbi +13 -1
- data/rbi/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbi +1 -1
- data/rbi/openai/models/realtime/realtime_translation_output_audio_delta_event.rbi +3 -3
- data/rbi/openai/models/realtime/realtime_translation_session_close_event.rbi +1 -1
- data/rbi/openai/models/realtime/realtime_translation_session_update_event.rbi +5 -1
- data/rbi/openai/models/responses/response.rbi +2 -7
- data/rbi/openai/models/responses/response_create_params.rbi +5 -9
- data/rbi/openai/models/responses/response_error.rbi +24 -3
- data/rbi/openai/models/responses/response_function_tool_call.rbi +0 -4
- data/rbi/openai/models/responses/response_function_web_search.rbi +21 -17
- data/rbi/openai/models/responses/response_input_item.rbi +191 -0
- data/rbi/openai/models/responses/response_item.rbi +189 -0
- data/rbi/openai/models/responses/response_output_item.rbi +191 -0
- data/rbi/openai/models/responses/response_output_text.rbi +0 -4
- data/rbi/openai/models/responses/responses_client_event.rbi +2 -2
- data/rbi/openai/models/safety/safety_alert.rbi +13 -1
- data/rbi/openai/models/video_create_error.rbi +24 -3
- data/rbi/openai/models/webhooks/agent_environment_expired_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/agent_environment_suspended_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +3 -2
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +8 -0
- data/rbi/openai/resources/admin/organization/external_storage.rbi +2 -1
- data/rbi/openai/resources/admin/organization/projects/api_keys.rbi +48 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +56 -0
- data/rbi/openai/resources/audio/speech.rbi +2 -1
- data/rbi/openai/resources/audio/voices.rbi +13 -10
- data/rbi/openai/resources/beta/agents/environments/files.rbi +3 -33
- data/rbi/openai/resources/beta/agents/environments.rbi +3 -3
- data/rbi/openai/resources/beta/agents/sessions/artifacts.rbi +5 -13
- data/rbi/openai/resources/beta/agents/sessions.rbi +15 -4
- data/rbi/openai/resources/beta/agents/vaults/credentials.rbi +9 -5
- data/rbi/openai/resources/beta/agents/vaults.rbi +34 -5
- data/rbi/openai/resources/beta/agents.rbi +6 -4
- data/rbi/openai/resources/beta/responses.rbi +2 -2
- data/rbi/openai/resources/chat/completions.rbi +26 -29
- data/rbi/openai/resources/decisions.rbi +9 -15
- data/rbi/openai/resources/files.rbi +0 -18
- data/rbi/openai/resources/live/forks.rbi +17 -0
- data/rbi/openai/resources/live/sideband.rbi +17 -0
- data/rbi/openai/resources/live.rbi +17 -0
- data/rbi/openai/resources/realtime/translations.rbi +17 -0
- data/rbi/openai/resources/realtime.rbi +17 -0
- data/rbi/openai/resources/responses.rbi +41 -333
- data/rbi/openai/resources/vector_stores/file_batches.rbi +0 -93
- data/rbi/openai/resources/vector_stores/files.rbi +0 -113
- data/rbi/openai/resources/webhooks.rbi +2 -0
- data/sig/openai/client.rbs +0 -50
- data/sig/openai/helpers/admin/organization/projects/api_keys.rbs +18 -0
- data/sig/openai/helpers/beta/agents/artifacts.rbs +17 -0
- data/sig/openai/helpers/beta/agents/files.rbs +30 -0
- data/sig/openai/helpers/client_runtime.rbs +53 -0
- data/sig/openai/helpers/files.rbs +12 -0
- data/sig/openai/helpers/models/responses/response.rbs +9 -0
- data/sig/openai/helpers/streaming/response_stream.rbs +37 -0
- data/sig/openai/helpers/vector_stores/file_batches.rbs +38 -0
- data/sig/openai/helpers/vector_stores/files.rbs +43 -0
- data/sig/openai/helpers/websocket.rbs +40 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +1 -0
- data/sig/openai/models/admin/organization/external_storage_configuration.rbs +1 -0
- data/sig/openai/models/admin/organization/external_storage_create_params.rbs +33 -0
- data/sig/openai/models/admin/organization/oci_external_storage_provider.rbs +34 -0
- data/sig/openai/models/admin/organization/project_residency.rbs +6 -0
- data/sig/openai/models/admin/organization/projects/api_key_update_params.rbs +77 -0
- data/sig/openai/models/admin/organization/projects/api_key_update_scopes_params.rbs +38 -0
- data/sig/openai/models/admin/organization/usage_decisions_params.rbs +170 -0
- data/sig/openai/models/admin/organization/usage_decisions_response.rbs +319 -0
- data/sig/openai/models/audio/speech_create_params.rbs +4 -2
- data/sig/openai/models/audio/voice.rbs +21 -3
- data/sig/openai/models/audio/voice_create_params.rbs +90 -1
- data/sig/openai/models/beta/agent_create_params.rbs +4 -2
- data/sig/openai/models/beta/agent_list_params.rbs +9 -6
- data/sig/openai/models/beta/agent_session.rbs +36 -2
- data/sig/openai/models/beta/agent_session_environment_expired_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_environment_state.rbs +14 -1
- data/sig/openai/models/beta/agent_session_environment_suspended_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_event.rbs +2 -0
- data/sig/openai/models/beta/agent_update_params.rbs +4 -2
- data/sig/openai/models/beta/agents/environment_info.rbs +11 -1
- data/sig/openai/models/beta/agents/environment_list_params.rbs +9 -9
- data/sig/openai/models/beta/agents/session_create_params.rbs +29 -2
- data/sig/openai/models/beta/agents/session_list_params.rbs +12 -12
- data/sig/openai/models/beta/agents/session_update_params.rbs +23 -0
- data/sig/openai/models/beta/agents/sessions/artifact_list_params.rbs +21 -15
- data/sig/openai/models/beta/agents/vault_list_params.rbs +32 -14
- data/sig/openai/models/beta/agents/vault_update_params.rbs +54 -0
- data/sig/openai/models/beta/agents/vaults/credential_list_params.rbs +32 -14
- data/sig/openai/models/beta/beta_response.rbs +2 -2
- data/sig/openai/models/beta/beta_response_error.rbs +19 -3
- data/sig/openai/models/beta/beta_response_input_item.rbs +110 -0
- data/sig/openai/models/beta/beta_response_item.rbs +110 -0
- data/sig/openai/models/beta/beta_response_output_item.rbs +110 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +2 -2
- data/sig/openai/models/beta/response_create_params.rbs +2 -2
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +2 -2
- data/sig/openai/models/chat/completion_create_params.rbs +2 -2
- data/sig/openai/models/conversations/conversation_item.rbs +110 -0
- data/sig/openai/models/decision.rbs +13 -0
- data/sig/openai/models/decision_create_params.rbs +19 -8
- data/sig/openai/models/decision_input_image.rbs +2 -2
- data/sig/openai/models/decision_input_message.rbs +2 -2
- data/sig/openai/models/live/built_in_voice.rbs +2 -0
- data/sig/openai/models/live/client_event.rbs +4 -0
- data/sig/openai/models/live/decision_create_event.rbs +18 -0
- data/sig/openai/models/live/decision_event.rbs +102 -0
- data/sig/openai/models/live/decision_item_create_event.rbs +183 -0
- data/sig/openai/models/live/decision_item_created_event.rbs +195 -0
- data/sig/openai/models/live/decision_item_delete_event.rbs +33 -0
- data/sig/openai/models/live/decision_item_deleted_event.rbs +49 -0
- data/sig/openai/models/live/decision_trigger.rbs +234 -0
- data/sig/openai/models/live/decisions_delegation_config.rbs +195 -0
- data/sig/openai/models/live/decisions_delegation_update_config.rbs +202 -0
- data/sig/openai/models/live/delegation_created_event.rbs +6 -7
- data/sig/openai/models/live/fork_client_event.rbs +4 -0
- data/sig/openai/models/live/fork_server_event.rbs +5 -0
- data/sig/openai/models/live/media_session_config.rbs +58 -11
- data/sig/openai/models/live/output_audio_fixture_play_event.rbs +42 -0
- data/sig/openai/models/live/output_audio_fixture_played_event.rbs +44 -0
- data/sig/openai/models/live/output_audio_fixture_playing_event.rbs +44 -0
- data/sig/openai/models/live/server_event.rbs +5 -0
- data/sig/openai/models/live/session_accept_params.rbs +57 -10
- data/sig/openai/models/live/session_config.rbs +58 -11
- data/sig/openai/models/live/session_resource.rbs +57 -10
- data/sig/openai/models/live/session_update_config.rbs +54 -3
- data/sig/openai/models/live/session_update_event.rbs +6 -6
- data/sig/openai/models/live/sideband_client_event.rbs +26 -0
- data/sig/openai/models/live/sideband_server_event.rbs +33 -0
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +6 -3
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +6 -3
- data/sig/openai/models/realtime/realtime_response_status.rbs +15 -3
- data/sig/openai/models/responses/response.rbs +2 -4
- data/sig/openai/models/responses/response_create_params.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +19 -3
- data/sig/openai/models/responses/response_input_item.rbs +110 -0
- data/sig/openai/models/responses/response_item.rbs +110 -0
- data/sig/openai/models/responses/response_output_item.rbs +110 -0
- data/sig/openai/models/responses/responses_client_event.rbs +2 -2
- data/sig/openai/models/safety/safety_alert.rbs +12 -2
- data/sig/openai/models/video_create_error.rbs +19 -3
- data/sig/openai/models/webhooks/agent_environment_expired_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/agent_environment_suspended_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +3 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +4 -0
- data/sig/openai/resources/admin/organization/projects/api_keys.rbs +8 -0
- data/sig/openai/resources/admin/organization/usage.rbs +15 -0
- data/sig/openai/resources/beta/agents/environments/files.rbs +0 -17
- data/sig/openai/resources/beta/agents/sessions/artifacts.rbs +2 -6
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -1
- data/sig/openai/resources/beta/agents/vaults/credentials.rbs +2 -1
- data/sig/openai/resources/beta/agents/vaults.rbs +9 -1
- data/sig/openai/resources/beta/agents.rbs +1 -1
- data/sig/openai/resources/files.rbs +0 -7
- data/sig/openai/resources/live/forks.rbs +8 -0
- data/sig/openai/resources/live/sideband.rbs +8 -0
- data/sig/openai/resources/live.rbs +7 -0
- data/sig/openai/resources/realtime/translations.rbs +7 -0
- data/sig/openai/resources/realtime.rbs +7 -0
- data/sig/openai/resources/responses.rbs +7 -31
- data/sig/openai/resources/vector_stores/file_batches.rbs +0 -31
- data/sig/openai/resources/vector_stores/files.rbs +0 -36
- data/sig/openai/resources/webhooks.rbs +3 -1
- metadata +101 -1
|
@@ -12,7 +12,8 @@ module OpenAI
|
|
|
12
12
|
?delegation: OpenAI::Models::Live::SessionResource::delegation?,
|
|
13
13
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
14
14
|
?instructions: String?,
|
|
15
|
-
?store: bool
|
|
15
|
+
?store: bool,
|
|
16
|
+
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
class SessionResource < OpenAI::Internal::Type::BaseModel
|
|
@@ -53,17 +54,18 @@ module OpenAI
|
|
|
53
54
|
def client=: (OpenAI::Live::ClientConfig) -> OpenAI::Live::ClientConfig
|
|
54
55
|
|
|
55
56
|
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
56
|
-
# application; use `responses`
|
|
57
|
+
# application; use `responses` or `decisions` to delegate to the corresponding
|
|
58
|
+
# API.
|
|
57
59
|
attr_accessor delegation: OpenAI::Models::Live::SessionResource::delegation?
|
|
58
60
|
|
|
59
61
|
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
60
|
-
# assistant messages with one text part each; at most 128 messages and
|
|
61
|
-
# rendered
|
|
62
|
+
# assistant messages with one text part each; at most 128 messages and a
|
|
63
|
+
# configured rendered-token limit (8,192 by default).
|
|
62
64
|
attr_reader input: ::Array[OpenAI::Models::Live::initial_item]?
|
|
63
65
|
|
|
64
66
|
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
65
|
-
# assistant messages with one text part each; at most 128 messages and
|
|
66
|
-
# rendered
|
|
67
|
+
# assistant messages with one text part each; at most 128 messages and a
|
|
68
|
+
# configured rendered-token limit (8,192 by default).
|
|
67
69
|
def input=: (
|
|
68
70
|
::Array[OpenAI::Models::Live::initial_item]
|
|
69
71
|
) -> ::Array[OpenAI::Models::Live::initial_item]
|
|
@@ -85,6 +87,20 @@ module OpenAI
|
|
|
85
87
|
# to false for new sessions.
|
|
86
88
|
def store=: (bool) -> bool
|
|
87
89
|
|
|
90
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
91
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
92
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
93
|
+
# triggers.
|
|
94
|
+
attr_reader triggers: ::Array[OpenAI::Live::DecisionTrigger]?
|
|
95
|
+
|
|
96
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
97
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
98
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
99
|
+
# triggers.
|
|
100
|
+
def triggers=: (
|
|
101
|
+
::Array[OpenAI::Live::DecisionTrigger]
|
|
102
|
+
) -> ::Array[OpenAI::Live::DecisionTrigger]
|
|
103
|
+
|
|
88
104
|
# @param id
|
|
89
105
|
# The unique ID of the Live session. Use this ID for sideband connections,
|
|
90
106
|
# forking, and recording download.
|
|
@@ -102,11 +118,12 @@ module OpenAI
|
|
|
102
118
|
# session. Trusted sideband connections are unaffected.
|
|
103
119
|
# @param delegation
|
|
104
120
|
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
105
|
-
# application; use `responses`
|
|
121
|
+
# application; use `responses` or `decisions` to delegate to the corresponding
|
|
122
|
+
# API.
|
|
106
123
|
# @param input
|
|
107
124
|
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
108
|
-
# assistant messages with one text part each; at most 128 messages and
|
|
109
|
-
# rendered
|
|
125
|
+
# assistant messages with one text part each; at most 128 messages and a
|
|
126
|
+
# configured rendered-token limit (8,192 by default).
|
|
110
127
|
# @param instructions
|
|
111
128
|
# Frontend instructions for voice, conversation, interruptions, and when to
|
|
112
129
|
# delegate. Start with the
|
|
@@ -118,6 +135,11 @@ module OpenAI
|
|
|
118
135
|
# @param store
|
|
119
136
|
# Whether to store the session for later forking and recording download. Defaults
|
|
120
137
|
# to false for new sessions.
|
|
138
|
+
# @param triggers
|
|
139
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
140
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
141
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
142
|
+
# triggers.
|
|
121
143
|
# @param status
|
|
122
144
|
# The status of the session snapshot. Always `active`, including the final
|
|
123
145
|
# snapshot in session.closed; use the event type to determine that the session has
|
|
@@ -132,6 +154,7 @@ module OpenAI
|
|
|
132
154
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
133
155
|
?instructions: String?,
|
|
134
156
|
?store: bool,
|
|
157
|
+
?triggers: ::Array[OpenAI::Live::DecisionTrigger],
|
|
135
158
|
?status: :active
|
|
136
159
|
) -> void
|
|
137
160
|
|
|
@@ -145,7 +168,8 @@ module OpenAI
|
|
|
145
168
|
?delegation: OpenAI::Models::Live::SessionResource::delegation?,
|
|
146
169
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
147
170
|
?instructions: String?,
|
|
148
|
-
?store: bool
|
|
171
|
+
?store: bool,
|
|
172
|
+
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
149
173
|
}
|
|
150
174
|
|
|
151
175
|
type model = String | :"gpt-live-1"
|
|
@@ -241,6 +265,7 @@ module OpenAI
|
|
|
241
265
|
type delegation =
|
|
242
266
|
OpenAI::Live::ClientDelegation
|
|
243
267
|
| OpenAI::Live::SessionResource::Delegation::Responses
|
|
268
|
+
| OpenAI::Live::SessionResource::Delegation::Decisions
|
|
244
269
|
|
|
245
270
|
module Delegation
|
|
246
271
|
extend OpenAI::Internal::Type::Union
|
|
@@ -275,6 +300,28 @@ module OpenAI
|
|
|
275
300
|
}
|
|
276
301
|
end
|
|
277
302
|
|
|
303
|
+
type decisions =
|
|
304
|
+
{
|
|
305
|
+
decisions: OpenAI::Live::DecisionsDelegationConfig,
|
|
306
|
+
?type: :decisions
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
class Decisions < OpenAI::Internal::Type::BaseModel
|
|
310
|
+
attr_accessor decisions: OpenAI::Live::DecisionsDelegationConfig
|
|
311
|
+
|
|
312
|
+
attr_accessor type: :decisions
|
|
313
|
+
|
|
314
|
+
def initialize: (
|
|
315
|
+
decisions: OpenAI::Live::DecisionsDelegationConfig,
|
|
316
|
+
?type: :decisions
|
|
317
|
+
) -> void
|
|
318
|
+
|
|
319
|
+
def to_hash: -> {
|
|
320
|
+
decisions: OpenAI::Live::DecisionsDelegationConfig,
|
|
321
|
+
?type: :decisions
|
|
322
|
+
}
|
|
323
|
+
end
|
|
324
|
+
|
|
278
325
|
def self?.variants: -> ::Array[OpenAI::Models::Live::SessionResource::delegation]
|
|
279
326
|
end
|
|
280
327
|
end
|
|
@@ -2,27 +2,52 @@ module OpenAI
|
|
|
2
2
|
module Models
|
|
3
3
|
module Live
|
|
4
4
|
type session_update_config =
|
|
5
|
-
{
|
|
5
|
+
{
|
|
6
|
+
?delegation: OpenAI::Models::Live::SessionUpdateConfig::delegation?,
|
|
7
|
+
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
8
|
+
}
|
|
6
9
|
|
|
7
10
|
class SessionUpdateConfig < OpenAI::Internal::Type::BaseModel
|
|
8
11
|
# Delegation settings to update. The delegation type must match the current
|
|
9
12
|
# session; omitted settings retain their values.
|
|
10
13
|
attr_accessor delegation: OpenAI::Models::Live::SessionUpdateConfig::delegation?
|
|
11
14
|
|
|
15
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
16
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
17
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
18
|
+
# triggers.
|
|
19
|
+
attr_reader triggers: ::Array[OpenAI::Live::DecisionTrigger]?
|
|
20
|
+
|
|
21
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
22
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
23
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
24
|
+
# triggers.
|
|
25
|
+
def triggers=: (
|
|
26
|
+
::Array[OpenAI::Live::DecisionTrigger]
|
|
27
|
+
) -> ::Array[OpenAI::Live::DecisionTrigger]
|
|
28
|
+
|
|
12
29
|
# @param delegation
|
|
13
30
|
# Delegation settings to update. The delegation type must match the current
|
|
14
31
|
# session; omitted settings retain their values.
|
|
32
|
+
# @param triggers
|
|
33
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
34
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
35
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
36
|
+
# triggers.
|
|
15
37
|
def initialize: (
|
|
16
|
-
?delegation: OpenAI::Models::Live::SessionUpdateConfig::delegation
|
|
38
|
+
?delegation: OpenAI::Models::Live::SessionUpdateConfig::delegation?,
|
|
39
|
+
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
17
40
|
) -> void
|
|
18
41
|
|
|
19
42
|
def to_hash: -> {
|
|
20
|
-
?delegation: OpenAI::Models::Live::SessionUpdateConfig::delegation
|
|
43
|
+
?delegation: OpenAI::Models::Live::SessionUpdateConfig::delegation?,
|
|
44
|
+
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
21
45
|
}
|
|
22
46
|
|
|
23
47
|
type delegation =
|
|
24
48
|
OpenAI::Live::ClientDelegation
|
|
25
49
|
| OpenAI::Live::SessionUpdateConfig::Delegation::Responses
|
|
50
|
+
| OpenAI::Live::SessionUpdateConfig::Delegation::Decisions
|
|
26
51
|
|
|
27
52
|
module Delegation
|
|
28
53
|
extend OpenAI::Internal::Type::Union
|
|
@@ -63,6 +88,32 @@ module OpenAI
|
|
|
63
88
|
}
|
|
64
89
|
end
|
|
65
90
|
|
|
91
|
+
type decisions =
|
|
92
|
+
{
|
|
93
|
+
?type: :decisions,
|
|
94
|
+
?decisions: OpenAI::Live::DecisionsDelegationUpdateConfig
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
class Decisions < OpenAI::Internal::Type::BaseModel
|
|
98
|
+
attr_accessor type: :decisions
|
|
99
|
+
|
|
100
|
+
attr_reader decisions: OpenAI::Live::DecisionsDelegationUpdateConfig?
|
|
101
|
+
|
|
102
|
+
def decisions=: (
|
|
103
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig
|
|
104
|
+
) -> OpenAI::Live::DecisionsDelegationUpdateConfig
|
|
105
|
+
|
|
106
|
+
def initialize: (
|
|
107
|
+
?decisions: OpenAI::Live::DecisionsDelegationUpdateConfig,
|
|
108
|
+
?type: :decisions
|
|
109
|
+
) -> void
|
|
110
|
+
|
|
111
|
+
def to_hash: -> {
|
|
112
|
+
?type: :decisions,
|
|
113
|
+
?decisions: OpenAI::Live::DecisionsDelegationUpdateConfig
|
|
114
|
+
}
|
|
115
|
+
end
|
|
116
|
+
|
|
66
117
|
def self?.variants: -> ::Array[OpenAI::Models::Live::SessionUpdateConfig::delegation]
|
|
67
118
|
end
|
|
68
119
|
end
|
|
@@ -9,9 +9,9 @@ module OpenAI
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class SessionUpdateEvent < OpenAI::Internal::Type::BaseModel
|
|
12
|
-
# Sparse delegation updates. Omitted settings retain their values. The
|
|
13
|
-
# type cannot change,
|
|
14
|
-
#
|
|
12
|
+
# Sparse delegation and trigger updates. Omitted settings retain their values. The
|
|
13
|
+
# delegation type cannot change. Model, frontend instructions, audio, and startup
|
|
14
|
+
# input are immutable.
|
|
15
15
|
attr_accessor session: OpenAI::Live::SessionUpdateConfig
|
|
16
16
|
|
|
17
17
|
# The Live client event type. Always `session.update`.
|
|
@@ -22,9 +22,9 @@ module OpenAI
|
|
|
22
22
|
attr_accessor event_id: String?
|
|
23
23
|
|
|
24
24
|
# @param session
|
|
25
|
-
# Sparse delegation updates. Omitted settings retain their values. The
|
|
26
|
-
# type cannot change,
|
|
27
|
-
#
|
|
25
|
+
# Sparse delegation and trigger updates. Omitted settings retain their values. The
|
|
26
|
+
# delegation type cannot change. Model, frontend instructions, audio, and startup
|
|
27
|
+
# input are immutable.
|
|
28
28
|
# @param event_id
|
|
29
29
|
# Optional client identifier for correlating this command with a server event's
|
|
30
30
|
# client_event_id or error.client_event_id.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Live
|
|
4
|
+
type sideband_client_event =
|
|
5
|
+
OpenAI::Live::SessionUpdateEvent
|
|
6
|
+
| OpenAI::Live::InputAudioMuteEvent
|
|
7
|
+
| OpenAI::Live::InputAudioUnmuteEvent
|
|
8
|
+
| OpenAI::Live::OutputAudioFixturePlayEvent
|
|
9
|
+
| OpenAI::Live::InstructionsAppendEvent
|
|
10
|
+
| OpenAI::Live::ThinkingAppendEvent
|
|
11
|
+
| OpenAI::Live::CommentaryAppendEvent
|
|
12
|
+
| OpenAI::Live::DecisionCreateEvent
|
|
13
|
+
| OpenAI::Live::DecisionItemCreateEvent
|
|
14
|
+
| OpenAI::Live::DecisionItemDeleteEvent
|
|
15
|
+
| OpenAI::Live::ResponseItemCreateEvent
|
|
16
|
+
| OpenAI::Live::ResponseCreateEvent
|
|
17
|
+
| OpenAI::Live::SessionCloseEvent
|
|
18
|
+
|
|
19
|
+
module SidebandClientEvent
|
|
20
|
+
extend OpenAI::Internal::Type::Union
|
|
21
|
+
|
|
22
|
+
def self?.variants: -> ::Array[OpenAI::Models::Live::sideband_client_event]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Live
|
|
4
|
+
type sideband_server_event =
|
|
5
|
+
OpenAI::Live::SessionStartedEvent
|
|
6
|
+
| OpenAI::Live::SessionUpdatedEvent
|
|
7
|
+
| OpenAI::Live::InputAudioMutedEvent
|
|
8
|
+
| OpenAI::Live::InputAudioUnmutedEvent
|
|
9
|
+
| OpenAI::Live::OutputAudioFixturePlayingEvent
|
|
10
|
+
| OpenAI::Live::OutputAudioFixturePlayedEvent
|
|
11
|
+
| OpenAI::Live::InstructionsAppendedEvent
|
|
12
|
+
| OpenAI::Live::ThinkingAppendedEvent
|
|
13
|
+
| OpenAI::Live::CommentaryAppendedEvent
|
|
14
|
+
| OpenAI::Live::InputTranscriptDeltaEvent
|
|
15
|
+
| OpenAI::Live::OutputTranscriptDeltaEvent
|
|
16
|
+
| OpenAI::Live::DelegationCreatedEvent
|
|
17
|
+
| OpenAI::Live::DecisionEvent
|
|
18
|
+
| OpenAI::Live::DecisionItemCreatedEvent
|
|
19
|
+
| OpenAI::Live::DecisionItemDeletedEvent
|
|
20
|
+
| OpenAI::Live::ResponseEvent
|
|
21
|
+
| OpenAI::Live::SessionUsageUpdatedEvent
|
|
22
|
+
| OpenAI::Live::SessionClosedEvent
|
|
23
|
+
| OpenAI::Live::ErrorEvent
|
|
24
|
+
| OpenAI::Live::InfoEvent
|
|
25
|
+
|
|
26
|
+
module SidebandServerEvent
|
|
27
|
+
extend OpenAI::Internal::Type::Union
|
|
28
|
+
|
|
29
|
+
def self?.variants: -> ::Array[OpenAI::Models::Live::sideband_server_event]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -40,7 +40,8 @@ module OpenAI
|
|
|
40
40
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
41
41
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
42
42
|
# model has responded with audio at least once. Custom voices must be created from
|
|
43
|
-
# audio samples.
|
|
43
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
44
|
+
# recommend `marin` and `cedar` for best quality.
|
|
44
45
|
attr_reader voice: OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice?
|
|
45
46
|
|
|
46
47
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
@@ -48,7 +49,8 @@ module OpenAI
|
|
|
48
49
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
49
50
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
50
51
|
# model has responded with audio at least once. Custom voices must be created from
|
|
51
|
-
# audio samples.
|
|
52
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
53
|
+
# recommend `marin` and `cedar` for best quality.
|
|
52
54
|
def voice=: (
|
|
53
55
|
OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
|
|
54
56
|
) -> OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
|
|
@@ -69,7 +71,8 @@ module OpenAI
|
|
|
69
71
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
70
72
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
71
73
|
# model has responded with audio at least once. Custom voices must be created from
|
|
72
|
-
# audio samples.
|
|
74
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
75
|
+
# recommend `marin` and `cedar` for best quality.
|
|
73
76
|
def initialize: (
|
|
74
77
|
?format_: OpenAI::Models::Realtime::realtime_audio_formats,
|
|
75
78
|
?speed: Float,
|
|
@@ -39,7 +39,8 @@ module OpenAI
|
|
|
39
39
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
40
40
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
41
41
|
# model has responded with audio at least once. Custom voices must be created from
|
|
42
|
-
# audio samples.
|
|
42
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
43
|
+
# recommend `marin` and `cedar` for best quality.
|
|
43
44
|
attr_reader voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice?
|
|
44
45
|
|
|
45
46
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
@@ -47,7 +48,8 @@ module OpenAI
|
|
|
47
48
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
48
49
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
49
50
|
# model has responded with audio at least once. Custom voices must be created from
|
|
50
|
-
# audio samples.
|
|
51
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
52
|
+
# recommend `marin` and `cedar` for best quality.
|
|
51
53
|
def voice=: (
|
|
52
54
|
OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
|
|
53
55
|
) -> OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
|
|
@@ -60,7 +62,8 @@ module OpenAI
|
|
|
60
62
|
# `cedar`. You may also provide a custom voice object with an `id`, for example
|
|
61
63
|
# `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
|
|
62
64
|
# model has responded with audio at least once. Custom voices must be created from
|
|
63
|
-
# audio samples.
|
|
65
|
+
# audio samples. Voices created from text prompts are supported only in Live. We
|
|
66
|
+
# recommend `marin` and `cedar` for best quality.
|
|
64
67
|
def initialize: (
|
|
65
68
|
?format_: OpenAI::Models::Realtime::realtime_audio_formats,
|
|
66
69
|
?voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
|
|
@@ -69,7 +69,7 @@ module OpenAI
|
|
|
69
69
|
?type: OpenAI::Models::Realtime::RealtimeResponseStatus::type_
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
type error = { ?code: String, ?type: String }
|
|
72
|
+
type error = { ?code: String, ?message: String, ?type: String }
|
|
73
73
|
|
|
74
74
|
class Error < OpenAI::Internal::Type::BaseModel
|
|
75
75
|
# Error code, if any.
|
|
@@ -78,6 +78,12 @@ module OpenAI
|
|
|
78
78
|
# Error code, if any.
|
|
79
79
|
def code=: (String) -> String
|
|
80
80
|
|
|
81
|
+
# A human-readable error message.
|
|
82
|
+
attr_reader message: String?
|
|
83
|
+
|
|
84
|
+
# A human-readable error message.
|
|
85
|
+
def message=: (String) -> String
|
|
86
|
+
|
|
81
87
|
# The type of error.
|
|
82
88
|
attr_reader type: String?
|
|
83
89
|
|
|
@@ -86,11 +92,17 @@ module OpenAI
|
|
|
86
92
|
|
|
87
93
|
# @param code
|
|
88
94
|
# Error code, if any.
|
|
95
|
+
# @param message
|
|
96
|
+
# A human-readable error message.
|
|
89
97
|
# @param type
|
|
90
98
|
# The type of error.
|
|
91
|
-
def initialize: (
|
|
99
|
+
def initialize: (
|
|
100
|
+
?code: String,
|
|
101
|
+
?message: String,
|
|
102
|
+
?type: String
|
|
103
|
+
) -> void
|
|
92
104
|
|
|
93
|
-
def to_hash: -> { ?code: String, ?type: String }
|
|
105
|
+
def to_hash: -> { ?code: String, ?message: String, ?type: String }
|
|
94
106
|
end
|
|
95
107
|
|
|
96
108
|
type reason =
|
|
@@ -90,8 +90,6 @@ module OpenAI
|
|
|
90
90
|
# consider using the `output_text` property where supported in SDKs.
|
|
91
91
|
attr_accessor output: ::Array[OpenAI::Models::Responses::response_output_item]
|
|
92
92
|
|
|
93
|
-
def output_text: -> String
|
|
94
|
-
|
|
95
93
|
# Whether to allow the model to run tool calls in parallel.
|
|
96
94
|
attr_accessor parallel_tool_calls: bool
|
|
97
95
|
|
|
@@ -220,7 +218,7 @@ module OpenAI
|
|
|
220
218
|
|
|
221
219
|
# A stable identifier used to help detect users of your application that may be
|
|
222
220
|
# violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
223
|
-
# identifies each user, with a maximum length of
|
|
221
|
+
# identifies each user, with a maximum length of 128 characters. We recommend
|
|
224
222
|
# hashing their username or email address, in order to avoid sending us any
|
|
225
223
|
# identifying information.
|
|
226
224
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -453,7 +451,7 @@ module OpenAI
|
|
|
453
451
|
# @param safety_identifier
|
|
454
452
|
# A stable identifier used to help detect users of your application that may be
|
|
455
453
|
# violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
456
|
-
# identifies each user, with a maximum length of
|
|
454
|
+
# identifies each user, with a maximum length of 128 characters. We recommend
|
|
457
455
|
# hashing their username or email address, in order to avoid sending us any
|
|
458
456
|
# identifying information.
|
|
459
457
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -218,7 +218,7 @@ module OpenAI
|
|
|
218
218
|
|
|
219
219
|
# A stable identifier used to help detect users of your application that may be
|
|
220
220
|
# violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
221
|
-
# identifies each user, with a maximum length of
|
|
221
|
+
# identifies each user, with a maximum length of 128 characters. We recommend
|
|
222
222
|
# hashing their username or email address, in order to avoid sending us any
|
|
223
223
|
# identifying information.
|
|
224
224
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -495,7 +495,7 @@ module OpenAI
|
|
|
495
495
|
# @param safety_identifier
|
|
496
496
|
# A stable identifier used to help detect users of your application that may be
|
|
497
497
|
# violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
498
|
-
# identifies each user, with a maximum length of
|
|
498
|
+
# identifies each user, with a maximum length of 128 characters. We recommend
|
|
499
499
|
# hashing their username or email address, in order to avoid sending us any
|
|
500
500
|
# identifying information.
|
|
501
501
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -5,7 +5,9 @@ module OpenAI
|
|
|
5
5
|
{
|
|
6
6
|
code: OpenAI::Models::Responses::ResponseError::code,
|
|
7
7
|
message: String,
|
|
8
|
-
?misalignment: OpenAI::Responses::ResponseError::Misalignment
|
|
8
|
+
?misalignment: OpenAI::Responses::ResponseError::Misalignment,
|
|
9
|
+
?param: String?,
|
|
10
|
+
?type: String?
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
class ResponseError < OpenAI::Internal::Type::BaseModel
|
|
@@ -21,20 +23,34 @@ module OpenAI
|
|
|
21
23
|
OpenAI::Responses::ResponseError::Misalignment
|
|
22
24
|
) -> OpenAI::Responses::ResponseError::Misalignment
|
|
23
25
|
|
|
26
|
+
# The request parameter associated with the error, or null if none was recorded.
|
|
27
|
+
attr_accessor param: String?
|
|
28
|
+
|
|
29
|
+
# The original error type, or null if it was not recorded.
|
|
30
|
+
attr_accessor type: String?
|
|
31
|
+
|
|
24
32
|
# @param code
|
|
25
33
|
# The error code for the response.
|
|
26
34
|
# @param message
|
|
27
35
|
# A human-readable description of the error.
|
|
36
|
+
# @param param
|
|
37
|
+
# The request parameter associated with the error, or null if none was recorded.
|
|
38
|
+
# @param type
|
|
39
|
+
# The original error type, or null if it was not recorded.
|
|
28
40
|
def initialize: (
|
|
29
41
|
code: OpenAI::Models::Responses::ResponseError::code,
|
|
30
42
|
message: String,
|
|
31
|
-
?misalignment: OpenAI::Responses::ResponseError::Misalignment
|
|
43
|
+
?misalignment: OpenAI::Responses::ResponseError::Misalignment,
|
|
44
|
+
?param: String?,
|
|
45
|
+
?type: String?
|
|
32
46
|
) -> void
|
|
33
47
|
|
|
34
48
|
def to_hash: -> {
|
|
35
49
|
code: OpenAI::Models::Responses::ResponseError::code,
|
|
36
50
|
message: String,
|
|
37
|
-
?misalignment: OpenAI::Responses::ResponseError::Misalignment
|
|
51
|
+
?misalignment: OpenAI::Responses::ResponseError::Misalignment,
|
|
52
|
+
?param: String?,
|
|
53
|
+
?type: String?
|
|
38
54
|
}
|
|
39
55
|
|
|
40
56
|
type code =
|
|
@@ -519,6 +519,7 @@ module OpenAI
|
|
|
519
519
|
?type: :image_generation_call,
|
|
520
520
|
?action: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::action?,
|
|
521
521
|
?background: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::background?,
|
|
522
|
+
?error: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error,
|
|
522
523
|
?output_format: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::output_format?,
|
|
523
524
|
?quality: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::quality?,
|
|
524
525
|
?revised_prompt: String?,
|
|
@@ -544,6 +545,14 @@ module OpenAI
|
|
|
544
545
|
# The background setting used for generation.
|
|
545
546
|
attr_accessor background: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::background?
|
|
546
547
|
|
|
548
|
+
# Details of a moderation failure, when available.
|
|
549
|
+
attr_reader error: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error?
|
|
550
|
+
|
|
551
|
+
# Details of a moderation failure, when available.
|
|
552
|
+
def error=: (
|
|
553
|
+
OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error
|
|
554
|
+
) -> OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error
|
|
555
|
+
|
|
547
556
|
# The output format used for generation.
|
|
548
557
|
attr_accessor output_format: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::output_format?
|
|
549
558
|
|
|
@@ -567,6 +576,8 @@ module OpenAI
|
|
|
567
576
|
# The action used for image generation.
|
|
568
577
|
# @param background
|
|
569
578
|
# The background setting used for generation.
|
|
579
|
+
# @param error
|
|
580
|
+
# Details of a moderation failure, when available.
|
|
570
581
|
# @param output_format
|
|
571
582
|
# The output format used for generation.
|
|
572
583
|
# @param quality
|
|
@@ -584,6 +595,7 @@ module OpenAI
|
|
|
584
595
|
status: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::status,
|
|
585
596
|
?action: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::action?,
|
|
586
597
|
?background: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::background?,
|
|
598
|
+
?error: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error,
|
|
587
599
|
?output_format: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::output_format?,
|
|
588
600
|
?quality: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::quality?,
|
|
589
601
|
?revised_prompt: String?,
|
|
@@ -598,6 +610,7 @@ module OpenAI
|
|
|
598
610
|
?type: :image_generation_call,
|
|
599
611
|
?action: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::action?,
|
|
600
612
|
?background: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::background?,
|
|
613
|
+
?error: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error,
|
|
601
614
|
?output_format: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::output_format?,
|
|
602
615
|
?quality: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::quality?,
|
|
603
616
|
?revised_prompt: String?,
|
|
@@ -641,6 +654,103 @@ module OpenAI
|
|
|
641
654
|
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::background]
|
|
642
655
|
end
|
|
643
656
|
|
|
657
|
+
type error =
|
|
658
|
+
{
|
|
659
|
+
code: String?,
|
|
660
|
+
message: String,
|
|
661
|
+
param: String?,
|
|
662
|
+
type: String,
|
|
663
|
+
?moderation_details: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
class Error < OpenAI::Internal::Type::BaseModel
|
|
667
|
+
# The error code.
|
|
668
|
+
attr_accessor code: String?
|
|
669
|
+
|
|
670
|
+
# A description of the error.
|
|
671
|
+
attr_accessor message: String
|
|
672
|
+
|
|
673
|
+
# The related request parameter.
|
|
674
|
+
attr_accessor param: String?
|
|
675
|
+
|
|
676
|
+
# The error type.
|
|
677
|
+
attr_accessor type: String
|
|
678
|
+
|
|
679
|
+
# Public details for a `moderation_blocked` error, when available.
|
|
680
|
+
attr_reader moderation_details: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails?
|
|
681
|
+
|
|
682
|
+
# Public details for a `moderation_blocked` error, when available.
|
|
683
|
+
def moderation_details=: (
|
|
684
|
+
OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails
|
|
685
|
+
) -> OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails
|
|
686
|
+
|
|
687
|
+
# @param code
|
|
688
|
+
# The error code.
|
|
689
|
+
# @param message
|
|
690
|
+
# A description of the error.
|
|
691
|
+
# @param param
|
|
692
|
+
# The related request parameter.
|
|
693
|
+
# @param type
|
|
694
|
+
# The error type.
|
|
695
|
+
# @param moderation_details
|
|
696
|
+
# Public details for a `moderation_blocked` error, when available.
|
|
697
|
+
def initialize: (
|
|
698
|
+
code: String?,
|
|
699
|
+
message: String,
|
|
700
|
+
param: String?,
|
|
701
|
+
type: String,
|
|
702
|
+
?moderation_details: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails
|
|
703
|
+
) -> void
|
|
704
|
+
|
|
705
|
+
def to_hash: -> {
|
|
706
|
+
code: String?,
|
|
707
|
+
message: String,
|
|
708
|
+
param: String?,
|
|
709
|
+
type: String,
|
|
710
|
+
?moderation_details: OpenAI::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
type moderation_details =
|
|
714
|
+
{
|
|
715
|
+
categories: ::Array[String],
|
|
716
|
+
moderation_stage: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails::moderation_stage
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
class ModerationDetails < OpenAI::Internal::Type::BaseModel
|
|
720
|
+
# Public moderation categories. New category values may be added over time.
|
|
721
|
+
attr_accessor categories: ::Array[String]
|
|
722
|
+
|
|
723
|
+
# The stage where moderation blocked the image generation call.
|
|
724
|
+
attr_accessor moderation_stage: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails::moderation_stage
|
|
725
|
+
|
|
726
|
+
# @param categories
|
|
727
|
+
# Public moderation categories. New category values may be added over time.
|
|
728
|
+
# @param moderation_stage
|
|
729
|
+
# The stage where moderation blocked the image generation call.
|
|
730
|
+
def initialize: (
|
|
731
|
+
categories: ::Array[String],
|
|
732
|
+
moderation_stage: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails::moderation_stage
|
|
733
|
+
) -> void
|
|
734
|
+
|
|
735
|
+
def to_hash: -> {
|
|
736
|
+
categories: ::Array[String],
|
|
737
|
+
moderation_stage: OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails::moderation_stage
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
type moderation_stage = :input | :output | :unknown
|
|
741
|
+
|
|
742
|
+
module ModerationStage
|
|
743
|
+
extend OpenAI::Internal::Type::Enum
|
|
744
|
+
|
|
745
|
+
INPUT: :input
|
|
746
|
+
OUTPUT: :output
|
|
747
|
+
UNKNOWN: :unknown
|
|
748
|
+
|
|
749
|
+
def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall::Error::ModerationDetails::moderation_stage]
|
|
750
|
+
end
|
|
751
|
+
end
|
|
752
|
+
end
|
|
753
|
+
|
|
644
754
|
type output_format = :png | :webp | :jpeg
|
|
645
755
|
|
|
646
756
|
module OutputFormat
|