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
|
@@ -44,6 +44,7 @@ module OpenAI
|
|
|
44
44
|
agent_id: String,
|
|
45
45
|
input: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Input::Variants),
|
|
46
46
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
47
|
+
spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
|
|
47
48
|
vault_ids: T.nilable(T::Array[String]),
|
|
48
49
|
stream: T.noreturn,
|
|
49
50
|
request_options: OpenAI::RequestOptions::OrHash
|
|
@@ -67,6 +68,9 @@ module OpenAI
|
|
|
67
68
|
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
68
69
|
# characters. Omission or null defaults to an empty map.
|
|
69
70
|
metadata: nil,
|
|
71
|
+
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
72
|
+
# session.
|
|
73
|
+
spend_control: nil,
|
|
70
74
|
# The IDs of vaults made available to the session.
|
|
71
75
|
vault_ids: nil,
|
|
72
76
|
# There is no need to provide `stream:`. Instead, use `#create_streaming` or
|
|
@@ -95,6 +99,7 @@ module OpenAI
|
|
|
95
99
|
output_type: T.nilable(T.class_of(OpenAI::Helpers::StructuredOutput::BaseModel)),
|
|
96
100
|
input: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Input::Variants),
|
|
97
101
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
102
|
+
spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
|
|
98
103
|
vault_ids: T.nilable(T::Array[String]),
|
|
99
104
|
stream: T.noreturn,
|
|
100
105
|
request_options: OpenAI::RequestOptions::OrHash
|
|
@@ -120,6 +125,9 @@ module OpenAI
|
|
|
120
125
|
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
121
126
|
# characters. Omission or null defaults to an empty map.
|
|
122
127
|
metadata: nil,
|
|
128
|
+
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
129
|
+
# session.
|
|
130
|
+
spend_control: nil,
|
|
123
131
|
# The IDs of vaults made available to the session.
|
|
124
132
|
vault_ids: nil,
|
|
125
133
|
# There is no need to provide `stream:`. Instead, use `#create_streaming` or
|
|
@@ -151,6 +159,7 @@ module OpenAI
|
|
|
151
159
|
session_id: String,
|
|
152
160
|
agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent::OrHash,
|
|
153
161
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
162
|
+
spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl::OrHash),
|
|
154
163
|
request_options: OpenAI::RequestOptions::OrHash
|
|
155
164
|
)
|
|
156
165
|
.returns(OpenAI::Beta::AgentSession)
|
|
@@ -164,6 +173,9 @@ module OpenAI
|
|
|
164
173
|
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
165
174
|
# characters.
|
|
166
175
|
metadata: nil,
|
|
176
|
+
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
177
|
+
# spend.
|
|
178
|
+
spend_control: nil,
|
|
167
179
|
request_options: {}
|
|
168
180
|
)
|
|
169
181
|
end
|
|
@@ -175,7 +187,7 @@ module OpenAI
|
|
|
175
187
|
params(
|
|
176
188
|
after: String,
|
|
177
189
|
agent_id: String,
|
|
178
|
-
limit:
|
|
190
|
+
limit: Integer,
|
|
179
191
|
order: OpenAI::Beta::Agents::SessionListParams::Order::OrSymbol,
|
|
180
192
|
request_options: OpenAI::RequestOptions::OrHash
|
|
181
193
|
)
|
|
@@ -187,10 +199,9 @@ module OpenAI
|
|
|
187
199
|
# Only return sessions whose root agent has this ID. Omit to return sessions for
|
|
188
200
|
# all agents.
|
|
189
201
|
agent_id: nil,
|
|
190
|
-
# The maximum number of resources to return.
|
|
202
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
191
203
|
limit: nil,
|
|
192
|
-
#
|
|
193
|
-
# `desc` for descending order. Defaults to `desc`.
|
|
204
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
194
205
|
order: nil,
|
|
195
206
|
request_options: {}
|
|
196
207
|
)
|
|
@@ -98,7 +98,8 @@ module OpenAI
|
|
|
98
98
|
params(
|
|
99
99
|
vault_id: String,
|
|
100
100
|
after: String,
|
|
101
|
-
limit:
|
|
101
|
+
limit: Integer,
|
|
102
|
+
metadata: T::Hash[Symbol, String],
|
|
102
103
|
order: OpenAI::Beta::Agents::Vaults::CredentialListParams::Order::OrSymbol,
|
|
103
104
|
status: T.any(
|
|
104
105
|
OpenAI::Beta::Agents::VaultStatus::OrSymbol,
|
|
@@ -113,11 +114,14 @@ module OpenAI
|
|
|
113
114
|
vault_id,
|
|
114
115
|
# Return resources after this resource ID in the selected order.
|
|
115
116
|
after: nil,
|
|
116
|
-
# The maximum number of resources to return. Defaults to 20.
|
|
117
|
-
# between 1 and 100.
|
|
117
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
118
118
|
limit: nil,
|
|
119
|
-
#
|
|
120
|
-
#
|
|
119
|
+
# Exact string matches supplied as `metadata[key]=value`. All supplied pairs must
|
|
120
|
+
# match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512
|
|
121
|
+
# characters. Filtering is eventually consistent; metadata changes may take time
|
|
122
|
+
# to appear.
|
|
123
|
+
metadata: nil,
|
|
124
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
121
125
|
order: nil,
|
|
122
126
|
# Filter by one status or a list, such as `status=active` or
|
|
123
127
|
# `status[]=active&status[]=archived`. Both statuses are included by default.
|
|
@@ -47,12 +47,38 @@ module OpenAI
|
|
|
47
47
|
)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
# Updates the name or metadata of an active vault. Omitted fields remain
|
|
51
|
+
# unchanged. See
|
|
52
|
+
# [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).
|
|
53
|
+
sig {
|
|
54
|
+
params(
|
|
55
|
+
vault_id: String,
|
|
56
|
+
metadata: T::Hash[Symbol, String],
|
|
57
|
+
name: T.nilable(String),
|
|
58
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
59
|
+
)
|
|
60
|
+
.returns(OpenAI::Beta::Agents::Vault)
|
|
61
|
+
}
|
|
62
|
+
def update(
|
|
63
|
+
# The ID of the vault.
|
|
64
|
+
vault_id,
|
|
65
|
+
# Replaces all metadata. Omit to leave unchanged, or pass {} to clear it. Up to 16
|
|
66
|
+
# string key-value pairs, with keys up to 64 and values up to 512 characters.
|
|
67
|
+
metadata: nil,
|
|
68
|
+
# A replacement name. Omit to leave unchanged, or pass null to clear it. The name
|
|
69
|
+
# is trimmed before storage. It must contain 1 to 256 UTF-8 bytes after trimming.
|
|
70
|
+
name: nil,
|
|
71
|
+
request_options: {}
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
50
75
|
# Lists vaults using ID-based pagination. See
|
|
51
76
|
# [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).
|
|
52
77
|
sig {
|
|
53
78
|
params(
|
|
54
79
|
after: String,
|
|
55
|
-
limit:
|
|
80
|
+
limit: Integer,
|
|
81
|
+
metadata: T::Hash[Symbol, String],
|
|
56
82
|
order: OpenAI::Beta::Agents::VaultListParams::Order::OrSymbol,
|
|
57
83
|
status: T.any(
|
|
58
84
|
OpenAI::Beta::Agents::VaultStatus::OrSymbol,
|
|
@@ -65,11 +91,14 @@ module OpenAI
|
|
|
65
91
|
def list(
|
|
66
92
|
# Return resources after this resource ID in the selected order.
|
|
67
93
|
after: nil,
|
|
68
|
-
# The maximum number of resources to return. Defaults to 20.
|
|
69
|
-
# between 1 and 100.
|
|
94
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
70
95
|
limit: nil,
|
|
71
|
-
#
|
|
72
|
-
#
|
|
96
|
+
# Exact string matches supplied as `metadata[key]=value`. All supplied pairs must
|
|
97
|
+
# match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512
|
|
98
|
+
# characters. Filtering is eventually consistent; metadata changes may take time
|
|
99
|
+
# to appear.
|
|
100
|
+
metadata: nil,
|
|
101
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
73
102
|
order: nil,
|
|
74
103
|
# Filter by one status or a list, such as `status=active` or
|
|
75
104
|
# `status[]=active&status[]=archived`. Both statuses are included by default.
|
|
@@ -65,7 +65,8 @@ module OpenAI
|
|
|
65
65
|
# Configuration for generated text. Defaults to the `text` format and medium
|
|
66
66
|
# verbosity.
|
|
67
67
|
text: nil,
|
|
68
|
-
# Tools available to the agent. Defaults to an empty list.
|
|
68
|
+
# Tools available to the agent. Defaults to an empty list. The tool list must fit
|
|
69
|
+
# within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.
|
|
69
70
|
tools: nil,
|
|
70
71
|
request_options: {}
|
|
71
72
|
)
|
|
@@ -133,7 +134,8 @@ module OpenAI
|
|
|
133
134
|
service_tier: nil,
|
|
134
135
|
# Configuration for text generated by the agent.
|
|
135
136
|
text: nil,
|
|
136
|
-
#
|
|
137
|
+
# Replaces the tool list. Omit to leave it unchanged, or pass null to clear it.
|
|
138
|
+
# The replacement must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.
|
|
137
139
|
tools: nil,
|
|
138
140
|
request_options: {}
|
|
139
141
|
)
|
|
@@ -144,7 +146,7 @@ module OpenAI
|
|
|
144
146
|
sig {
|
|
145
147
|
params(
|
|
146
148
|
after: String,
|
|
147
|
-
limit:
|
|
149
|
+
limit: Integer,
|
|
148
150
|
order: OpenAI::Beta::AgentListParams::Order::OrSymbol,
|
|
149
151
|
request_options: OpenAI::RequestOptions::OrHash
|
|
150
152
|
)
|
|
@@ -153,7 +155,7 @@ module OpenAI
|
|
|
153
155
|
def list(
|
|
154
156
|
# Return resources after this resource ID in the selected order.
|
|
155
157
|
after: nil,
|
|
156
|
-
# The maximum number of resources to return.
|
|
158
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
157
159
|
limit: nil,
|
|
158
160
|
# The order in which resources are returned. Defaults to `desc`.
|
|
159
161
|
order: nil,
|
|
@@ -222,7 +222,7 @@ module OpenAI
|
|
|
222
222
|
reasoning: nil,
|
|
223
223
|
# Body param: A stable identifier used to help detect users of your application
|
|
224
224
|
# that may be violating OpenAI's usage policies. The IDs should be a string that
|
|
225
|
-
# uniquely identifies each user, with a maximum length of
|
|
225
|
+
# uniquely identifies each user, with a maximum length of 128 characters. We
|
|
226
226
|
# recommend hashing their username or email address, in order to avoid sending us
|
|
227
227
|
# any identifying information.
|
|
228
228
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -544,7 +544,7 @@ module OpenAI
|
|
|
544
544
|
reasoning: nil,
|
|
545
545
|
# Body param: A stable identifier used to help detect users of your application
|
|
546
546
|
# that may be violating OpenAI's usage policies. The IDs should be a string that
|
|
547
|
-
# uniquely identifies each user, with a maximum length of
|
|
547
|
+
# uniquely identifies each user, with a maximum length of 128 characters. We
|
|
548
548
|
# recommend hashing their username or email address, in order to avoid sending us
|
|
549
549
|
# any identifying information.
|
|
550
550
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -36,7 +36,7 @@ module OpenAI
|
|
|
36
36
|
#
|
|
37
37
|
# Returns a chat completion object, or a streamed sequence of chat completion
|
|
38
38
|
# chunk objects if the request is streamed.
|
|
39
|
-
sig
|
|
39
|
+
sig {
|
|
40
40
|
params(
|
|
41
41
|
messages: T::Array[
|
|
42
42
|
T.any(
|
|
@@ -72,10 +72,12 @@ module OpenAI
|
|
|
72
72
|
prompt_cache_retention: T.nilable(OpenAI::Chat::CompletionCreateParams::PromptCacheRetention::OrSymbol),
|
|
73
73
|
reasoning_effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol),
|
|
74
74
|
response_format: T.any(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
T.any(
|
|
76
|
+
OpenAI::ResponseFormatText::OrHash,
|
|
77
|
+
OpenAI::ResponseFormatJSONSchema::OrHash,
|
|
78
|
+
OpenAI::ResponseFormatJSONObject::OrHash
|
|
79
|
+
),
|
|
80
|
+
OpenAI::StructuredOutput::JsonSchemaConverter
|
|
79
81
|
),
|
|
80
82
|
safety_identifier: T.nilable(String),
|
|
81
83
|
seed: T.nilable(Integer),
|
|
@@ -92,9 +94,8 @@ module OpenAI
|
|
|
92
94
|
),
|
|
93
95
|
tools: T::Array[
|
|
94
96
|
T.any(
|
|
95
|
-
OpenAI::
|
|
96
|
-
OpenAI::
|
|
97
|
-
OpenAI::Chat::ChatCompletionCustomTool::OrHash
|
|
97
|
+
T.any(OpenAI::Chat::ChatCompletionFunctionTool::OrHash, OpenAI::Chat::ChatCompletionCustomTool::OrHash),
|
|
98
|
+
OpenAI::StructuredOutput::JsonSchemaConverter
|
|
98
99
|
)
|
|
99
100
|
],
|
|
100
101
|
top_logprobs: T.nilable(Integer),
|
|
@@ -106,7 +107,7 @@ module OpenAI
|
|
|
106
107
|
request_options: OpenAI::RequestOptions::OrHash
|
|
107
108
|
)
|
|
108
109
|
.returns(OpenAI::Chat::ChatCompletion)
|
|
109
|
-
|
|
110
|
+
}
|
|
110
111
|
def create(
|
|
111
112
|
# A list of messages comprising the conversation so far. Depending on the
|
|
112
113
|
# [model](https://developers.openai.com/api/docs/models) you use, different
|
|
@@ -263,7 +264,7 @@ module OpenAI
|
|
|
263
264
|
response_format: nil,
|
|
264
265
|
# A stable identifier used to help detect users of your application that may be
|
|
265
266
|
# violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
266
|
-
# identifies each user, with a maximum length of
|
|
267
|
+
# identifies each user, with a maximum length of 128 characters. We recommend
|
|
267
268
|
# hashing their username or email address, in order to avoid sending us any
|
|
268
269
|
# identifying information.
|
|
269
270
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -386,7 +387,7 @@ module OpenAI
|
|
|
386
387
|
#
|
|
387
388
|
# Returns a chat completion object, or a streamed sequence of chat completion
|
|
388
389
|
# chunk objects if the request is streamed.
|
|
389
|
-
sig
|
|
390
|
+
sig {
|
|
390
391
|
params(
|
|
391
392
|
messages: T::Array[
|
|
392
393
|
T.any(
|
|
@@ -451,7 +452,7 @@ module OpenAI
|
|
|
451
452
|
request_options: OpenAI::RequestOptions::OrHash
|
|
452
453
|
)
|
|
453
454
|
.returns(OpenAI::Internal::Stream[OpenAI::Chat::ChatCompletionChunk])
|
|
454
|
-
|
|
455
|
+
}
|
|
455
456
|
def stream_raw(
|
|
456
457
|
# A list of messages comprising the conversation so far. Depending on the
|
|
457
458
|
# [model](https://developers.openai.com/api/docs/models) you use, different
|
|
@@ -608,7 +609,7 @@ module OpenAI
|
|
|
608
609
|
response_format: nil,
|
|
609
610
|
# A stable identifier used to help detect users of your application that may be
|
|
610
611
|
# violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
611
|
-
# identifies each user, with a maximum length of
|
|
612
|
+
# identifies each user, with a maximum length of 128 characters. We recommend
|
|
612
613
|
# hashing their username or email address, in order to avoid sending us any
|
|
613
614
|
# identifying information.
|
|
614
615
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
@@ -711,13 +712,11 @@ module OpenAI
|
|
|
711
712
|
|
|
712
713
|
# Get a stored chat completion. Only Chat Completions that have been created with
|
|
713
714
|
# the `store` parameter set to `true` will be returned.
|
|
714
|
-
sig
|
|
715
|
-
params(
|
|
716
|
-
|
|
717
|
-
request_options: OpenAI::RequestOptions::OrHash
|
|
715
|
+
sig {
|
|
716
|
+
params(completion_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
717
|
+
OpenAI::Chat::ChatCompletion
|
|
718
718
|
)
|
|
719
|
-
|
|
720
|
-
end
|
|
719
|
+
}
|
|
721
720
|
def retrieve(
|
|
722
721
|
# The ID of the chat completion to retrieve.
|
|
723
722
|
completion_id,
|
|
@@ -728,14 +727,14 @@ module OpenAI
|
|
|
728
727
|
# Modify a stored chat completion. Only Chat Completions that have been created
|
|
729
728
|
# with the `store` parameter set to `true` can be modified. Currently, the only
|
|
730
729
|
# supported modification is to update the `metadata` field.
|
|
731
|
-
sig
|
|
730
|
+
sig {
|
|
732
731
|
params(
|
|
733
732
|
completion_id: String,
|
|
734
733
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
735
734
|
request_options: OpenAI::RequestOptions::OrHash
|
|
736
735
|
)
|
|
737
736
|
.returns(OpenAI::Chat::ChatCompletion)
|
|
738
|
-
|
|
737
|
+
}
|
|
739
738
|
def update(
|
|
740
739
|
# The ID of the chat completion to update.
|
|
741
740
|
completion_id,
|
|
@@ -752,7 +751,7 @@ module OpenAI
|
|
|
752
751
|
|
|
753
752
|
# List stored Chat Completions. Only Chat Completions that have been stored with
|
|
754
753
|
# the `store` parameter set to `true` will be returned.
|
|
755
|
-
sig
|
|
754
|
+
sig {
|
|
756
755
|
params(
|
|
757
756
|
after: String,
|
|
758
757
|
limit: Integer,
|
|
@@ -762,7 +761,7 @@ module OpenAI
|
|
|
762
761
|
request_options: OpenAI::RequestOptions::OrHash
|
|
763
762
|
)
|
|
764
763
|
.returns(OpenAI::Internal::CursorPage[OpenAI::Chat::ChatCompletion])
|
|
765
|
-
|
|
764
|
+
}
|
|
766
765
|
def list(
|
|
767
766
|
# Identifier for the last chat completion from the previous pagination request.
|
|
768
767
|
after: nil,
|
|
@@ -783,13 +782,11 @@ module OpenAI
|
|
|
783
782
|
|
|
784
783
|
# Delete a stored chat completion. Only Chat Completions that have been created
|
|
785
784
|
# with the `store` parameter set to `true` can be deleted.
|
|
786
|
-
sig
|
|
787
|
-
params(
|
|
788
|
-
|
|
789
|
-
request_options: OpenAI::RequestOptions::OrHash
|
|
785
|
+
sig {
|
|
786
|
+
params(completion_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
787
|
+
OpenAI::Chat::ChatCompletionDeleted
|
|
790
788
|
)
|
|
791
|
-
|
|
792
|
-
end
|
|
789
|
+
}
|
|
793
790
|
def delete(
|
|
794
791
|
# The ID of the chat completion to delete.
|
|
795
792
|
completion_id,
|
|
@@ -5,17 +5,8 @@ module OpenAI
|
|
|
5
5
|
|
|
6
6
|
class Decisions
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
# Supply input as a string or user messages containing text and inline images.
|
|
12
|
-
# Only user messages with `input_text` and `input_image` parts are supported;
|
|
13
|
-
# non-user roles, function calls, files, audio, and item references are not
|
|
14
|
-
# supported. Images require a data URL, not an external URL or file ID. At most
|
|
15
|
-
# 128 images are allowed across the request.
|
|
16
|
-
#
|
|
17
|
-
# Each question can return a refusal instead of a scored answer. A refusal has
|
|
18
|
-
# type `refusal` and the corresponding question name, or null if unnamed.
|
|
8
|
+
# Use this endpoint to quickly answer classification or scoring questions about
|
|
9
|
+
# some input. You can ask multiple questions in one request.
|
|
19
10
|
sig {
|
|
20
11
|
params(
|
|
21
12
|
input: OpenAI::DecisionCreateParams::Input::Variants,
|
|
@@ -33,12 +24,15 @@ module OpenAI
|
|
|
33
24
|
.returns(OpenAI::Decision)
|
|
34
25
|
}
|
|
35
26
|
def create(
|
|
36
|
-
#
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
27
|
+
# The text or images to evaluate for every question. Provide a text string or user
|
|
28
|
+
# messages containing text and images. Images can be base64 data URLs or publicly
|
|
29
|
+
# accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
|
|
30
|
+
# one request. Files, audio, tools, and item references are not supported.
|
|
40
31
|
input:,
|
|
32
|
+
# The model to use. Only `gpt-6-luna` is supported.
|
|
41
33
|
model:,
|
|
34
|
+
# Ask 1–200 questions about the input. Each question can be a predicate, choice,
|
|
35
|
+
# or score. Answers come back in the same order.
|
|
42
36
|
questions:,
|
|
43
37
|
# Opaque caller-provided end-user identifier, scoped by the verified org. Match
|
|
44
38
|
# Responses' limit; this is never the authenticated user identity.
|
|
@@ -126,24 +126,6 @@ module OpenAI
|
|
|
126
126
|
)
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
# Wait for an uploaded file to finish processing.
|
|
130
|
-
sig do
|
|
131
|
-
params(
|
|
132
|
-
file_id: String,
|
|
133
|
-
poll_interval: T.nilable(T.any(Integer, Float)),
|
|
134
|
-
timeout: T.nilable(T.any(Integer, Float)),
|
|
135
|
-
request_options: OpenAI::RequestOptions::OrHash
|
|
136
|
-
)
|
|
137
|
-
.returns(OpenAI::FileObject)
|
|
138
|
-
end
|
|
139
|
-
def wait_for_processing(
|
|
140
|
-
file_id,
|
|
141
|
-
poll_interval: nil,
|
|
142
|
-
timeout: OpenAI::Internal::Poller::DEFAULT_TIMEOUT,
|
|
143
|
-
request_options: {}
|
|
144
|
-
)
|
|
145
|
-
end
|
|
146
|
-
|
|
147
129
|
# @api private
|
|
148
130
|
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
149
131
|
def self.new(client:)
|
|
@@ -67,6 +67,7 @@ module OpenAI
|
|
|
67
67
|
partial_images: T.nilable(Integer),
|
|
68
68
|
quality: T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol),
|
|
69
69
|
response_format: T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol),
|
|
70
|
+
safety_identifier: T.nilable(String),
|
|
70
71
|
size: T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol)),
|
|
71
72
|
user: String,
|
|
72
73
|
stream: T.noreturn,
|
|
@@ -146,6 +147,13 @@ module OpenAI
|
|
|
146
147
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
147
148
|
# image models, which always return base64-encoded images.
|
|
148
149
|
response_format: nil,
|
|
150
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
151
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
152
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
153
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
154
|
+
# when available.
|
|
155
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
156
|
+
safety_identifier: nil,
|
|
149
157
|
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
150
158
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
151
159
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
@@ -158,8 +166,9 @@ module OpenAI
|
|
|
158
166
|
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
159
167
|
# models that allow automatic sizing.
|
|
160
168
|
size: nil,
|
|
161
|
-
#
|
|
162
|
-
# and
|
|
169
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
170
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
171
|
+
# empty.
|
|
163
172
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
164
173
|
user: nil,
|
|
165
174
|
# There is no need to provide `stream:`. Instead, use `#edit_stream_raw` or
|
|
@@ -187,6 +196,7 @@ module OpenAI
|
|
|
187
196
|
partial_images: T.nilable(Integer),
|
|
188
197
|
quality: T.nilable(OpenAI::ImageEditParams::Quality::OrSymbol),
|
|
189
198
|
response_format: T.nilable(OpenAI::ImageEditParams::ResponseFormat::OrSymbol),
|
|
199
|
+
safety_identifier: T.nilable(String),
|
|
190
200
|
size: T.nilable(T.any(String, OpenAI::ImageEditParams::Size::OrSymbol)),
|
|
191
201
|
user: String,
|
|
192
202
|
stream: T.noreturn,
|
|
@@ -266,6 +276,13 @@ module OpenAI
|
|
|
266
276
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
267
277
|
# image models, which always return base64-encoded images.
|
|
268
278
|
response_format: nil,
|
|
279
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
280
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
281
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
282
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
283
|
+
# when available.
|
|
284
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
285
|
+
safety_identifier: nil,
|
|
269
286
|
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
270
287
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
271
288
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
@@ -278,8 +295,9 @@ module OpenAI
|
|
|
278
295
|
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
279
296
|
# models that allow automatic sizing.
|
|
280
297
|
size: nil,
|
|
281
|
-
#
|
|
282
|
-
# and
|
|
298
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
299
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
300
|
+
# empty.
|
|
283
301
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
284
302
|
user: nil,
|
|
285
303
|
# There is no need to provide `stream:`. Instead, use `#edit_stream_raw` or
|
|
@@ -305,6 +323,7 @@ module OpenAI
|
|
|
305
323
|
partial_images: T.nilable(Integer),
|
|
306
324
|
quality: T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol),
|
|
307
325
|
response_format: T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol),
|
|
326
|
+
safety_identifier: T.nilable(String),
|
|
308
327
|
size: T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)),
|
|
309
328
|
style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
|
|
310
329
|
user: String,
|
|
@@ -364,6 +383,13 @@ module OpenAI
|
|
|
364
383
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
365
384
|
# image models, which always return base64-encoded images.
|
|
366
385
|
response_format: nil,
|
|
386
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
387
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
388
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
389
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
390
|
+
# when available.
|
|
391
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
392
|
+
safety_identifier: nil,
|
|
367
393
|
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
368
394
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
369
395
|
# `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
@@ -378,8 +404,9 @@ module OpenAI
|
|
|
378
404
|
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
379
405
|
# models; describe the desired style in the prompt instead.
|
|
380
406
|
style: nil,
|
|
381
|
-
#
|
|
382
|
-
# and
|
|
407
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
408
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
409
|
+
# empty.
|
|
383
410
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
384
411
|
user: nil,
|
|
385
412
|
# There is no need to provide `stream:`. Instead, use `#generate_stream_raw` or
|
|
@@ -405,6 +432,7 @@ module OpenAI
|
|
|
405
432
|
partial_images: T.nilable(Integer),
|
|
406
433
|
quality: T.nilable(OpenAI::ImageGenerateParams::Quality::OrSymbol),
|
|
407
434
|
response_format: T.nilable(OpenAI::ImageGenerateParams::ResponseFormat::OrSymbol),
|
|
435
|
+
safety_identifier: T.nilable(String),
|
|
408
436
|
size: T.nilable(T.any(String, OpenAI::ImageGenerateParams::Size::OrSymbol)),
|
|
409
437
|
style: T.nilable(OpenAI::ImageGenerateParams::Style::OrSymbol),
|
|
410
438
|
user: String,
|
|
@@ -464,6 +492,13 @@ module OpenAI
|
|
|
464
492
|
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
465
493
|
# image models, which always return base64-encoded images.
|
|
466
494
|
response_format: nil,
|
|
495
|
+
# A stable identifier for an end user in your organization, used for safety
|
|
496
|
+
# monitoring and abuse detection. Hash a username or email address to avoid
|
|
497
|
+
# sending identifying information. A non-empty value takes precedence over the
|
|
498
|
+
# deprecated `user` parameter. If omitted, null, or empty, the API uses `user`
|
|
499
|
+
# when available.
|
|
500
|
+
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
501
|
+
safety_identifier: nil,
|
|
467
502
|
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
468
503
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
469
504
|
# `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
@@ -478,8 +513,9 @@ module OpenAI
|
|
|
478
513
|
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
479
514
|
# models; describe the desired style in the prompt instead.
|
|
480
515
|
style: nil,
|
|
481
|
-
#
|
|
482
|
-
# and
|
|
516
|
+
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
517
|
+
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
518
|
+
# empty.
|
|
483
519
|
# [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
484
520
|
user: nil,
|
|
485
521
|
# There is no need to provide `stream:`. Instead, use `#generate_stream_raw` or
|
|
@@ -7,6 +7,23 @@ module OpenAI
|
|
|
7
7
|
|
|
8
8
|
class Forks
|
|
9
9
|
|
|
10
|
+
include OpenAI::WebSocket::Resource
|
|
11
|
+
|
|
12
|
+
# @api private
|
|
13
|
+
sig { params(session_id: String, query: T::Hash[T.untyped, T.untyped]).returns(T::Hash[Symbol, T.untyped]) }
|
|
14
|
+
def __websocket_request(session_id, query: {})
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# @api private
|
|
18
|
+
sig { returns(T.untyped) }
|
|
19
|
+
def __websocket_client_event
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# @api private
|
|
23
|
+
sig { returns(T.untyped) }
|
|
24
|
+
def __websocket_server_event
|
|
25
|
+
end
|
|
26
|
+
|
|
10
27
|
# @api private
|
|
11
28
|
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
12
29
|
def self.new(client:)
|
|
@@ -7,6 +7,23 @@ module OpenAI
|
|
|
7
7
|
|
|
8
8
|
class Sideband
|
|
9
9
|
|
|
10
|
+
include OpenAI::WebSocket::Resource
|
|
11
|
+
|
|
12
|
+
# @api private
|
|
13
|
+
sig { params(session_id: String, query: T::Hash[T.untyped, T.untyped]).returns(T::Hash[Symbol, T.untyped]) }
|
|
14
|
+
def __websocket_request(session_id, query: {})
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# @api private
|
|
18
|
+
sig { returns(T.untyped) }
|
|
19
|
+
def __websocket_client_event
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# @api private
|
|
23
|
+
sig { returns(T.untyped) }
|
|
24
|
+
def __websocket_server_event
|
|
25
|
+
end
|
|
26
|
+
|
|
10
27
|
# @api private
|
|
11
28
|
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
12
29
|
def self.new(client:)
|
|
@@ -5,6 +5,23 @@ module OpenAI
|
|
|
5
5
|
|
|
6
6
|
class Live
|
|
7
7
|
|
|
8
|
+
include OpenAI::WebSocket::Resource
|
|
9
|
+
|
|
10
|
+
# @api private
|
|
11
|
+
sig { params(query: T::Hash[T.untyped, T.untyped]).returns(T::Hash[Symbol, T.untyped]) }
|
|
12
|
+
def __websocket_request(query: {})
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @api private
|
|
16
|
+
sig { returns(T.untyped) }
|
|
17
|
+
def __websocket_client_event
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @api private
|
|
21
|
+
sig { returns(T.untyped) }
|
|
22
|
+
def __websocket_server_event
|
|
23
|
+
end
|
|
24
|
+
|
|
8
25
|
sig { returns(OpenAI::Resources::Live::Sideband) }
|
|
9
26
|
attr_reader :sideband
|
|
10
27
|
|