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
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Live
|
|
7
|
+
|
|
8
|
+
class DecisionsDelegationUpdateConfig < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_reader :model
|
|
19
|
+
|
|
20
|
+
sig { params(model: String).void }
|
|
21
|
+
attr_writer :model
|
|
22
|
+
|
|
23
|
+
# Native Decision API questions evaluated together, in order.
|
|
24
|
+
sig {
|
|
25
|
+
returns(
|
|
26
|
+
T.nilable(
|
|
27
|
+
T::Array[
|
|
28
|
+
T.any(
|
|
29
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate,
|
|
30
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice,
|
|
31
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score
|
|
32
|
+
)
|
|
33
|
+
]
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
attr_reader :questions
|
|
38
|
+
|
|
39
|
+
sig {
|
|
40
|
+
params(
|
|
41
|
+
questions: T::Array[
|
|
42
|
+
T.any(
|
|
43
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate::OrHash,
|
|
44
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::OrHash,
|
|
45
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::OrHash
|
|
46
|
+
)
|
|
47
|
+
]
|
|
48
|
+
)
|
|
49
|
+
.void
|
|
50
|
+
}
|
|
51
|
+
attr_writer :questions
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
|
|
56
|
+
model: String,
|
|
57
|
+
|
|
58
|
+
questions: T::Array[
|
|
59
|
+
T.any(
|
|
60
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate::OrHash,
|
|
61
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::OrHash,
|
|
62
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::OrHash
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
)
|
|
66
|
+
.returns(T.attached_class)
|
|
67
|
+
end
|
|
68
|
+
def self.new(
|
|
69
|
+
|
|
70
|
+
model: nil,
|
|
71
|
+
|
|
72
|
+
# Native Decision API questions evaluated together, in order.
|
|
73
|
+
|
|
74
|
+
questions: nil
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
sig do
|
|
79
|
+
override.returns(
|
|
80
|
+
{
|
|
81
|
+
model: String,
|
|
82
|
+
questions: T::Array[
|
|
83
|
+
T.any(
|
|
84
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate,
|
|
85
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice,
|
|
86
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
def to_hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# A question about the request's input, with an optional correlation name.
|
|
96
|
+
module Question
|
|
97
|
+
extend OpenAI::Internal::Type::Union
|
|
98
|
+
|
|
99
|
+
Variants = T.type_alias {
|
|
100
|
+
T.any(
|
|
101
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate,
|
|
102
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice,
|
|
103
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
108
|
+
OrHash = T.type_alias do
|
|
109
|
+
T.any(
|
|
110
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate,
|
|
111
|
+
OpenAI::Internal::AnyHash
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
sig { returns(String) }
|
|
116
|
+
attr_accessor :instructions
|
|
117
|
+
|
|
118
|
+
# The type of the object. Always `predicate`.
|
|
119
|
+
sig { returns(Symbol) }
|
|
120
|
+
attr_accessor :type
|
|
121
|
+
|
|
122
|
+
sig { returns(T.nilable(String)) }
|
|
123
|
+
attr_reader :name
|
|
124
|
+
|
|
125
|
+
sig { params(name: String).void }
|
|
126
|
+
attr_writer :name
|
|
127
|
+
|
|
128
|
+
# Estimate how likely it is that a statement about the input is true.
|
|
129
|
+
sig do
|
|
130
|
+
params(
|
|
131
|
+
|
|
132
|
+
instructions: String,
|
|
133
|
+
|
|
134
|
+
name: String,
|
|
135
|
+
|
|
136
|
+
type: Symbol
|
|
137
|
+
)
|
|
138
|
+
.returns(T.attached_class)
|
|
139
|
+
end
|
|
140
|
+
def self.new(
|
|
141
|
+
|
|
142
|
+
instructions:,
|
|
143
|
+
|
|
144
|
+
name: nil,
|
|
145
|
+
|
|
146
|
+
# The type of the object. Always `predicate`.
|
|
147
|
+
|
|
148
|
+
type: :predicate
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
sig do
|
|
153
|
+
override.returns(
|
|
154
|
+
{instructions: String, type: Symbol, name: String}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
163
|
+
OrHash = T.type_alias do
|
|
164
|
+
T.any(
|
|
165
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice,
|
|
166
|
+
OpenAI::Internal::AnyHash
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
171
|
+
sig { returns(T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice]) }
|
|
172
|
+
attr_accessor :choices
|
|
173
|
+
|
|
174
|
+
sig { returns(String) }
|
|
175
|
+
attr_accessor :instructions
|
|
176
|
+
|
|
177
|
+
# The type of the object. Always `choice`.
|
|
178
|
+
sig { returns(Symbol) }
|
|
179
|
+
attr_accessor :type
|
|
180
|
+
|
|
181
|
+
sig { returns(T.nilable(String)) }
|
|
182
|
+
attr_reader :name
|
|
183
|
+
|
|
184
|
+
sig { params(name: String).void }
|
|
185
|
+
attr_writer :name
|
|
186
|
+
|
|
187
|
+
# Choose from the supplied options based on the input.
|
|
188
|
+
sig do
|
|
189
|
+
params(
|
|
190
|
+
|
|
191
|
+
choices: T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice::OrHash],
|
|
192
|
+
|
|
193
|
+
instructions: String,
|
|
194
|
+
|
|
195
|
+
name: String,
|
|
196
|
+
|
|
197
|
+
type: Symbol
|
|
198
|
+
)
|
|
199
|
+
.returns(T.attached_class)
|
|
200
|
+
end
|
|
201
|
+
def self.new(
|
|
202
|
+
|
|
203
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
204
|
+
choices:,
|
|
205
|
+
|
|
206
|
+
instructions:,
|
|
207
|
+
|
|
208
|
+
name: nil,
|
|
209
|
+
|
|
210
|
+
# The type of the object. Always `choice`.
|
|
211
|
+
|
|
212
|
+
type: :choice
|
|
213
|
+
)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
sig do
|
|
217
|
+
override.returns(
|
|
218
|
+
{
|
|
219
|
+
choices: T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice],
|
|
220
|
+
instructions: String,
|
|
221
|
+
type: Symbol,
|
|
222
|
+
name: String
|
|
223
|
+
}
|
|
224
|
+
)
|
|
225
|
+
end
|
|
226
|
+
def to_hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
230
|
+
OrHash = T.type_alias do
|
|
231
|
+
T.any(
|
|
232
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice,
|
|
233
|
+
OpenAI::Internal::AnyHash
|
|
234
|
+
)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
238
|
+
sig { returns(T.any(String, T::Boolean)) }
|
|
239
|
+
attr_accessor :value
|
|
240
|
+
|
|
241
|
+
sig { returns(T.nilable(String)) }
|
|
242
|
+
attr_reader :description
|
|
243
|
+
|
|
244
|
+
sig { params(description: String).void }
|
|
245
|
+
attr_writer :description
|
|
246
|
+
|
|
247
|
+
sig do
|
|
248
|
+
params(
|
|
249
|
+
|
|
250
|
+
value: T.any(String, T::Boolean),
|
|
251
|
+
|
|
252
|
+
description: String
|
|
253
|
+
)
|
|
254
|
+
.returns(T.attached_class)
|
|
255
|
+
end
|
|
256
|
+
def self.new(
|
|
257
|
+
|
|
258
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
259
|
+
value:,
|
|
260
|
+
|
|
261
|
+
description: nil
|
|
262
|
+
)
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
sig do
|
|
266
|
+
override.returns(
|
|
267
|
+
{value: T.any(String, T::Boolean), description: String}
|
|
268
|
+
)
|
|
269
|
+
end
|
|
270
|
+
def to_hash
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
274
|
+
module Value
|
|
275
|
+
extend OpenAI::Internal::Type::Union
|
|
276
|
+
|
|
277
|
+
Variants = T.type_alias { T.any(String, T::Boolean) }
|
|
278
|
+
|
|
279
|
+
sig {
|
|
280
|
+
override.returns(
|
|
281
|
+
T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice::Value::Variants]
|
|
282
|
+
)
|
|
283
|
+
}
|
|
284
|
+
def self.variants
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
class Score < OpenAI::Internal::Type::BaseModel
|
|
292
|
+
OrHash = T.type_alias do
|
|
293
|
+
T.any(
|
|
294
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score,
|
|
295
|
+
OpenAI::Internal::AnyHash
|
|
296
|
+
)
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
sig { returns(String) }
|
|
300
|
+
attr_accessor :instructions
|
|
301
|
+
|
|
302
|
+
sig { returns(T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::Level]) }
|
|
303
|
+
attr_accessor :levels
|
|
304
|
+
|
|
305
|
+
# The type of the object. Always `score`.
|
|
306
|
+
sig { returns(Symbol) }
|
|
307
|
+
attr_accessor :type
|
|
308
|
+
|
|
309
|
+
sig { returns(T.nilable(String)) }
|
|
310
|
+
attr_reader :name
|
|
311
|
+
|
|
312
|
+
sig { params(name: String).void }
|
|
313
|
+
attr_writer :name
|
|
314
|
+
|
|
315
|
+
# Rate the input against the supplied ordered levels.
|
|
316
|
+
sig do
|
|
317
|
+
params(
|
|
318
|
+
|
|
319
|
+
instructions: String,
|
|
320
|
+
|
|
321
|
+
levels: T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::Level::OrHash],
|
|
322
|
+
|
|
323
|
+
name: String,
|
|
324
|
+
|
|
325
|
+
type: Symbol
|
|
326
|
+
)
|
|
327
|
+
.returns(T.attached_class)
|
|
328
|
+
end
|
|
329
|
+
def self.new(
|
|
330
|
+
|
|
331
|
+
instructions:,
|
|
332
|
+
|
|
333
|
+
levels:,
|
|
334
|
+
|
|
335
|
+
name: nil,
|
|
336
|
+
|
|
337
|
+
# The type of the object. Always `score`.
|
|
338
|
+
|
|
339
|
+
type: :score
|
|
340
|
+
)
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
sig do
|
|
344
|
+
override.returns(
|
|
345
|
+
{
|
|
346
|
+
instructions: String,
|
|
347
|
+
levels: T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::Level],
|
|
348
|
+
type: Symbol,
|
|
349
|
+
name: String
|
|
350
|
+
}
|
|
351
|
+
)
|
|
352
|
+
end
|
|
353
|
+
def to_hash
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
class Level < OpenAI::Internal::Type::BaseModel
|
|
357
|
+
OrHash = T.type_alias do
|
|
358
|
+
T.any(
|
|
359
|
+
OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::Level,
|
|
360
|
+
OpenAI::Internal::AnyHash
|
|
361
|
+
)
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
sig { returns(String) }
|
|
365
|
+
attr_accessor :label
|
|
366
|
+
|
|
367
|
+
sig { returns(T.nilable(String)) }
|
|
368
|
+
attr_reader :description
|
|
369
|
+
|
|
370
|
+
sig { params(description: String).void }
|
|
371
|
+
attr_writer :description
|
|
372
|
+
|
|
373
|
+
sig do
|
|
374
|
+
params(
|
|
375
|
+
|
|
376
|
+
label: String,
|
|
377
|
+
|
|
378
|
+
description: String
|
|
379
|
+
)
|
|
380
|
+
.returns(T.attached_class)
|
|
381
|
+
end
|
|
382
|
+
def self.new(
|
|
383
|
+
|
|
384
|
+
label:,
|
|
385
|
+
|
|
386
|
+
description: nil
|
|
387
|
+
)
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
sig do
|
|
391
|
+
override.returns(
|
|
392
|
+
{label: String, description: String}
|
|
393
|
+
)
|
|
394
|
+
end
|
|
395
|
+
def to_hash
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
end
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
sig { override.returns(T::Array[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Variants]) }
|
|
402
|
+
def self.variants
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
end
|
|
412
|
+
end
|
|
@@ -43,8 +43,8 @@ module OpenAI
|
|
|
43
43
|
sig { params(client_event_id: String).void }
|
|
44
44
|
attr_writer :client_event_id
|
|
45
45
|
|
|
46
|
-
# Returned when the Live model delegates work to your application or
|
|
47
|
-
#
|
|
46
|
+
# Returned when the Live model delegates work to your application, Responses, or
|
|
47
|
+
# Decisions. Contains delegation metadata and the position on the session timeline
|
|
48
48
|
# where the work was delegated.
|
|
49
49
|
sig do
|
|
50
50
|
params(
|
|
@@ -107,12 +107,11 @@ module OpenAI
|
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
# The unique ID of the delegation. Use this as delegation_id when replying to
|
|
110
|
-
# client-owned work or correlating
|
|
110
|
+
# client-owned work or correlating backend events.
|
|
111
111
|
sig { returns(String) }
|
|
112
112
|
attr_accessor :id
|
|
113
113
|
|
|
114
|
-
# Where the Live model delegated the work: `client`
|
|
115
|
-
# `responses` for the configured Responses backend.
|
|
114
|
+
# Where the Live model delegated the work: `client`, `responses`, or `decisions`.
|
|
116
115
|
sig { returns(OpenAI::Live::DelegationCreatedEvent::Delegation::Target::OrSymbol) }
|
|
117
116
|
attr_accessor :target
|
|
118
117
|
|
|
@@ -146,11 +145,10 @@ module OpenAI
|
|
|
146
145
|
def self.new(
|
|
147
146
|
|
|
148
147
|
# The unique ID of the delegation. Use this as delegation_id when replying to
|
|
149
|
-
# client-owned work or correlating
|
|
148
|
+
# client-owned work or correlating backend events.
|
|
150
149
|
id:,
|
|
151
150
|
|
|
152
|
-
# Where the Live model delegated the work: `client`
|
|
153
|
-
# `responses` for the configured Responses backend.
|
|
151
|
+
# Where the Live model delegated the work: `client`, `responses`, or `decisions`.
|
|
154
152
|
target:,
|
|
155
153
|
|
|
156
154
|
# The ID of the Responses API response associated with a Responses delegation.
|
|
@@ -176,8 +174,7 @@ module OpenAI
|
|
|
176
174
|
def to_hash
|
|
177
175
|
end
|
|
178
176
|
|
|
179
|
-
# Where the Live model delegated the work: `client`
|
|
180
|
-
# `responses` for the configured Responses backend.
|
|
177
|
+
# Where the Live model delegated the work: `client`, `responses`, or `decisions`.
|
|
181
178
|
module Target
|
|
182
179
|
extend OpenAI::Internal::Type::Union
|
|
183
180
|
|
|
@@ -195,6 +192,7 @@ module OpenAI
|
|
|
195
192
|
|
|
196
193
|
CLIENT = T.let(:client, OpenAI::Live::DelegationCreatedEvent::Delegation::Target::TaggedSymbol)
|
|
197
194
|
RESPONSES = T.let(:responses, OpenAI::Live::DelegationCreatedEvent::Delegation::Target::TaggedSymbol)
|
|
195
|
+
DECISIONS = T.let(:decisions, OpenAI::Live::DelegationCreatedEvent::Delegation::Target::TaggedSymbol)
|
|
198
196
|
|
|
199
197
|
end
|
|
200
198
|
end
|
|
@@ -19,9 +19,13 @@ module OpenAI
|
|
|
19
19
|
OpenAI::Live::InputAudioAppendEvent,
|
|
20
20
|
OpenAI::Live::InputAudioMuteEvent,
|
|
21
21
|
OpenAI::Live::InputAudioUnmuteEvent,
|
|
22
|
+
OpenAI::Live::OutputAudioFixturePlayEvent,
|
|
22
23
|
OpenAI::Live::InstructionsAppendEvent,
|
|
23
24
|
OpenAI::Live::ThinkingAppendEvent,
|
|
24
25
|
OpenAI::Live::CommentaryAppendEvent,
|
|
26
|
+
OpenAI::Live::DecisionCreateEvent,
|
|
27
|
+
OpenAI::Live::DecisionItemCreateEvent,
|
|
28
|
+
OpenAI::Live::DecisionItemDeleteEvent,
|
|
25
29
|
OpenAI::Live::ResponseItemCreateEvent,
|
|
26
30
|
OpenAI::Live::ResponseCreateEvent,
|
|
27
31
|
OpenAI::Live::SessionCloseEvent
|
|
@@ -19,6 +19,8 @@ module OpenAI
|
|
|
19
19
|
OpenAI::Live::SessionUpdatedEvent,
|
|
20
20
|
OpenAI::Live::InputAudioMutedEvent,
|
|
21
21
|
OpenAI::Live::InputAudioUnmutedEvent,
|
|
22
|
+
OpenAI::Live::OutputAudioFixturePlayingEvent,
|
|
23
|
+
OpenAI::Live::OutputAudioFixturePlayedEvent,
|
|
22
24
|
OpenAI::Live::InstructionsAppendedEvent,
|
|
23
25
|
OpenAI::Live::ThinkingAppendedEvent,
|
|
24
26
|
OpenAI::Live::CommentaryAppendedEvent,
|
|
@@ -27,6 +29,9 @@ module OpenAI
|
|
|
27
29
|
OpenAI::Live::InputTranscriptDeltaEvent,
|
|
28
30
|
OpenAI::Live::OutputTranscriptDeltaEvent,
|
|
29
31
|
OpenAI::Live::DelegationCreatedEvent,
|
|
32
|
+
OpenAI::Live::DecisionEvent,
|
|
33
|
+
OpenAI::Live::DecisionItemCreatedEvent,
|
|
34
|
+
OpenAI::Live::DecisionItemDeletedEvent,
|
|
30
35
|
OpenAI::Live::ResponseEvent,
|
|
31
36
|
OpenAI::Live::SessionUsageUpdatedEvent,
|
|
32
37
|
OpenAI::Live::SessionClosedEvent,
|
|
@@ -36,17 +36,24 @@ module OpenAI
|
|
|
36
36
|
attr_writer :client
|
|
37
37
|
|
|
38
38
|
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
39
|
-
# application; use `responses`
|
|
39
|
+
# application; use `responses` or `decisions` to delegate to the corresponding
|
|
40
|
+
# API.
|
|
40
41
|
sig {
|
|
41
42
|
returns(
|
|
42
|
-
T.nilable(
|
|
43
|
+
T.nilable(
|
|
44
|
+
T.any(
|
|
45
|
+
OpenAI::Live::ClientDelegation,
|
|
46
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Responses,
|
|
47
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Decisions
|
|
48
|
+
)
|
|
49
|
+
)
|
|
43
50
|
)
|
|
44
51
|
}
|
|
45
52
|
attr_accessor :delegation
|
|
46
53
|
|
|
47
54
|
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
48
|
-
# assistant messages with one text part each; at most 128 messages and
|
|
49
|
-
# rendered
|
|
55
|
+
# assistant messages with one text part each; at most 128 messages and a
|
|
56
|
+
# configured rendered-token limit (8,192 by default).
|
|
50
57
|
sig {
|
|
51
58
|
returns(
|
|
52
59
|
T.nilable(
|
|
@@ -94,6 +101,16 @@ module OpenAI
|
|
|
94
101
|
sig { params(store: T::Boolean).void }
|
|
95
102
|
attr_writer :store
|
|
96
103
|
|
|
104
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
105
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
106
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
107
|
+
# triggers.
|
|
108
|
+
sig { returns(T.nilable(T::Array[OpenAI::Live::DecisionTrigger])) }
|
|
109
|
+
attr_reader :triggers
|
|
110
|
+
|
|
111
|
+
sig { params(triggers: T::Array[OpenAI::Live::DecisionTrigger::OrHash]).void }
|
|
112
|
+
attr_writer :triggers
|
|
113
|
+
|
|
97
114
|
# Startup configuration for a Live media session. Follow the
|
|
98
115
|
# [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting)
|
|
99
116
|
# when writing frontend instructions and the backend prompt under
|
|
@@ -110,7 +127,8 @@ module OpenAI
|
|
|
110
127
|
delegation: T.nilable(
|
|
111
128
|
T.any(
|
|
112
129
|
OpenAI::Live::ClientDelegation::OrHash,
|
|
113
|
-
OpenAI::Live::MediaSessionConfig::Delegation::Responses::OrHash
|
|
130
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Responses::OrHash,
|
|
131
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Decisions::OrHash
|
|
114
132
|
)
|
|
115
133
|
),
|
|
116
134
|
|
|
@@ -124,7 +142,9 @@ module OpenAI
|
|
|
124
142
|
|
|
125
143
|
instructions: T.nilable(String),
|
|
126
144
|
|
|
127
|
-
store: T::Boolean
|
|
145
|
+
store: T::Boolean,
|
|
146
|
+
|
|
147
|
+
triggers: T::Array[OpenAI::Live::DecisionTrigger::OrHash]
|
|
128
148
|
)
|
|
129
149
|
.returns(T.attached_class)
|
|
130
150
|
end
|
|
@@ -143,12 +163,13 @@ module OpenAI
|
|
|
143
163
|
client: nil,
|
|
144
164
|
|
|
145
165
|
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
146
|
-
# application; use `responses`
|
|
166
|
+
# application; use `responses` or `decisions` to delegate to the corresponding
|
|
167
|
+
# API.
|
|
147
168
|
delegation: nil,
|
|
148
169
|
|
|
149
170
|
# Ordered text-only history supplied before startup. Supports developer, user, and
|
|
150
|
-
# assistant messages with one text part each; at most 128 messages and
|
|
151
|
-
# rendered
|
|
171
|
+
# assistant messages with one text part each; at most 128 messages and a
|
|
172
|
+
# configured rendered-token limit (8,192 by default).
|
|
152
173
|
input: nil,
|
|
153
174
|
|
|
154
175
|
# Frontend instructions for voice, conversation, interruptions, and when to
|
|
@@ -162,8 +183,14 @@ module OpenAI
|
|
|
162
183
|
|
|
163
184
|
# Whether to store the session for later forking and recording download. Defaults
|
|
164
185
|
# to false for new sessions.
|
|
186
|
+
store: nil,
|
|
187
|
+
|
|
188
|
+
# At most one Decisions trigger per transcript event type. Triggers run
|
|
189
|
+
# independently of delegation. On update, omit triggers to keep the current
|
|
190
|
+
# configuration, send a list to replace it, or send an empty list to disable
|
|
191
|
+
# triggers.
|
|
165
192
|
|
|
166
|
-
|
|
193
|
+
triggers: nil
|
|
167
194
|
)
|
|
168
195
|
end
|
|
169
196
|
|
|
@@ -174,7 +201,11 @@ module OpenAI
|
|
|
174
201
|
audio: OpenAI::Live::MediaSessionConfig::Audio,
|
|
175
202
|
client: OpenAI::Live::ClientConfig,
|
|
176
203
|
delegation: T.nilable(
|
|
177
|
-
T.any(
|
|
204
|
+
T.any(
|
|
205
|
+
OpenAI::Live::ClientDelegation,
|
|
206
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Responses,
|
|
207
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Decisions
|
|
208
|
+
)
|
|
178
209
|
),
|
|
179
210
|
input: T::Array[
|
|
180
211
|
T.any(
|
|
@@ -184,7 +215,8 @@ module OpenAI
|
|
|
184
215
|
)
|
|
185
216
|
],
|
|
186
217
|
instructions: T.nilable(String),
|
|
187
|
-
store: T::Boolean
|
|
218
|
+
store: T::Boolean,
|
|
219
|
+
triggers: T::Array[OpenAI::Live::DecisionTrigger]
|
|
188
220
|
}
|
|
189
221
|
)
|
|
190
222
|
end
|
|
@@ -316,12 +348,17 @@ module OpenAI
|
|
|
316
348
|
end
|
|
317
349
|
|
|
318
350
|
# Who handles tasks delegated by the Live model. Omitted or null selects your
|
|
319
|
-
# application; use `responses`
|
|
351
|
+
# application; use `responses` or `decisions` to delegate to the corresponding
|
|
352
|
+
# API.
|
|
320
353
|
module Delegation
|
|
321
354
|
extend OpenAI::Internal::Type::Union
|
|
322
355
|
|
|
323
356
|
Variants = T.type_alias {
|
|
324
|
-
T.any(
|
|
357
|
+
T.any(
|
|
358
|
+
OpenAI::Live::ClientDelegation,
|
|
359
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Responses,
|
|
360
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Decisions
|
|
361
|
+
)
|
|
325
362
|
}
|
|
326
363
|
|
|
327
364
|
class Responses < OpenAI::Internal::Type::BaseModel
|
|
@@ -376,6 +413,50 @@ module OpenAI
|
|
|
376
413
|
|
|
377
414
|
end
|
|
378
415
|
|
|
416
|
+
class Decisions < OpenAI::Internal::Type::BaseModel
|
|
417
|
+
OrHash = T.type_alias do
|
|
418
|
+
T.any(
|
|
419
|
+
OpenAI::Live::MediaSessionConfig::Delegation::Decisions,
|
|
420
|
+
OpenAI::Internal::AnyHash
|
|
421
|
+
)
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
sig { returns(OpenAI::Live::DecisionsDelegationConfig) }
|
|
425
|
+
attr_reader :decisions
|
|
426
|
+
|
|
427
|
+
sig { params(decisions: OpenAI::Live::DecisionsDelegationConfig::OrHash).void }
|
|
428
|
+
attr_writer :decisions
|
|
429
|
+
|
|
430
|
+
sig { returns(Symbol) }
|
|
431
|
+
attr_accessor :type
|
|
432
|
+
|
|
433
|
+
sig do
|
|
434
|
+
params(
|
|
435
|
+
|
|
436
|
+
decisions: OpenAI::Live::DecisionsDelegationConfig::OrHash,
|
|
437
|
+
|
|
438
|
+
type: Symbol
|
|
439
|
+
)
|
|
440
|
+
.returns(T.attached_class)
|
|
441
|
+
end
|
|
442
|
+
def self.new(
|
|
443
|
+
|
|
444
|
+
decisions:,
|
|
445
|
+
|
|
446
|
+
type: :decisions
|
|
447
|
+
)
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
sig do
|
|
451
|
+
override.returns(
|
|
452
|
+
{decisions: OpenAI::Live::DecisionsDelegationConfig, type: Symbol}
|
|
453
|
+
)
|
|
454
|
+
end
|
|
455
|
+
def to_hash
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
end
|
|
459
|
+
|
|
379
460
|
sig { override.returns(T::Array[OpenAI::Live::MediaSessionConfig::Delegation::Variants]) }
|
|
380
461
|
def self.variants
|
|
381
462
|
end
|