openai 0.103.0 → 0.105.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 +98 -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_update_params.rb +4 -2
- 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 +15 -3
- data/lib/openai/models/image_edit_params.rb +28 -5
- data/lib/openai/models/image_edit_partial_image_event.rb +1 -2
- data/lib/openai/models/image_gen_completed_event.rb +15 -3
- data/lib/openai/models/image_gen_partial_image_event.rb +1 -2
- data/lib/openai/models/image_generate_params.rb +28 -5
- data/lib/openai/models/images_response.rb +15 -3
- 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/unwrap_webhook_event.rb +4 -4
- data/lib/openai/models/webhooks/webhook_endpoint_with_secret.rb +0 -9
- 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.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/images.rb +50 -12
- 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 +31 -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_update_params.rbi +4 -2
- 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 +16 -1
- data/rbi/openai/models/image_edit_params.rbi +26 -4
- data/rbi/openai/models/image_edit_partial_image_event.rbi +1 -0
- data/rbi/openai/models/image_gen_completed_event.rbi +16 -1
- data/rbi/openai/models/image_gen_partial_image_event.rbi +1 -0
- data/rbi/openai/models/image_generate_params.rbi +26 -4
- data/rbi/openai/models/images_response.rbi +15 -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/unwrap_webhook_event.rbi +1 -1
- 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/images.rbi +44 -8
- 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 +1 -1
- 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_update_params.rbs +4 -2
- 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/image_edit_completed_event.rbs +14 -2
- data/sig/openai/models/image_edit_params.rbs +27 -6
- data/sig/openai/models/image_gen_completed_event.rbs +14 -2
- data/sig/openai/models/image_generate_params.rbs +27 -6
- data/sig/openai/models/images_response.rbs +12 -0
- 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/unwrap_webhook_event.rbs +1 -1
- 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/images.rbs +4 -0
- 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 +1 -1
- metadata +89 -1
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class DecisionTrigger < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute decisions
|
|
8
|
+
# Questions evaluated using the current transcript and the session's shared
|
|
9
|
+
# Decision items.
|
|
10
|
+
#
|
|
11
|
+
# @return [OpenAI::Models::Live::DecisionTrigger::Decisions]
|
|
12
|
+
required :decisions, -> { OpenAI::Live::DecisionTrigger::Decisions }
|
|
13
|
+
|
|
14
|
+
# @!attribute event_type
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, OpenAI::Models::Live::DecisionTrigger::EventType]
|
|
17
|
+
required :event_type, enum: -> { OpenAI::Live::DecisionTrigger::EventType }
|
|
18
|
+
|
|
19
|
+
# @!attribute type
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, :decisions]
|
|
22
|
+
required :type, const: :decisions
|
|
23
|
+
|
|
24
|
+
# @!method initialize(decisions:, event_type:, type: :decisions)
|
|
25
|
+
# @param decisions [OpenAI::Models::Live::DecisionTrigger::Decisions]
|
|
26
|
+
# Questions evaluated using the current transcript and the session's shared
|
|
27
|
+
# Decision items.
|
|
28
|
+
#
|
|
29
|
+
# @param event_type [Symbol, OpenAI::Models::Live::DecisionTrigger::EventType]
|
|
30
|
+
#
|
|
31
|
+
# @param type [Symbol, :decisions]
|
|
32
|
+
|
|
33
|
+
# @see OpenAI::Models::Live::DecisionTrigger#decisions
|
|
34
|
+
class Decisions < OpenAI::Internal::Type::BaseModel
|
|
35
|
+
# @!attribute questions
|
|
36
|
+
# Native Decision API questions evaluated together, in order.
|
|
37
|
+
#
|
|
38
|
+
# @return [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score>]
|
|
39
|
+
required(
|
|
40
|
+
:questions,
|
|
41
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::DecisionTrigger::Decisions::Question] }
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# @!method initialize(questions:)
|
|
45
|
+
# Questions evaluated using the current transcript and the session's shared
|
|
46
|
+
# Decision items.
|
|
47
|
+
#
|
|
48
|
+
# @param questions [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score>]
|
|
49
|
+
# Native Decision API questions evaluated together, in order.
|
|
50
|
+
|
|
51
|
+
# A question about the request's input, with an optional correlation name.
|
|
52
|
+
module Question
|
|
53
|
+
extend OpenAI::Internal::Type::Union
|
|
54
|
+
|
|
55
|
+
discriminator :type
|
|
56
|
+
|
|
57
|
+
# Estimate how likely it is that a statement about the input is true.
|
|
58
|
+
variant :predicate, -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Predicate }
|
|
59
|
+
|
|
60
|
+
# Choose from the supplied options based on the input.
|
|
61
|
+
variant :choice, -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Choice }
|
|
62
|
+
|
|
63
|
+
# Rate the input against the supplied ordered levels.
|
|
64
|
+
variant :score, -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Score }
|
|
65
|
+
|
|
66
|
+
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
67
|
+
# @!attribute instructions
|
|
68
|
+
#
|
|
69
|
+
# @return [String]
|
|
70
|
+
required :instructions, String
|
|
71
|
+
|
|
72
|
+
# @!attribute type
|
|
73
|
+
# The type of the object. Always `predicate`.
|
|
74
|
+
#
|
|
75
|
+
# @return [Symbol, :predicate]
|
|
76
|
+
required :type, const: :predicate
|
|
77
|
+
|
|
78
|
+
# @!attribute name
|
|
79
|
+
#
|
|
80
|
+
# @return [String, nil]
|
|
81
|
+
optional :name, String
|
|
82
|
+
|
|
83
|
+
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
84
|
+
# Estimate how likely it is that a statement about the input is true.
|
|
85
|
+
#
|
|
86
|
+
# @param instructions [String]
|
|
87
|
+
#
|
|
88
|
+
# @param name [String]
|
|
89
|
+
#
|
|
90
|
+
# @param type [Symbol, :predicate]
|
|
91
|
+
# The type of the object. Always `predicate`.
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
95
|
+
# @!attribute choices
|
|
96
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
97
|
+
#
|
|
98
|
+
# @return [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Choice>]
|
|
99
|
+
required(
|
|
100
|
+
:choices,
|
|
101
|
+
-> {
|
|
102
|
+
OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger::Decisions::Question::Choice::Choice]
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# @!attribute instructions
|
|
107
|
+
#
|
|
108
|
+
# @return [String]
|
|
109
|
+
required :instructions, String
|
|
110
|
+
|
|
111
|
+
# @!attribute type
|
|
112
|
+
# The type of the object. Always `choice`.
|
|
113
|
+
#
|
|
114
|
+
# @return [Symbol, :choice]
|
|
115
|
+
required :type, const: :choice
|
|
116
|
+
|
|
117
|
+
# @!attribute name
|
|
118
|
+
#
|
|
119
|
+
# @return [String, nil]
|
|
120
|
+
optional :name, String
|
|
121
|
+
|
|
122
|
+
# @!method initialize(choices:, instructions:, name: nil, type: :choice)
|
|
123
|
+
# Choose from the supplied options based on the input.
|
|
124
|
+
#
|
|
125
|
+
# @param choices [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Choice>]
|
|
126
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
127
|
+
#
|
|
128
|
+
# @param instructions [String]
|
|
129
|
+
#
|
|
130
|
+
# @param name [String]
|
|
131
|
+
#
|
|
132
|
+
# @param type [Symbol, :choice]
|
|
133
|
+
# The type of the object. Always `choice`.
|
|
134
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
135
|
+
# @!attribute value
|
|
136
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
137
|
+
#
|
|
138
|
+
# @return [String, Boolean]
|
|
139
|
+
required(
|
|
140
|
+
:value,
|
|
141
|
+
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Choice::Choice::Value }
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
# @!attribute description
|
|
145
|
+
#
|
|
146
|
+
# @return [String, nil]
|
|
147
|
+
optional :description, String
|
|
148
|
+
|
|
149
|
+
# @!method initialize(value:, description: nil)
|
|
150
|
+
# @param value [String, Boolean]
|
|
151
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
152
|
+
#
|
|
153
|
+
# @param description [String]
|
|
154
|
+
|
|
155
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
156
|
+
#
|
|
157
|
+
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Choice#value
|
|
158
|
+
module Value
|
|
159
|
+
extend OpenAI::Internal::Type::Union
|
|
160
|
+
|
|
161
|
+
variant String
|
|
162
|
+
|
|
163
|
+
variant OpenAI::Internal::Type::Boolean
|
|
164
|
+
|
|
165
|
+
# @!method self.variants
|
|
166
|
+
# @return [Array(String, Boolean)]
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
class Score < OpenAI::Internal::Type::BaseModel
|
|
172
|
+
# @!attribute instructions
|
|
173
|
+
#
|
|
174
|
+
# @return [String]
|
|
175
|
+
required :instructions, String
|
|
176
|
+
|
|
177
|
+
# @!attribute levels
|
|
178
|
+
#
|
|
179
|
+
# @return [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score::Level>]
|
|
180
|
+
required(
|
|
181
|
+
:levels,
|
|
182
|
+
-> {
|
|
183
|
+
OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionTrigger::Decisions::Question::Score::Level]
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
# @!attribute type
|
|
188
|
+
# The type of the object. Always `score`.
|
|
189
|
+
#
|
|
190
|
+
# @return [Symbol, :score]
|
|
191
|
+
required :type, const: :score
|
|
192
|
+
|
|
193
|
+
# @!attribute name
|
|
194
|
+
#
|
|
195
|
+
# @return [String, nil]
|
|
196
|
+
optional :name, String
|
|
197
|
+
|
|
198
|
+
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
199
|
+
# Rate the input against the supplied ordered levels.
|
|
200
|
+
#
|
|
201
|
+
# @param instructions [String]
|
|
202
|
+
#
|
|
203
|
+
# @param levels [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score::Level>]
|
|
204
|
+
#
|
|
205
|
+
# @param name [String]
|
|
206
|
+
#
|
|
207
|
+
# @param type [Symbol, :score]
|
|
208
|
+
# The type of the object. Always `score`.
|
|
209
|
+
class Level < OpenAI::Internal::Type::BaseModel
|
|
210
|
+
# @!attribute label
|
|
211
|
+
#
|
|
212
|
+
# @return [String]
|
|
213
|
+
required :label, String
|
|
214
|
+
|
|
215
|
+
# @!attribute description
|
|
216
|
+
#
|
|
217
|
+
# @return [String, nil]
|
|
218
|
+
optional :description, String
|
|
219
|
+
|
|
220
|
+
# @!method initialize(label:, description: nil)
|
|
221
|
+
# @param label [String]
|
|
222
|
+
# @param description [String]
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# @!method self.variants
|
|
227
|
+
# @return [Array(OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice, OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score)]
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @see OpenAI::Models::Live::DecisionTrigger#event_type
|
|
232
|
+
module EventType
|
|
233
|
+
extend OpenAI::Internal::Type::Enum
|
|
234
|
+
|
|
235
|
+
SESSION_INPUT_TRANSCRIPT_DELTA = :"session.input_transcript.delta"
|
|
236
|
+
SESSION_OUTPUT_TRANSCRIPT_DELTA = :"session.output_transcript.delta"
|
|
237
|
+
|
|
238
|
+
# @!method self.values
|
|
239
|
+
# @return [Array<Symbol>]
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class DecisionsDelegationConfig < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute model
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :model, String
|
|
11
|
+
|
|
12
|
+
# @!attribute questions
|
|
13
|
+
# Native Decision API questions evaluated together, in order.
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Predicate, OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice, OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score>]
|
|
16
|
+
required(
|
|
17
|
+
:questions,
|
|
18
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::DecisionsDelegationConfig::Question] }
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
# @!method initialize(model:, questions:)
|
|
22
|
+
# @param model [String]
|
|
23
|
+
#
|
|
24
|
+
# @param questions [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Predicate, OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice, OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score>]
|
|
25
|
+
# Native Decision API questions evaluated together, in order.
|
|
26
|
+
|
|
27
|
+
# A question about the request's input, with an optional correlation name.
|
|
28
|
+
module Question
|
|
29
|
+
extend OpenAI::Internal::Type::Union
|
|
30
|
+
|
|
31
|
+
discriminator :type
|
|
32
|
+
|
|
33
|
+
# Estimate how likely it is that a statement about the input is true.
|
|
34
|
+
variant :predicate, -> { OpenAI::Live::DecisionsDelegationConfig::Question::Predicate }
|
|
35
|
+
|
|
36
|
+
# Choose from the supplied options based on the input.
|
|
37
|
+
variant :choice, -> { OpenAI::Live::DecisionsDelegationConfig::Question::Choice }
|
|
38
|
+
|
|
39
|
+
# Rate the input against the supplied ordered levels.
|
|
40
|
+
variant :score, -> { OpenAI::Live::DecisionsDelegationConfig::Question::Score }
|
|
41
|
+
|
|
42
|
+
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
43
|
+
# @!attribute instructions
|
|
44
|
+
#
|
|
45
|
+
# @return [String]
|
|
46
|
+
required :instructions, String
|
|
47
|
+
|
|
48
|
+
# @!attribute type
|
|
49
|
+
# The type of the object. Always `predicate`.
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, :predicate]
|
|
52
|
+
required :type, const: :predicate
|
|
53
|
+
|
|
54
|
+
# @!attribute name
|
|
55
|
+
#
|
|
56
|
+
# @return [String, nil]
|
|
57
|
+
optional :name, String
|
|
58
|
+
|
|
59
|
+
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
60
|
+
# Estimate how likely it is that a statement about the input is true.
|
|
61
|
+
#
|
|
62
|
+
# @param instructions [String]
|
|
63
|
+
#
|
|
64
|
+
# @param name [String]
|
|
65
|
+
#
|
|
66
|
+
# @param type [Symbol, :predicate]
|
|
67
|
+
# The type of the object. Always `predicate`.
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
71
|
+
# @!attribute choices
|
|
72
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
73
|
+
#
|
|
74
|
+
# @return [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice::Choice>]
|
|
75
|
+
required(
|
|
76
|
+
:choices,
|
|
77
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Choice] }
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# @!attribute instructions
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :instructions, String
|
|
84
|
+
|
|
85
|
+
# @!attribute type
|
|
86
|
+
# The type of the object. Always `choice`.
|
|
87
|
+
#
|
|
88
|
+
# @return [Symbol, :choice]
|
|
89
|
+
required :type, const: :choice
|
|
90
|
+
|
|
91
|
+
# @!attribute name
|
|
92
|
+
#
|
|
93
|
+
# @return [String, nil]
|
|
94
|
+
optional :name, String
|
|
95
|
+
|
|
96
|
+
# @!method initialize(choices:, instructions:, name: nil, type: :choice)
|
|
97
|
+
# Choose from the supplied options based on the input.
|
|
98
|
+
#
|
|
99
|
+
# @param choices [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice::Choice>]
|
|
100
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
101
|
+
#
|
|
102
|
+
# @param instructions [String]
|
|
103
|
+
#
|
|
104
|
+
# @param name [String]
|
|
105
|
+
#
|
|
106
|
+
# @param type [Symbol, :choice]
|
|
107
|
+
# The type of the object. Always `choice`.
|
|
108
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
109
|
+
# @!attribute value
|
|
110
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
111
|
+
#
|
|
112
|
+
# @return [String, Boolean]
|
|
113
|
+
required :value, union: -> { OpenAI::Live::DecisionsDelegationConfig::Question::Choice::Choice::Value }
|
|
114
|
+
|
|
115
|
+
# @!attribute description
|
|
116
|
+
#
|
|
117
|
+
# @return [String, nil]
|
|
118
|
+
optional :description, String
|
|
119
|
+
|
|
120
|
+
# @!method initialize(value:, description: nil)
|
|
121
|
+
# @param value [String, Boolean]
|
|
122
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
123
|
+
#
|
|
124
|
+
# @param description [String]
|
|
125
|
+
|
|
126
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
127
|
+
#
|
|
128
|
+
# @see OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice::Choice#value
|
|
129
|
+
module Value
|
|
130
|
+
extend OpenAI::Internal::Type::Union
|
|
131
|
+
|
|
132
|
+
variant String
|
|
133
|
+
|
|
134
|
+
variant OpenAI::Internal::Type::Boolean
|
|
135
|
+
|
|
136
|
+
# @!method self.variants
|
|
137
|
+
# @return [Array(String, Boolean)]
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
class Score < OpenAI::Internal::Type::BaseModel
|
|
143
|
+
# @!attribute instructions
|
|
144
|
+
#
|
|
145
|
+
# @return [String]
|
|
146
|
+
required :instructions, String
|
|
147
|
+
|
|
148
|
+
# @!attribute levels
|
|
149
|
+
#
|
|
150
|
+
# @return [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score::Level>]
|
|
151
|
+
required(
|
|
152
|
+
:levels,
|
|
153
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionsDelegationConfig::Question::Score::Level] }
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
# @!attribute type
|
|
157
|
+
# The type of the object. Always `score`.
|
|
158
|
+
#
|
|
159
|
+
# @return [Symbol, :score]
|
|
160
|
+
required :type, const: :score
|
|
161
|
+
|
|
162
|
+
# @!attribute name
|
|
163
|
+
#
|
|
164
|
+
# @return [String, nil]
|
|
165
|
+
optional :name, String
|
|
166
|
+
|
|
167
|
+
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
168
|
+
# Rate the input against the supplied ordered levels.
|
|
169
|
+
#
|
|
170
|
+
# @param instructions [String]
|
|
171
|
+
#
|
|
172
|
+
# @param levels [Array<OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score::Level>]
|
|
173
|
+
#
|
|
174
|
+
# @param name [String]
|
|
175
|
+
#
|
|
176
|
+
# @param type [Symbol, :score]
|
|
177
|
+
# The type of the object. Always `score`.
|
|
178
|
+
class Level < OpenAI::Internal::Type::BaseModel
|
|
179
|
+
# @!attribute label
|
|
180
|
+
#
|
|
181
|
+
# @return [String]
|
|
182
|
+
required :label, String
|
|
183
|
+
|
|
184
|
+
# @!attribute description
|
|
185
|
+
#
|
|
186
|
+
# @return [String, nil]
|
|
187
|
+
optional :description, String
|
|
188
|
+
|
|
189
|
+
# @!method initialize(label:, description: nil)
|
|
190
|
+
# @param label [String]
|
|
191
|
+
# @param description [String]
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# @!method self.variants
|
|
196
|
+
# @return [Array(OpenAI::Models::Live::DecisionsDelegationConfig::Question::Predicate, OpenAI::Models::Live::DecisionsDelegationConfig::Question::Choice, OpenAI::Models::Live::DecisionsDelegationConfig::Question::Score)]
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Live
|
|
6
|
+
class DecisionsDelegationUpdateConfig < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute model
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :model, String
|
|
11
|
+
|
|
12
|
+
# @!attribute questions
|
|
13
|
+
# Native Decision API questions evaluated together, in order.
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Predicate, OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice, OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score>, nil]
|
|
16
|
+
optional(
|
|
17
|
+
:questions,
|
|
18
|
+
-> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Live::DecisionsDelegationUpdateConfig::Question] }
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
# @!method initialize(model: nil, questions: nil)
|
|
22
|
+
# @param model [String]
|
|
23
|
+
#
|
|
24
|
+
# @param questions [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Predicate, OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice, OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score>]
|
|
25
|
+
# Native Decision API questions evaluated together, in order.
|
|
26
|
+
|
|
27
|
+
# A question about the request's input, with an optional correlation name.
|
|
28
|
+
module Question
|
|
29
|
+
extend OpenAI::Internal::Type::Union
|
|
30
|
+
|
|
31
|
+
discriminator :type
|
|
32
|
+
|
|
33
|
+
# Estimate how likely it is that a statement about the input is true.
|
|
34
|
+
variant :predicate, -> { OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Predicate }
|
|
35
|
+
|
|
36
|
+
# Choose from the supplied options based on the input.
|
|
37
|
+
variant :choice, -> { OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice }
|
|
38
|
+
|
|
39
|
+
# Rate the input against the supplied ordered levels.
|
|
40
|
+
variant :score, -> { OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score }
|
|
41
|
+
|
|
42
|
+
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
43
|
+
# @!attribute instructions
|
|
44
|
+
#
|
|
45
|
+
# @return [String]
|
|
46
|
+
required :instructions, String
|
|
47
|
+
|
|
48
|
+
# @!attribute type
|
|
49
|
+
# The type of the object. Always `predicate`.
|
|
50
|
+
#
|
|
51
|
+
# @return [Symbol, :predicate]
|
|
52
|
+
required :type, const: :predicate
|
|
53
|
+
|
|
54
|
+
# @!attribute name
|
|
55
|
+
#
|
|
56
|
+
# @return [String, nil]
|
|
57
|
+
optional :name, String
|
|
58
|
+
|
|
59
|
+
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
60
|
+
# Estimate how likely it is that a statement about the input is true.
|
|
61
|
+
#
|
|
62
|
+
# @param instructions [String]
|
|
63
|
+
#
|
|
64
|
+
# @param name [String]
|
|
65
|
+
#
|
|
66
|
+
# @param type [Symbol, :predicate]
|
|
67
|
+
# The type of the object. Always `predicate`.
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
71
|
+
# @!attribute choices
|
|
72
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
73
|
+
#
|
|
74
|
+
# @return [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice>]
|
|
75
|
+
required(
|
|
76
|
+
:choices,
|
|
77
|
+
-> {
|
|
78
|
+
OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# @!attribute instructions
|
|
83
|
+
#
|
|
84
|
+
# @return [String]
|
|
85
|
+
required :instructions, String
|
|
86
|
+
|
|
87
|
+
# @!attribute type
|
|
88
|
+
# The type of the object. Always `choice`.
|
|
89
|
+
#
|
|
90
|
+
# @return [Symbol, :choice]
|
|
91
|
+
required :type, const: :choice
|
|
92
|
+
|
|
93
|
+
# @!attribute name
|
|
94
|
+
#
|
|
95
|
+
# @return [String, nil]
|
|
96
|
+
optional :name, String
|
|
97
|
+
|
|
98
|
+
# @!method initialize(choices:, instructions:, name: nil, type: :choice)
|
|
99
|
+
# Choose from the supplied options based on the input.
|
|
100
|
+
#
|
|
101
|
+
# @param choices [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice>]
|
|
102
|
+
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
103
|
+
#
|
|
104
|
+
# @param instructions [String]
|
|
105
|
+
#
|
|
106
|
+
# @param name [String]
|
|
107
|
+
#
|
|
108
|
+
# @param type [Symbol, :choice]
|
|
109
|
+
# The type of the object. Always `choice`.
|
|
110
|
+
class Choice < OpenAI::Internal::Type::BaseModel
|
|
111
|
+
# @!attribute value
|
|
112
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
113
|
+
#
|
|
114
|
+
# @return [String, Boolean]
|
|
115
|
+
required(
|
|
116
|
+
:value,
|
|
117
|
+
union: -> { OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice::Value }
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
# @!attribute description
|
|
121
|
+
#
|
|
122
|
+
# @return [String, nil]
|
|
123
|
+
optional :description, String
|
|
124
|
+
|
|
125
|
+
# @!method initialize(value:, description: nil)
|
|
126
|
+
# @param value [String, Boolean]
|
|
127
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
128
|
+
#
|
|
129
|
+
# @param description [String]
|
|
130
|
+
|
|
131
|
+
# Choice values are typed: a string and a boolean with the same text are distinct.
|
|
132
|
+
#
|
|
133
|
+
# @see OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice::Choice#value
|
|
134
|
+
module Value
|
|
135
|
+
extend OpenAI::Internal::Type::Union
|
|
136
|
+
|
|
137
|
+
variant String
|
|
138
|
+
|
|
139
|
+
variant OpenAI::Internal::Type::Boolean
|
|
140
|
+
|
|
141
|
+
# @!method self.variants
|
|
142
|
+
# @return [Array(String, Boolean)]
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
class Score < OpenAI::Internal::Type::BaseModel
|
|
148
|
+
# @!attribute instructions
|
|
149
|
+
#
|
|
150
|
+
# @return [String]
|
|
151
|
+
required :instructions, String
|
|
152
|
+
|
|
153
|
+
# @!attribute levels
|
|
154
|
+
#
|
|
155
|
+
# @return [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score::Level>]
|
|
156
|
+
required(
|
|
157
|
+
:levels,
|
|
158
|
+
-> {
|
|
159
|
+
OpenAI::Internal::Type::ArrayOf[OpenAI::Live::DecisionsDelegationUpdateConfig::Question::Score::Level]
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
# @!attribute type
|
|
164
|
+
# The type of the object. Always `score`.
|
|
165
|
+
#
|
|
166
|
+
# @return [Symbol, :score]
|
|
167
|
+
required :type, const: :score
|
|
168
|
+
|
|
169
|
+
# @!attribute name
|
|
170
|
+
#
|
|
171
|
+
# @return [String, nil]
|
|
172
|
+
optional :name, String
|
|
173
|
+
|
|
174
|
+
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
175
|
+
# Rate the input against the supplied ordered levels.
|
|
176
|
+
#
|
|
177
|
+
# @param instructions [String]
|
|
178
|
+
#
|
|
179
|
+
# @param levels [Array<OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score::Level>]
|
|
180
|
+
#
|
|
181
|
+
# @param name [String]
|
|
182
|
+
#
|
|
183
|
+
# @param type [Symbol, :score]
|
|
184
|
+
# The type of the object. Always `score`.
|
|
185
|
+
class Level < OpenAI::Internal::Type::BaseModel
|
|
186
|
+
# @!attribute label
|
|
187
|
+
#
|
|
188
|
+
# @return [String]
|
|
189
|
+
required :label, String
|
|
190
|
+
|
|
191
|
+
# @!attribute description
|
|
192
|
+
#
|
|
193
|
+
# @return [String, nil]
|
|
194
|
+
optional :description, String
|
|
195
|
+
|
|
196
|
+
# @!method initialize(label:, description: nil)
|
|
197
|
+
# @param label [String]
|
|
198
|
+
# @param description [String]
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# @!method self.variants
|
|
203
|
+
# @return [Array(OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Predicate, OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Choice, OpenAI::Models::Live::DecisionsDelegationUpdateConfig::Question::Score)]
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|