openai 0.102.0 → 0.104.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +88 -0
- data/README.md +23 -1
- data/lib/openai/client.rb +3 -386
- data/lib/openai/helpers/admin/organization/projects/api_keys.rb +42 -0
- data/lib/openai/helpers/agents/session_stream_resource.rb +60 -0
- data/lib/openai/helpers/beta/agents/artifacts.rb +18 -0
- data/lib/openai/helpers/beta/agents/files.rb +41 -0
- data/lib/openai/helpers/client_runtime.rb +391 -0
- data/lib/openai/helpers/files.rb +47 -0
- data/lib/openai/helpers/live/websocket.rb +8 -57
- data/lib/openai/helpers/models/chat/parsed.rb +32 -0
- data/lib/openai/helpers/models/responses/parsed.rb +30 -0
- data/lib/openai/helpers/models/responses/response.rb +32 -0
- data/lib/openai/helpers/models/webhooks/webhook_endpoint_with_secret.rb +20 -0
- data/lib/openai/helpers/realtime/client_extension.rb +1 -2
- data/lib/openai/helpers/realtime/connection_manager.rb +1 -1
- data/lib/openai/helpers/realtime/translation.rb +7 -50
- data/lib/openai/helpers/responses_websocket/client_extension.rb +1 -2
- data/lib/openai/helpers/streaming/chat_completion_resource.rb +36 -0
- data/lib/openai/helpers/streaming/response_stream.rb +1 -16
- data/lib/openai/helpers/streaming/response_stream_resource.rb +78 -0
- data/lib/openai/helpers/vector_stores/file_batches.rb +188 -0
- data/lib/openai/helpers/vector_stores/files.rb +198 -0
- data/lib/openai/helpers/websocket/client_request.rb +31 -6
- data/lib/openai/helpers/websocket/connection.rb +58 -0
- data/lib/openai/helpers/websocket/connection_manager.rb +4 -2
- data/lib/openai/helpers/websocket/protocol.rb +2 -1
- data/lib/openai/helpers/websocket/resource.rb +54 -0
- data/lib/openai/helpers/websocket/typed_connection.rb +95 -0
- data/lib/openai/helpers/websocket.rb +4 -0
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +5 -3
- data/lib/openai/models/admin/organization/external_storage_configuration.rb +5 -3
- data/lib/openai/models/admin/organization/external_storage_create_params.rb +33 -3
- data/lib/openai/models/admin/organization/oci_external_storage_provider.rb +37 -0
- data/lib/openai/models/admin/organization/project_residency.rb +3 -0
- data/lib/openai/models/admin/organization/projects/api_key_update_params.rb +64 -0
- data/lib/openai/models/admin/organization/projects/api_key_update_scopes_params.rb +34 -0
- data/lib/openai/models/admin/organization/usage_decisions_params.rb +177 -0
- data/lib/openai/models/admin/organization/usage_decisions_response.rb +351 -0
- data/lib/openai/models/audio/speech_create_params.rb +6 -3
- data/lib/openai/models/audio/translation_create_response.rb +0 -1
- data/lib/openai/models/audio/voice.rb +17 -2
- data/lib/openai/models/audio/voice_create_params.rb +100 -3
- data/lib/openai/models/beta/agent_create_params.rb +4 -2
- data/lib/openai/models/beta/agent_list_params.rb +4 -4
- data/lib/openai/models/beta/agent_session.rb +37 -1
- data/lib/openai/models/beta/agent_session_environment_expired_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_environment_state.rb +6 -0
- data/lib/openai/models/beta/agent_session_environment_suspended_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_event.rb +7 -1
- data/lib/openai/models/beta/agent_update_params.rb +4 -2
- data/lib/openai/models/beta/agents/environment_info.rb +3 -0
- data/lib/openai/models/beta/agents/environment_list_params.rb +7 -7
- data/lib/openai/models/beta/agents/session_create_params.rb +39 -3
- data/lib/openai/models/beta/agents/session_list_params.rb +7 -10
- data/lib/openai/models/beta/agents/session_update_params.rb +33 -1
- data/lib/openai/models/beta/agents/sessions/artifact_list_params.rb +11 -11
- data/lib/openai/models/beta/agents/vault_list_params.rb +23 -13
- data/lib/openai/models/beta/agents/vault_status_filter.rb +1 -3
- data/lib/openai/models/beta/agents/vault_update_params.rb +47 -0
- data/lib/openai/models/beta/agents/vaults/credential_list_params.rb +23 -13
- data/lib/openai/models/beta/beta_response.rb +23 -2
- data/lib/openai/models/beta/beta_response_error.rb +19 -1
- data/lib/openai/models/beta/beta_response_input_item.rb +107 -1
- data/lib/openai/models/beta/beta_response_item.rb +107 -1
- data/lib/openai/models/beta/beta_response_output_item.rb +107 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +23 -2
- data/lib/openai/models/beta/response_compact_params.rb +21 -0
- data/lib/openai/models/beta/response_create_params.rb +23 -2
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +3 -3
- data/lib/openai/models/chat/chat_completion_message.rb +0 -8
- data/lib/openai/models/chat/chat_completion_message_function_tool_call.rb +0 -8
- data/lib/openai/models/chat/completion_create_params.rb +5 -12
- data/lib/openai/models/chat_model.rb +21 -0
- data/lib/openai/models/conversations/conversation_item.rb +107 -1
- data/lib/openai/models/decision.rb +17 -2
- data/lib/openai/models/decision_create_params.rb +29 -12
- data/lib/openai/models/decision_input_image.rb +4 -3
- data/lib/openai/models/decision_input_message.rb +4 -4
- data/lib/openai/models/decision_input_part.rb +3 -2
- data/lib/openai/models/image_edit_completed_event.rb +1 -2
- data/lib/openai/models/image_edit_partial_image_event.rb +1 -2
- data/lib/openai/models/image_gen_completed_event.rb +1 -2
- data/lib/openai/models/image_gen_partial_image_event.rb +1 -2
- data/lib/openai/models/images_response.rb +1 -2
- data/lib/openai/models/live/built_in_voice.rb +1 -0
- data/lib/openai/models/live/client_event.rb +14 -2
- data/lib/openai/models/live/decision_create_event.rb +26 -0
- data/lib/openai/models/live/decision_event.rb +117 -0
- data/lib/openai/models/live/decision_item_create_event.rb +194 -0
- data/lib/openai/models/live/decision_item_created_event.rb +202 -0
- data/lib/openai/models/live/decision_item_delete_event.rb +38 -0
- data/lib/openai/models/live/decision_item_deleted_event.rb +46 -0
- data/lib/openai/models/live/decision_trigger.rb +244 -0
- data/lib/openai/models/live/decisions_delegation_config.rb +201 -0
- data/lib/openai/models/live/decisions_delegation_update_config.rb +208 -0
- data/lib/openai/models/live/delegation_created_event.rb +10 -10
- data/lib/openai/models/live/fork_client_event.rb +14 -2
- data/lib/openai/models/live/fork_server_event.rb +17 -2
- data/lib/openai/models/live/media_session_config.rb +47 -11
- data/lib/openai/models/live/output_audio_fixture_play_event.rb +48 -0
- data/lib/openai/models/live/output_audio_fixture_played_event.rb +42 -0
- data/lib/openai/models/live/output_audio_fixture_playing_event.rb +41 -0
- data/lib/openai/models/live/server_event.rb +17 -2
- data/lib/openai/models/live/session_accept_params.rb +47 -11
- data/lib/openai/models/live/session_config.rb +47 -11
- data/lib/openai/models/live/session_resource.rb +47 -11
- data/lib/openai/models/live/session_update_config.rb +38 -6
- data/lib/openai/models/live/session_update_event.rb +8 -8
- data/lib/openai/models/live/sideband_client_event.rb +57 -0
- data/lib/openai/models/live/sideband_server_event.rb +78 -0
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +6 -3
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +6 -3
- data/lib/openai/models/realtime/realtime_response_status.rb +10 -1
- data/lib/openai/models/response_format_json_schema.rb +1 -1
- data/lib/openai/models/responses/function_tool.rb +8 -6
- data/lib/openai/models/responses/response.rb +2 -23
- data/lib/openai/models/responses/response_compact_params.rb +21 -0
- data/lib/openai/models/responses/response_create_params.rb +3 -6
- data/lib/openai/models/responses/response_error.rb +19 -1
- data/lib/openai/models/responses/response_format_text_config.rb +0 -4
- data/lib/openai/models/responses/response_function_tool_call.rb +0 -8
- data/lib/openai/models/responses/response_input_item.rb +107 -1
- data/lib/openai/models/responses/response_item.rb +107 -1
- data/lib/openai/models/responses/response_output_item.rb +107 -1
- data/lib/openai/models/responses/response_output_text.rb +0 -8
- data/lib/openai/models/responses/responses_client_event.rb +2 -2
- data/lib/openai/models/safety/safety_alert.rb +12 -1
- data/lib/openai/models/video_create_error.rb +19 -1
- data/lib/openai/models/webhooks/agent_environment_expired_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/agent_environment_suspended_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +8 -3
- data/lib/openai/models/webhooks/webhook_create_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_endpoint_with_secret.rb +0 -9
- data/lib/openai/models/webhooks/webhook_test_params.rb +2 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +2 -0
- data/lib/openai/resources/admin/organization/external_storage.rb +1 -1
- data/lib/openai/resources/admin/organization/projects/api_keys.rb +61 -0
- data/lib/openai/resources/admin/organization/usage.rb +67 -0
- data/lib/openai/resources/audio/speech.rb +2 -1
- data/lib/openai/resources/audio/voices.rb +10 -10
- data/lib/openai/resources/beta/agents/environments/files.rb +3 -31
- data/lib/openai/resources/beta/agents/environments.rb +3 -3
- data/lib/openai/resources/beta/agents/sessions/artifacts.rb +5 -11
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions.rb +20 -56
- data/lib/openai/resources/beta/agents/vaults/credentials.rb +10 -6
- data/lib/openai/resources/beta/agents/vaults.rb +45 -6
- data/lib/openai/resources/beta/agents.rb +6 -4
- data/lib/openai/resources/beta/responses.rb +2 -2
- data/lib/openai/resources/chat/completions.rb +11 -37
- data/lib/openai/resources/decisions.rb +9 -15
- data/lib/openai/resources/files.rb +0 -39
- data/lib/openai/resources/live/forks.rb +19 -0
- data/lib/openai/resources/live/sideband.rb +19 -0
- data/lib/openai/resources/live.rb +19 -0
- data/lib/openai/resources/realtime/translations.rb +19 -0
- data/lib/openai/resources/realtime.rb +19 -0
- data/lib/openai/resources/responses.rb +44 -95
- data/lib/openai/resources/vector_stores/file_batches.rb +0 -178
- data/lib/openai/resources/vector_stores/files.rb +0 -188
- data/lib/openai/resources/webhooks.rb +13 -29
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +35 -0
- data/rbi/openai/client.rbi +0 -103
- data/rbi/openai/helpers/admin/organization/projects/api_keys.rbi +25 -0
- data/rbi/openai/helpers/beta/agents/artifacts.rbi +25 -0
- data/rbi/openai/helpers/beta/agents/files.rbi +48 -0
- data/rbi/openai/helpers/client_runtime.rbi +108 -0
- data/rbi/openai/helpers/files.rbi +25 -0
- data/rbi/openai/helpers/models/chat/parsed.rbi +21 -0
- data/rbi/openai/helpers/models/responses/parsed.rbi +19 -0
- data/rbi/openai/helpers/models/responses/response.rbi +15 -0
- data/rbi/openai/helpers/streaming/response_stream.rbi +301 -0
- data/rbi/openai/helpers/vector_stores/file_batches.rbi +102 -0
- data/rbi/openai/helpers/vector_stores/files.rbi +122 -0
- data/rbi/openai/helpers/websocket.rbi +82 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +6 -3
- data/rbi/openai/models/admin/organization/external_storage_configuration.rbi +4 -2
- data/rbi/openai/models/admin/organization/external_storage_create_params.rbi +63 -4
- data/rbi/openai/models/admin/organization/oci_external_storage_provider.rbi +71 -0
- data/rbi/openai/models/admin/organization/project_residency.rbi +12 -0
- data/rbi/openai/models/admin/organization/projects/api_key_update_params.rbi +110 -0
- data/rbi/openai/models/admin/organization/projects/api_key_update_scopes_params.rbi +72 -0
- data/rbi/openai/models/admin/organization/usage_decisions_params.rbi +229 -0
- data/rbi/openai/models/admin/organization/usage_decisions_response.rbi +479 -0
- data/rbi/openai/models/audio/speech_create_params.rbi +6 -3
- data/rbi/openai/models/audio/voice.rbi +21 -2
- data/rbi/openai/models/audio/voice_create_params.rbi +149 -4
- data/rbi/openai/models/beta/agent_create_params.rbi +4 -2
- data/rbi/openai/models/beta/agent_list_params.rbi +8 -5
- data/rbi/openai/models/beta/agent_session.rbi +64 -1
- data/rbi/openai/models/beta/agent_session_environment_expired_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_environment_state.rbi +6 -0
- data/rbi/openai/models/beta/agent_session_environment_suspended_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_event.rbi +2 -0
- data/rbi/openai/models/beta/agent_update_params.rbi +4 -2
- data/rbi/openai/models/beta/agents/environment_info.rbi +3 -0
- data/rbi/openai/models/beta/agents/environment_list_params.rbi +7 -7
- data/rbi/openai/models/beta/agents/session_create_params.rbi +62 -2
- data/rbi/openai/models/beta/agents/session_list_params.rbi +11 -11
- data/rbi/openai/models/beta/agents/session_update_params.rbi +56 -0
- data/rbi/openai/models/beta/agents/sessions/artifact_list_params.rbi +19 -13
- data/rbi/openai/models/beta/agents/vault_list_params.rbi +30 -13
- data/rbi/openai/models/beta/agents/vault_status_filter.rbi +1 -3
- data/rbi/openai/models/beta/agents/vault_update_params.rbi +87 -0
- data/rbi/openai/models/beta/agents/vaults/credential_list_params.rbi +30 -13
- data/rbi/openai/models/beta/beta_response.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_error.rbi +24 -3
- data/rbi/openai/models/beta/beta_response_input_item.rbi +191 -0
- data/rbi/openai/models/beta/beta_response_item.rbi +189 -0
- data/rbi/openai/models/beta/beta_response_output_item.rbi +191 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +2 -2
- data/rbi/openai/models/beta/response_create_params.rbi +2 -2
- data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +3 -3
- data/rbi/openai/models/chat/chat_completion_message.rbi +0 -4
- data/rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi +0 -4
- data/rbi/openai/models/chat/completion_create_params.rbi +63 -78
- data/rbi/openai/models/conversations/conversation_item.rbi +191 -0
- data/rbi/openai/models/decision.rbi +14 -1
- data/rbi/openai/models/decision_create_params.rbi +23 -12
- data/rbi/openai/models/decision_input_image.rbi +4 -3
- data/rbi/openai/models/decision_input_message.rbi +4 -4
- data/rbi/openai/models/decision_input_part.rbi +2 -1
- data/rbi/openai/models/image_edit_completed_event.rbi +1 -0
- data/rbi/openai/models/image_edit_partial_image_event.rbi +1 -0
- data/rbi/openai/models/image_gen_completed_event.rbi +1 -0
- data/rbi/openai/models/image_gen_partial_image_event.rbi +1 -0
- data/rbi/openai/models/images_response.rbi +1 -0
- data/rbi/openai/models/live/built_in_voice.rbi +1 -0
- data/rbi/openai/models/live/client_event.rbi +4 -0
- data/rbi/openai/models/live/decision_create_event.rbi +55 -0
- data/rbi/openai/models/live/decision_event.rbi +185 -0
- data/rbi/openai/models/live/decision_item_create_event.rbi +338 -0
- data/rbi/openai/models/live/decision_item_created_event.rbi +354 -0
- data/rbi/openai/models/live/decision_item_delete_event.rbi +66 -0
- data/rbi/openai/models/live/decision_item_deleted_event.rbi +77 -0
- data/rbi/openai/models/live/decision_trigger.rbi +465 -0
- data/rbi/openai/models/live/decisions_delegation_config.rbi +393 -0
- data/rbi/openai/models/live/decisions_delegation_update_config.rbi +412 -0
- data/rbi/openai/models/live/delegation_created_event.rbi +8 -10
- data/rbi/openai/models/live/fork_client_event.rbi +4 -0
- data/rbi/openai/models/live/fork_server_event.rbi +5 -0
- data/rbi/openai/models/live/media_session_config.rbi +95 -14
- data/rbi/openai/models/live/output_audio_fixture_play_event.rbi +76 -0
- data/rbi/openai/models/live/output_audio_fixture_played_event.rbi +73 -0
- data/rbi/openai/models/live/output_audio_fixture_playing_event.rbi +72 -0
- data/rbi/openai/models/live/server_event.rbi +5 -0
- data/rbi/openai/models/live/session_accept_params.rbi +88 -12
- data/rbi/openai/models/live/session_config.rbi +100 -14
- data/rbi/openai/models/live/session_resource.rbi +81 -10
- data/rbi/openai/models/live/session_update_config.rbi +86 -9
- data/rbi/openai/models/live/session_update_event.rbi +8 -8
- data/rbi/openai/models/live/sideband_client_event.rbi +40 -0
- data/rbi/openai/models/live/sideband_server_event.rbi +47 -0
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +6 -3
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +6 -3
- data/rbi/openai/models/realtime/realtime_response_status.rbi +13 -1
- data/rbi/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbi +1 -1
- data/rbi/openai/models/realtime/realtime_translation_output_audio_delta_event.rbi +3 -3
- data/rbi/openai/models/realtime/realtime_translation_session_close_event.rbi +1 -1
- data/rbi/openai/models/realtime/realtime_translation_session_update_event.rbi +5 -1
- data/rbi/openai/models/responses/response.rbi +2 -7
- data/rbi/openai/models/responses/response_create_params.rbi +5 -9
- data/rbi/openai/models/responses/response_error.rbi +24 -3
- data/rbi/openai/models/responses/response_function_tool_call.rbi +0 -4
- data/rbi/openai/models/responses/response_function_web_search.rbi +21 -17
- data/rbi/openai/models/responses/response_input_item.rbi +191 -0
- data/rbi/openai/models/responses/response_item.rbi +189 -0
- data/rbi/openai/models/responses/response_output_item.rbi +191 -0
- data/rbi/openai/models/responses/response_output_text.rbi +0 -4
- data/rbi/openai/models/responses/responses_client_event.rbi +2 -2
- data/rbi/openai/models/safety/safety_alert.rbi +13 -1
- data/rbi/openai/models/video_create_error.rbi +24 -3
- data/rbi/openai/models/webhooks/agent_environment_expired_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/agent_environment_suspended_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +3 -2
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +8 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +8 -0
- data/rbi/openai/resources/admin/organization/external_storage.rbi +2 -1
- data/rbi/openai/resources/admin/organization/projects/api_keys.rbi +48 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +56 -0
- data/rbi/openai/resources/audio/speech.rbi +2 -1
- data/rbi/openai/resources/audio/voices.rbi +13 -10
- data/rbi/openai/resources/beta/agents/environments/files.rbi +3 -33
- data/rbi/openai/resources/beta/agents/environments.rbi +3 -3
- data/rbi/openai/resources/beta/agents/sessions/artifacts.rbi +5 -13
- data/rbi/openai/resources/beta/agents/sessions.rbi +15 -4
- data/rbi/openai/resources/beta/agents/vaults/credentials.rbi +9 -5
- data/rbi/openai/resources/beta/agents/vaults.rbi +34 -5
- data/rbi/openai/resources/beta/agents.rbi +6 -4
- data/rbi/openai/resources/beta/responses.rbi +2 -2
- data/rbi/openai/resources/chat/completions.rbi +26 -29
- data/rbi/openai/resources/decisions.rbi +9 -15
- data/rbi/openai/resources/files.rbi +0 -18
- data/rbi/openai/resources/live/forks.rbi +17 -0
- data/rbi/openai/resources/live/sideband.rbi +17 -0
- data/rbi/openai/resources/live.rbi +17 -0
- data/rbi/openai/resources/realtime/translations.rbi +17 -0
- data/rbi/openai/resources/realtime.rbi +17 -0
- data/rbi/openai/resources/responses.rbi +41 -333
- data/rbi/openai/resources/vector_stores/file_batches.rbi +0 -93
- data/rbi/openai/resources/vector_stores/files.rbi +0 -113
- data/rbi/openai/resources/webhooks.rbi +2 -0
- data/sig/openai/client.rbs +0 -50
- data/sig/openai/helpers/admin/organization/projects/api_keys.rbs +18 -0
- data/sig/openai/helpers/beta/agents/artifacts.rbs +17 -0
- data/sig/openai/helpers/beta/agents/files.rbs +30 -0
- data/sig/openai/helpers/client_runtime.rbs +53 -0
- data/sig/openai/helpers/files.rbs +12 -0
- data/sig/openai/helpers/models/responses/response.rbs +9 -0
- data/sig/openai/helpers/streaming/response_stream.rbs +37 -0
- data/sig/openai/helpers/vector_stores/file_batches.rbs +38 -0
- data/sig/openai/helpers/vector_stores/files.rbs +43 -0
- data/sig/openai/helpers/websocket.rbs +40 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +1 -0
- data/sig/openai/models/admin/organization/external_storage_configuration.rbs +1 -0
- data/sig/openai/models/admin/organization/external_storage_create_params.rbs +33 -0
- data/sig/openai/models/admin/organization/oci_external_storage_provider.rbs +34 -0
- data/sig/openai/models/admin/organization/project_residency.rbs +6 -0
- data/sig/openai/models/admin/organization/projects/api_key_update_params.rbs +77 -0
- data/sig/openai/models/admin/organization/projects/api_key_update_scopes_params.rbs +38 -0
- data/sig/openai/models/admin/organization/usage_decisions_params.rbs +170 -0
- data/sig/openai/models/admin/organization/usage_decisions_response.rbs +319 -0
- data/sig/openai/models/audio/speech_create_params.rbs +4 -2
- data/sig/openai/models/audio/voice.rbs +21 -3
- data/sig/openai/models/audio/voice_create_params.rbs +90 -1
- data/sig/openai/models/beta/agent_create_params.rbs +4 -2
- data/sig/openai/models/beta/agent_list_params.rbs +9 -6
- data/sig/openai/models/beta/agent_session.rbs +36 -2
- data/sig/openai/models/beta/agent_session_environment_expired_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_environment_state.rbs +14 -1
- data/sig/openai/models/beta/agent_session_environment_suspended_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_event.rbs +2 -0
- data/sig/openai/models/beta/agent_update_params.rbs +4 -2
- data/sig/openai/models/beta/agents/environment_info.rbs +11 -1
- data/sig/openai/models/beta/agents/environment_list_params.rbs +9 -9
- data/sig/openai/models/beta/agents/session_create_params.rbs +29 -2
- data/sig/openai/models/beta/agents/session_list_params.rbs +12 -12
- data/sig/openai/models/beta/agents/session_update_params.rbs +23 -0
- data/sig/openai/models/beta/agents/sessions/artifact_list_params.rbs +21 -15
- data/sig/openai/models/beta/agents/vault_list_params.rbs +32 -14
- data/sig/openai/models/beta/agents/vault_update_params.rbs +54 -0
- data/sig/openai/models/beta/agents/vaults/credential_list_params.rbs +32 -14
- data/sig/openai/models/beta/beta_response.rbs +2 -2
- data/sig/openai/models/beta/beta_response_error.rbs +19 -3
- data/sig/openai/models/beta/beta_response_input_item.rbs +110 -0
- data/sig/openai/models/beta/beta_response_item.rbs +110 -0
- data/sig/openai/models/beta/beta_response_output_item.rbs +110 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +2 -2
- data/sig/openai/models/beta/response_create_params.rbs +2 -2
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +2 -2
- data/sig/openai/models/chat/completion_create_params.rbs +2 -2
- data/sig/openai/models/conversations/conversation_item.rbs +110 -0
- data/sig/openai/models/decision.rbs +13 -0
- data/sig/openai/models/decision_create_params.rbs +19 -8
- data/sig/openai/models/decision_input_image.rbs +2 -2
- data/sig/openai/models/decision_input_message.rbs +2 -2
- data/sig/openai/models/live/built_in_voice.rbs +2 -0
- data/sig/openai/models/live/client_event.rbs +4 -0
- data/sig/openai/models/live/decision_create_event.rbs +18 -0
- data/sig/openai/models/live/decision_event.rbs +102 -0
- data/sig/openai/models/live/decision_item_create_event.rbs +183 -0
- data/sig/openai/models/live/decision_item_created_event.rbs +195 -0
- data/sig/openai/models/live/decision_item_delete_event.rbs +33 -0
- data/sig/openai/models/live/decision_item_deleted_event.rbs +49 -0
- data/sig/openai/models/live/decision_trigger.rbs +234 -0
- data/sig/openai/models/live/decisions_delegation_config.rbs +195 -0
- data/sig/openai/models/live/decisions_delegation_update_config.rbs +202 -0
- data/sig/openai/models/live/delegation_created_event.rbs +6 -7
- data/sig/openai/models/live/fork_client_event.rbs +4 -0
- data/sig/openai/models/live/fork_server_event.rbs +5 -0
- data/sig/openai/models/live/media_session_config.rbs +58 -11
- data/sig/openai/models/live/output_audio_fixture_play_event.rbs +42 -0
- data/sig/openai/models/live/output_audio_fixture_played_event.rbs +44 -0
- data/sig/openai/models/live/output_audio_fixture_playing_event.rbs +44 -0
- data/sig/openai/models/live/server_event.rbs +5 -0
- data/sig/openai/models/live/session_accept_params.rbs +57 -10
- data/sig/openai/models/live/session_config.rbs +58 -11
- data/sig/openai/models/live/session_resource.rbs +57 -10
- data/sig/openai/models/live/session_update_config.rbs +54 -3
- data/sig/openai/models/live/session_update_event.rbs +6 -6
- data/sig/openai/models/live/sideband_client_event.rbs +26 -0
- data/sig/openai/models/live/sideband_server_event.rbs +33 -0
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +6 -3
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +6 -3
- data/sig/openai/models/realtime/realtime_response_status.rbs +15 -3
- data/sig/openai/models/responses/response.rbs +2 -4
- data/sig/openai/models/responses/response_create_params.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +19 -3
- data/sig/openai/models/responses/response_input_item.rbs +110 -0
- data/sig/openai/models/responses/response_item.rbs +110 -0
- data/sig/openai/models/responses/response_output_item.rbs +110 -0
- data/sig/openai/models/responses/responses_client_event.rbs +2 -2
- data/sig/openai/models/safety/safety_alert.rbs +12 -2
- data/sig/openai/models/video_create_error.rbs +19 -3
- data/sig/openai/models/webhooks/agent_environment_expired_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/agent_environment_suspended_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +3 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +4 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +4 -0
- data/sig/openai/resources/admin/organization/projects/api_keys.rbs +8 -0
- data/sig/openai/resources/admin/organization/usage.rbs +15 -0
- data/sig/openai/resources/beta/agents/environments/files.rbs +0 -17
- data/sig/openai/resources/beta/agents/sessions/artifacts.rbs +2 -6
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -1
- data/sig/openai/resources/beta/agents/vaults/credentials.rbs +2 -1
- data/sig/openai/resources/beta/agents/vaults.rbs +9 -1
- data/sig/openai/resources/beta/agents.rbs +1 -1
- data/sig/openai/resources/files.rbs +0 -7
- data/sig/openai/resources/live/forks.rbs +8 -0
- data/sig/openai/resources/live/sideband.rbs +8 -0
- data/sig/openai/resources/live.rbs +7 -0
- data/sig/openai/resources/realtime/translations.rbs +7 -0
- data/sig/openai/resources/realtime.rbs +7 -0
- data/sig/openai/resources/responses.rbs +7 -31
- data/sig/openai/resources/vector_stores/file_batches.rbs +0 -31
- data/sig/openai/resources/vector_stores/files.rbs +0 -36
- data/sig/openai/resources/webhooks.rbs +3 -1
- metadata +101 -1
|
@@ -26,6 +26,54 @@ module OpenAI
|
|
|
26
26
|
)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
+
# Updates the scopes and/or expiration of an existing API key in the project,
|
|
30
|
+
# including a service-account-owned key. Requires permission to write project API
|
|
31
|
+
# keys.
|
|
32
|
+
#
|
|
33
|
+
# Provide at least one of `scopes` or `expires_in_seconds`. Omitted fields stay
|
|
34
|
+
# unchanged; neither field accepts `null`. Both changes are saved together.
|
|
35
|
+
#
|
|
36
|
+
# `scopes` replaces the key's scope restrictions using the same scope identifiers
|
|
37
|
+
# as the dashboard. An empty array means All permissions, subject to the owner's
|
|
38
|
+
# effective access; it does not mean no access. Use `["api.all.read"]` for
|
|
39
|
+
# read-only access or specific scopes such as `["api.files.read"]` for restricted
|
|
40
|
+
# access. This does not change user or service-account roles or grant admin
|
|
41
|
+
# permissions. Scope changes follow the same authentication-cache propagation as
|
|
42
|
+
# dashboard edits.
|
|
43
|
+
#
|
|
44
|
+
# Provide `expires_in_seconds` to set the expiration relative to this request. The
|
|
45
|
+
# value must satisfy the organization's and project's expiry policies. Expired
|
|
46
|
+
# keys cannot be updated. Retrying resets the expiration relative to the new
|
|
47
|
+
# request. The response contains only the redacted key, not its secret.
|
|
48
|
+
sig {
|
|
49
|
+
params(
|
|
50
|
+
api_key_id: String,
|
|
51
|
+
project_id: String,
|
|
52
|
+
expires_in_seconds: Integer,
|
|
53
|
+
scopes: T::Array[String],
|
|
54
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
55
|
+
)
|
|
56
|
+
.returns(OpenAI::Admin::Organization::Projects::ProjectAPIKey)
|
|
57
|
+
}
|
|
58
|
+
def update(
|
|
59
|
+
# Path param: The ID of the API key.
|
|
60
|
+
api_key_id,
|
|
61
|
+
# Path param: The ID of the project.
|
|
62
|
+
project_id:,
|
|
63
|
+
# Body param: Number of seconds from this request until the API key expires. Must
|
|
64
|
+
# comply with the organization and project expiry policies. Expired keys cannot be
|
|
65
|
+
# updated. Retrying resets the expiry relative to the new request. Omit to keep
|
|
66
|
+
# the current expiration.
|
|
67
|
+
expires_in_seconds: nil,
|
|
68
|
+
# Body param: Replace the API key scope restrictions. Omit to leave scopes
|
|
69
|
+
# unchanged. An empty array removes key restrictions (All permissions), subject to
|
|
70
|
+
# the owner's effective permissions. Use ["api.all.read"] for read-only access.
|
|
71
|
+
# Scopes do not change the owner's roles or grant administrative permissions.
|
|
72
|
+
scopes: nil,
|
|
73
|
+
request_options: {}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
29
77
|
# Returns a list of API keys in the project.
|
|
30
78
|
sig {
|
|
31
79
|
params(
|
|
@@ -252,6 +252,62 @@ module OpenAI
|
|
|
252
252
|
)
|
|
253
253
|
end
|
|
254
254
|
|
|
255
|
+
# Get Decisions API usage details for the organization.
|
|
256
|
+
sig {
|
|
257
|
+
params(
|
|
258
|
+
start_time: Integer,
|
|
259
|
+
api_key_ids: T.nilable(T::Array[String]),
|
|
260
|
+
batch: T.nilable(T::Boolean),
|
|
261
|
+
bucket_width: T.nilable(OpenAI::Admin::Organization::UsageDecisionsParams::BucketWidth::OrSymbol),
|
|
262
|
+
end_time: T.nilable(Integer),
|
|
263
|
+
group_by: T.nilable(T::Array[OpenAI::Admin::Organization::UsageDecisionsParams::GroupBy::OrSymbol]),
|
|
264
|
+
limit: T.nilable(Integer),
|
|
265
|
+
models: T.nilable(T::Array[String]),
|
|
266
|
+
page: T.nilable(String),
|
|
267
|
+
project_ids: T.nilable(T::Array[String]),
|
|
268
|
+
user_ids: T.nilable(T::Array[String]),
|
|
269
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
270
|
+
)
|
|
271
|
+
.returns(OpenAI::Models::Admin::Organization::UsageDecisionsResponse)
|
|
272
|
+
}
|
|
273
|
+
def decisions(
|
|
274
|
+
# Start time (Unix seconds) of the query time range, inclusive.
|
|
275
|
+
start_time:,
|
|
276
|
+
# Return only usage for these API keys.
|
|
277
|
+
api_key_ids: nil,
|
|
278
|
+
# If `true`, return batch jobs only. If `false`, return non-batch jobs only. By
|
|
279
|
+
# default, return both.
|
|
280
|
+
batch: nil,
|
|
281
|
+
# Width of each time bucket in response. Currently `1m`, `1h` and `1d` are
|
|
282
|
+
# supported, default to `1d`.
|
|
283
|
+
bucket_width: nil,
|
|
284
|
+
# End time (Unix seconds) of the query time range, exclusive.
|
|
285
|
+
end_time: nil,
|
|
286
|
+
# Group the usage data by the specified fields. Support fields include
|
|
287
|
+
# `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier`,
|
|
288
|
+
# `api_source` or any combination of them. When grouped by `api_source`, results
|
|
289
|
+
# use `agents_api` for attributed Agents API activity and `unlabeled` for all
|
|
290
|
+
# other activity. Without source grouping, `api_source` is null.
|
|
291
|
+
group_by: nil,
|
|
292
|
+
# Specifies the number of buckets to return.
|
|
293
|
+
#
|
|
294
|
+
# - `bucket_width=1d`: default: 7, max: 31
|
|
295
|
+
# - `bucket_width=1h`: default: 24, max: 168
|
|
296
|
+
# - `bucket_width=1m`: default: 60, max: 1440
|
|
297
|
+
limit: nil,
|
|
298
|
+
# Return only usage for these models.
|
|
299
|
+
models: nil,
|
|
300
|
+
# A cursor for use in pagination. Corresponding to the `next_page` field from the
|
|
301
|
+
# previous response.
|
|
302
|
+
page: nil,
|
|
303
|
+
# Return only usage for these projects.
|
|
304
|
+
project_ids: nil,
|
|
305
|
+
# Return only usage for these users.
|
|
306
|
+
user_ids: nil,
|
|
307
|
+
request_options: {}
|
|
308
|
+
)
|
|
309
|
+
end
|
|
310
|
+
|
|
255
311
|
# Get embeddings usage details for the organization.
|
|
256
312
|
sig {
|
|
257
313
|
params(
|
|
@@ -41,7 +41,8 @@ module OpenAI
|
|
|
41
41
|
# object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
|
|
42
42
|
# voices are available in the
|
|
43
43
|
# [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
|
|
44
|
-
# Custom voices must be created from audio samples.
|
|
44
|
+
# Custom voices must be created from audio samples. Voices created from text
|
|
45
|
+
# prompts are supported only in Live.
|
|
45
46
|
voice:,
|
|
46
47
|
# Control the voice of your generated audio with additional instructions. Does not
|
|
47
48
|
# work with `tts-1` or `tts-1-hd`.
|
|
@@ -8,20 +8,23 @@ module OpenAI
|
|
|
8
8
|
# Turn audio into text or text into audio.
|
|
9
9
|
class Voices
|
|
10
10
|
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
# previously uploaded consent recording.
|
|
11
|
+
# Creates a voice from a text prompt or from a consent recording and an audio
|
|
12
|
+
# sample.
|
|
14
13
|
#
|
|
15
|
-
#
|
|
16
|
-
# data.
|
|
14
|
+
# For prompt-based creation, send `type: "prompt"` with a `name` and `prompt` as
|
|
15
|
+
# JSON or multipart form data. For creation from an audio sample, send
|
|
16
|
+
# `type: "audio_sample"` with a `name`, `audio_sample`, and `consent` recording ID
|
|
17
|
+
# as multipart form data. The type defaults to `audio_sample` when omitted.
|
|
17
18
|
#
|
|
18
|
-
# Returns the saved voice's metadata.
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
# customers.
|
|
19
|
+
# Returns the saved voice's metadata. Voices created from text prompts are
|
|
20
|
+
# supported only in Live, not in Realtime or the speech endpoint. The response
|
|
21
|
+
# does not include preview audio.
|
|
22
22
|
sig {
|
|
23
23
|
params(
|
|
24
|
-
body:
|
|
24
|
+
body: T.any(
|
|
25
|
+
OpenAI::Audio::VoiceCreateParams::Body::AudioSample::OrHash,
|
|
26
|
+
OpenAI::Audio::VoiceCreateParams::Body::Prompt::OrHash
|
|
27
|
+
),
|
|
25
28
|
request_options: OpenAI::RequestOptions::OrHash
|
|
26
29
|
)
|
|
27
30
|
.returns(OpenAI::Audio::Voice)
|
|
@@ -10,40 +10,10 @@ module OpenAI
|
|
|
10
10
|
class Environments
|
|
11
11
|
|
|
12
12
|
class Files
|
|
13
|
-
# Beta file helpers.
|
|
14
|
-
sig {
|
|
15
|
-
params(files: T::Hash[String, T.any(String, Pathname)], request_options: OpenAI::RequestOptions::OrHash)
|
|
16
|
-
.returns(OpenAI::Helpers::Beta::Agents::PreparedFiles)
|
|
17
|
-
}
|
|
18
|
-
def prepare(files, request_options: {})
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
sig {
|
|
22
|
-
params(
|
|
23
|
-
directory: T.any(String, Pathname),
|
|
24
|
-
destination: String,
|
|
25
|
-
include: T::Array[String],
|
|
26
|
-
request_options: OpenAI::RequestOptions::OrHash
|
|
27
|
-
)
|
|
28
|
-
.returns(OpenAI::Helpers::Beta::Agents::PreparedFiles)
|
|
29
|
-
}
|
|
30
|
-
def prepare_directory(directory, destination:, include:, request_options: {})
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
sig {
|
|
34
|
-
params(
|
|
35
|
-
environment_id: String,
|
|
36
|
-
file: T.any(String, Pathname),
|
|
37
|
-
path: String,
|
|
38
|
-
request_options: OpenAI::RequestOptions::OrHash
|
|
39
|
-
)
|
|
40
|
-
.returns(OpenAI::Helpers::Beta::Agents::PreparedFiles)
|
|
41
|
-
}
|
|
42
|
-
def upload(environment_id, file:, path:, request_options: {})
|
|
43
|
-
end
|
|
44
13
|
|
|
45
|
-
# Copies inline bytes or a Files API file into a connected execution environment
|
|
46
|
-
#
|
|
14
|
+
# Copies inline bytes or a Files API file into a connected execution environment,
|
|
15
|
+
# replacing an existing regular file at the same path. Upload between turns and
|
|
16
|
+
# wait for success before starting the next turn. See
|
|
47
17
|
# [environment files](https://developers.openai.com/api/docs/guides/agents-api/environments/files).
|
|
48
18
|
sig {
|
|
49
19
|
params(
|
|
@@ -71,11 +71,11 @@ module OpenAI
|
|
|
71
71
|
.returns(OpenAI::Internal::CursorPage[OpenAI::Beta::Agents::EnvironmentInfo])
|
|
72
72
|
}
|
|
73
73
|
def list(
|
|
74
|
-
# Return
|
|
74
|
+
# Return resources after this resource ID in the selected order.
|
|
75
75
|
after: nil,
|
|
76
|
-
# The maximum number of
|
|
76
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
77
77
|
limit: nil,
|
|
78
|
-
# The order in which
|
|
78
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
79
79
|
order: nil,
|
|
80
80
|
# The hosting type to list. Defaults to `openai_hosted`.
|
|
81
81
|
type: nil,
|
|
@@ -10,14 +10,6 @@ module OpenAI
|
|
|
10
10
|
class Sessions
|
|
11
11
|
|
|
12
12
|
class Artifacts
|
|
13
|
-
# Beta result-scoped downloads.
|
|
14
|
-
sig {
|
|
15
|
-
params(result: OpenAI::Helpers::Beta::Agents::TurnResult).returns(
|
|
16
|
-
OpenAI::Helpers::Beta::Agents::ResultArtifacts
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
def for_result(result)
|
|
20
|
-
end
|
|
21
13
|
|
|
22
14
|
# Retrieves immutable metadata for one durable session artifact. See
|
|
23
15
|
# [session artifacts](https://developers.openai.com/api/docs/guides/agents-api/environments/files#openai-hosted-artifacts).
|
|
@@ -40,9 +32,9 @@ module OpenAI
|
|
|
40
32
|
sig {
|
|
41
33
|
params(
|
|
42
34
|
session_id: String,
|
|
43
|
-
after:
|
|
35
|
+
after: String,
|
|
44
36
|
environment_id: T.nilable(String),
|
|
45
|
-
limit:
|
|
37
|
+
limit: Integer,
|
|
46
38
|
order: OpenAI::Beta::Agents::Sessions::ArtifactListParams::Order::OrSymbol,
|
|
47
39
|
request_options: OpenAI::RequestOptions::OrHash
|
|
48
40
|
)
|
|
@@ -51,13 +43,13 @@ module OpenAI
|
|
|
51
43
|
def list(
|
|
52
44
|
# The ID of the session.
|
|
53
45
|
session_id,
|
|
54
|
-
# Return
|
|
46
|
+
# Return resources after this resource ID in the selected order.
|
|
55
47
|
after: nil,
|
|
56
48
|
# Restrict the listing to artifacts produced by this environment.
|
|
57
49
|
environment_id: nil,
|
|
58
|
-
# The maximum number of
|
|
50
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
59
51
|
limit: nil,
|
|
60
|
-
#
|
|
52
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
61
53
|
order: nil,
|
|
62
54
|
request_options: {}
|
|
63
55
|
)
|
|
@@ -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,
|