openai 0.98.0 → 0.100.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 +26 -0
- data/README.md +1 -1
- data/bedrock.md +17 -1
- data/lib/openai/client.rb +9 -0
- data/lib/openai/helpers/agents/session_stream.rb +11 -36
- data/lib/openai/helpers/agents/tools.rb +34 -4
- data/lib/openai/helpers/beta/agents/creation_stream.rb +26 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +11 -4
- data/lib/openai/helpers/beta/agents/tool_dispatcher.rb +74 -0
- data/lib/openai/helpers/beta/agents/tool_error.rb +28 -0
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_completions_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
- data/lib/openai/models/admin/organization/usage_costs_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_images_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +140 -5
- data/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +140 -5
- data/lib/openai/models/all_models.rb +42 -0
- data/lib/openai/models/audio/speech_create_params.rb +6 -0
- data/lib/openai/models/audio/voice.rb +75 -0
- data/lib/openai/models/audio/voice_create_params.rb +217 -0
- data/lib/openai/models/beta/agent_create_params.rb +0 -3
- data/lib/openai/models/beta/agent_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +6 -6
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +3 -6
- data/lib/openai/models/beta/agents/session_create_params.rb +0 -3
- data/lib/openai/models/beta/agents/session_update_params.rb +0 -3
- data/lib/openai/models/beta/agents/sessions/turns/item_list_params.rb +79 -0
- data/lib/openai/models/beta/beta_response.rb +220 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/beta/beta_response_error.rb +12 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
- data/lib/openai/models/beta/beta_responses_server_event.rb +12 -1
- data/lib/openai/models/beta/beta_tool.rb +15 -18
- data/lib/openai/models/beta/environment_param.rb +6 -6
- data/lib/openai/models/beta/response_compact_params.rb +220 -0
- data/lib/openai/models/beta/response_create_params.rb +220 -0
- data/lib/openai/models/beta/session_turn_error.rb +9 -0
- data/lib/openai/models/chat/chat_completion_audio_param.rb +6 -3
- data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
- data/lib/openai/models/chat_model.rb +178 -0
- data/lib/openai/models/error_object.rb +12 -1
- data/lib/openai/models/eval_create_params.rb +1 -1
- data/lib/openai/models/eval_create_response.rb +1 -1
- data/lib/openai/models/eval_list_response.rb +1 -1
- data/lib/openai/models/eval_retrieve_response.rb +1 -1
- data/lib/openai/models/eval_update_response.rb +1 -1
- data/lib/openai/models/fine_tuning/job_list_params.rb +14 -4
- data/lib/openai/models/graders/score_model_grader.rb +2 -2
- data/lib/openai/models/image.rb +14 -14
- data/lib/openai/models/image_create_variation_params.rb +7 -7
- data/lib/openai/models/image_edit_params.rb +88 -96
- data/lib/openai/models/image_generate_params.rb +51 -62
- data/lib/openai/models/image_model.rb +5 -3
- data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -6
- data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
- data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -6
- data/lib/openai/models/realtime/session_update_event.rb +16 -0
- data/lib/openai/models/responses/response_compact_params.rb +220 -0
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/responses/response_error.rb +12 -1
- data/lib/openai/models/responses/responses_server_event.rb +12 -1
- data/lib/openai/models/responses/tool.rb +15 -18
- data/lib/openai/models/responses_model.rb +42 -0
- data/lib/openai/models/video_create_error.rb +12 -1
- data/lib/openai/models/webhooks/agent_session_action_required_webhook_event.rb +109 -0
- data/lib/openai/models/webhooks/agent_session_created_webhook_event.rb +106 -0
- data/lib/openai/models/webhooks/agent_session_failed_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_idle_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/agent_session_in_progress_webhook_event.rb +86 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +18 -2
- data/lib/openai/models/webhooks/webhook_create_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +5 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +5 -0
- data/lib/openai/providers/bedrock.rb +20 -1
- data/lib/openai/resources/admin/organization/usage.rb +15 -6
- data/lib/openai/resources/audio/speech.rb +2 -0
- data/lib/openai/resources/audio/voices.rb +53 -0
- data/lib/openai/resources/audio.rb +5 -0
- data/lib/openai/resources/beta/agents/environments/templates.rb +3 -4
- data/lib/openai/resources/beta/agents/sessions/turns/items.rb +68 -0
- data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -2
- data/lib/openai/resources/fine_tuning/jobs.rb +7 -2
- data/lib/openai/resources/images.rb +79 -109
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +10 -0
- data/rbi/openai/helpers/agents.rbi +2 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +8 -3
- data/rbi/openai/helpers/beta/agents/tool_error.rbi +19 -0
- data/rbi/openai/helpers/beta/agents.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +213 -3
- data/rbi/openai/models/admin/organization/usage_web_search_calls_params.rbi +12 -4
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +213 -3
- data/rbi/openai/models/audio/speech_create_params.rbi +6 -0
- data/rbi/openai/models/audio/voice.rbi +111 -0
- data/rbi/openai/models/audio/voice_create_params.rbi +321 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agent_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +6 -6
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +3 -6
- data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/sessions/turns/item_list_params.rbi +139 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_error.rbi +12 -0
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +12 -0
- data/rbi/openai/models/beta/beta_tool.rbi +15 -18
- data/rbi/openai/models/beta/environment_param.rbi +6 -6
- data/rbi/openai/models/beta/session_turn_error.rbi +18 -0
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +123 -17
- data/rbi/openai/models/error_object.rbi +12 -0
- data/rbi/openai/models/eval_create_params.rbi +1 -1
- data/rbi/openai/models/eval_create_response.rbi +1 -1
- data/rbi/openai/models/eval_list_response.rbi +1 -1
- data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
- data/rbi/openai/models/eval_update_response.rbi +1 -1
- data/rbi/openai/models/fine_tuning/job_list_params.rbi +14 -4
- data/rbi/openai/models/graders/score_model_grader.rbi +2 -2
- data/rbi/openai/models/image.rbi +14 -14
- data/rbi/openai/models/image_create_variation_params.rbi +6 -6
- data/rbi/openai/models/image_edit_params.rbi +73 -91
- data/rbi/openai/models/image_generate_params.rbi +30 -61
- data/rbi/openai/models/image_model.rbi +3 -3
- data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +9 -6
- data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +9 -6
- data/rbi/openai/models/realtime/session_update_event.rbi +16 -0
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/responses/response_error.rbi +12 -0
- data/rbi/openai/models/responses/responses_server_event.rbi +12 -0
- data/rbi/openai/models/responses/tool.rbi +15 -18
- data/rbi/openai/models/video_create_error.rbi +12 -0
- data/rbi/openai/models/webhooks/agent_session_action_required_webhook_event.rbi +222 -0
- data/rbi/openai/models/webhooks/agent_session_created_webhook_event.rbi +202 -0
- data/rbi/openai/models/webhooks/agent_session_failed_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_idle_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/agent_session_in_progress_webhook_event.rbi +151 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +7 -1
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +20 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +20 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +15 -6
- data/rbi/openai/resources/audio/speech.rbi +2 -0
- data/rbi/openai/resources/audio/voices.rbi +49 -0
- data/rbi/openai/resources/audio.rbi +4 -0
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +3 -4
- data/rbi/openai/resources/beta/agents/sessions/turns/items.rbi +62 -0
- data/rbi/openai/resources/beta/agents/sessions/turns.rbi +3 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +2 -0
- data/rbi/openai/resources/fine_tuning/jobs.rbi +7 -2
- data/rbi/openai/resources/images.rbi +77 -109
- data/rbi/openai/resources/webhooks.rbi +5 -0
- data/sig/openai/helpers/agents.rbs +3 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +5 -2
- data/sig/openai/helpers/beta/agents/tool_error.rbs +17 -0
- data/sig/openai/helpers/beta/agents.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_images_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +107 -5
- data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +19 -7
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +107 -5
- data/sig/openai/models/audio/speech_create_params.rbs +4 -0
- data/sig/openai/models/audio/voice.rbs +70 -0
- data/sig/openai/models/audio/voice_create_params.rbs +203 -0
- data/sig/openai/models/beta/agent_create_params.rbs +1 -5
- data/sig/openai/models/beta/agent_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +4 -4
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +2 -4
- data/sig/openai/models/beta/agents/session_create_params.rbs +1 -5
- data/sig/openai/models/beta/agents/session_update_params.rbs +1 -5
- data/sig/openai/models/beta/agents/sessions/turns/item_list_params.rbs +91 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/beta/beta_response_error.rbs +10 -0
- data/sig/openai/models/beta/beta_responses_server_event.rbs +10 -0
- data/sig/openai/models/beta/beta_tool.rbs +11 -15
- data/sig/openai/models/beta/environment_param.rbs +4 -4
- data/sig/openai/models/beta/session_turn_error.rbs +12 -0
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
- data/sig/openai/models/chat/chat_completion_chunk.rbs +96 -12
- data/sig/openai/models/error_object.rbs +10 -0
- data/sig/openai/models/eval_create_params.rbs +1 -1
- data/sig/openai/models/eval_create_response.rbs +1 -1
- data/sig/openai/models/eval_list_response.rbs +1 -1
- data/sig/openai/models/eval_retrieve_response.rbs +1 -1
- data/sig/openai/models/eval_update_response.rbs +1 -1
- data/sig/openai/models/fine_tuning/job_list_params.rbs +14 -4
- data/sig/openai/models/graders/score_model_grader.rbs +3 -3
- data/sig/openai/models/image.rbs +21 -21
- data/sig/openai/models/image_create_variation_params.rbs +4 -4
- data/sig/openai/models/image_edit_params.rbs +54 -66
- data/sig/openai/models/image_generate_params.rbs +23 -45
- data/sig/openai/models/image_model.rbs +6 -6
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +9 -6
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +9 -6
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +10 -0
- data/sig/openai/models/responses/responses_server_event.rbs +10 -0
- data/sig/openai/models/responses/tool.rbs +11 -15
- data/sig/openai/models/video_create_error.rbs +10 -0
- data/sig/openai/models/webhooks/agent_session_action_required_webhook_event.rbs +114 -0
- data/sig/openai/models/webhooks/agent_session_created_webhook_event.rbs +115 -0
- data/sig/openai/models/webhooks/agent_session_failed_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_idle_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/agent_session_in_progress_webhook_event.rbs +89 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +6 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +10 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +10 -0
- data/sig/openai/resources/audio/voices.rbs +14 -0
- data/sig/openai/resources/audio.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions/turns/items.rbs +24 -0
- data/sig/openai/resources/beta/agents/sessions/turns.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
- data/sig/openai/resources/webhooks.rbs +6 -1
- metadata +35 -1
|
@@ -976,9 +976,10 @@ module OpenAI
|
|
|
976
976
|
sig { params(background: OpenAI::Beta::BetaTool::ImageGeneration::Background::OrSymbol).void }
|
|
977
977
|
attr_writer :background
|
|
978
978
|
|
|
979
|
-
#
|
|
980
|
-
#
|
|
981
|
-
# `gpt-image-
|
|
979
|
+
# Control how much effort the model will exert to match the style and features,
|
|
980
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
981
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
982
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
982
983
|
sig { returns(T.nilable(OpenAI::Beta::BetaTool::ImageGeneration::InputFidelity::OrSymbol)) }
|
|
983
984
|
attr_accessor :input_fidelity
|
|
984
985
|
|
|
@@ -1050,9 +1051,7 @@ module OpenAI
|
|
|
1050
1051
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1051
1052
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1052
1053
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
1053
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
1054
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
1055
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
1054
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1056
1055
|
sig { returns(T.nilable(T.any(String, OpenAI::Beta::BetaTool::ImageGeneration::Size::OrSymbol))) }
|
|
1057
1056
|
attr_reader :size
|
|
1058
1057
|
|
|
@@ -1105,9 +1104,10 @@ module OpenAI
|
|
|
1105
1104
|
# set the output format to `png` or `webp`.
|
|
1106
1105
|
background: nil,
|
|
1107
1106
|
|
|
1108
|
-
#
|
|
1109
|
-
#
|
|
1110
|
-
# `gpt-image-
|
|
1107
|
+
# Control how much effort the model will exert to match the style and features,
|
|
1108
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
1109
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
1110
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
1111
1111
|
input_fidelity: nil,
|
|
1112
1112
|
|
|
1113
1113
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -1150,9 +1150,7 @@ module OpenAI
|
|
|
1150
1150
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1151
1151
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1152
1152
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
1153
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
1154
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
1155
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
1153
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1156
1154
|
size: nil,
|
|
1157
1155
|
|
|
1158
1156
|
# The type of the image generation tool. Always `image_generation`.
|
|
@@ -1222,9 +1220,10 @@ module OpenAI
|
|
|
1222
1220
|
end
|
|
1223
1221
|
end
|
|
1224
1222
|
|
|
1225
|
-
#
|
|
1226
|
-
#
|
|
1227
|
-
# `gpt-image-
|
|
1223
|
+
# Control how much effort the model will exert to match the style and features,
|
|
1224
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
1225
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
1226
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
1228
1227
|
module InputFidelity
|
|
1229
1228
|
extend OpenAI::Internal::Type::Enum
|
|
1230
1229
|
|
|
@@ -1407,9 +1406,7 @@ module OpenAI
|
|
|
1407
1406
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1408
1407
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1409
1408
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
1410
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
1411
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
1412
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
1409
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1413
1410
|
module Size
|
|
1414
1411
|
extend OpenAI::Internal::Type::Union
|
|
1415
1412
|
|
|
@@ -114,8 +114,8 @@ module OpenAI
|
|
|
114
114
|
}
|
|
115
115
|
attr_accessor :files
|
|
116
116
|
|
|
117
|
-
# Network access policy for the environment.
|
|
118
|
-
#
|
|
117
|
+
# Network access policy for the environment. If omitted, the API version
|
|
118
|
+
# determines whether network access is enabled or disabled.
|
|
119
119
|
sig { returns(T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network)) }
|
|
120
120
|
attr_reader :network
|
|
121
121
|
|
|
@@ -216,8 +216,8 @@ module OpenAI
|
|
|
216
216
|
# Files available before the agent starts. Defaults to an empty list.
|
|
217
217
|
files: nil,
|
|
218
218
|
|
|
219
|
-
# Network access policy for the environment.
|
|
220
|
-
#
|
|
219
|
+
# Network access policy for the environment. If omitted, the API version
|
|
220
|
+
# determines whether network access is enabled or disabled.
|
|
221
221
|
network: nil,
|
|
222
222
|
|
|
223
223
|
# Packages to install in the environment. Defaults to empty package lists.
|
|
@@ -350,8 +350,8 @@ module OpenAI
|
|
|
350
350
|
sig { returns(T.nilable(T::Array[String])) }
|
|
351
351
|
attr_accessor :blocked_domains
|
|
352
352
|
|
|
353
|
-
# Network access policy for the environment.
|
|
354
|
-
#
|
|
353
|
+
# Network access policy for the environment. If omitted, the API version
|
|
354
|
+
# determines whether network access is enabled or disabled.
|
|
355
355
|
sig do
|
|
356
356
|
params(
|
|
357
357
|
|
|
@@ -67,6 +67,24 @@ module OpenAI
|
|
|
67
67
|
# The organization has reached a usage, plan, or billing limit.
|
|
68
68
|
USAGE_LIMIT_EXCEEDED = T.let(:usage_limit_exceeded, OpenAI::Beta::SessionTurnError::Code::TaggedSymbol)
|
|
69
69
|
|
|
70
|
+
# The project has reached its enforced spend limit.
|
|
71
|
+
PROJECT_SPEND_LIMIT_EXCEEDED = T.let(
|
|
72
|
+
:project_spend_limit_exceeded,
|
|
73
|
+
OpenAI::Beta::SessionTurnError::Code::TaggedSymbol
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# The organization has reached its enforced spend limit.
|
|
77
|
+
ORGANIZATION_SPEND_LIMIT_EXCEEDED = T.let(
|
|
78
|
+
:organization_spend_limit_exceeded,
|
|
79
|
+
OpenAI::Beta::SessionTurnError::Code::TaggedSymbol
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# The organization has reached its OpenAI-assigned usage limit.
|
|
83
|
+
ORGANIZATION_USAGE_LIMIT_EXCEEDED = T.let(
|
|
84
|
+
:organization_usage_limit_exceeded,
|
|
85
|
+
OpenAI::Beta::SessionTurnError::Code::TaggedSymbol
|
|
86
|
+
)
|
|
87
|
+
|
|
70
88
|
# The organization has no API credits remaining.
|
|
71
89
|
CREDIT_BALANCE_EXHAUSTED = T.let(
|
|
72
90
|
:credit_balance_exhausted,
|
|
@@ -24,7 +24,8 @@ module OpenAI
|
|
|
24
24
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
25
25
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
26
26
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
27
|
-
# for example `{ "id": "voice_1234" }`.
|
|
27
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
28
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
28
29
|
sig {
|
|
29
30
|
returns(
|
|
30
31
|
T.any(
|
|
@@ -61,7 +62,8 @@ module OpenAI
|
|
|
61
62
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
62
63
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
63
64
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
64
|
-
# for example `{ "id": "voice_1234" }`.
|
|
65
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
66
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
65
67
|
|
|
66
68
|
voice:
|
|
67
69
|
)
|
|
@@ -105,7 +107,8 @@ module OpenAI
|
|
|
105
107
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
106
108
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
107
109
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
108
|
-
# for example `{ "id": "voice_1234" }`.
|
|
110
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
111
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
109
112
|
module Voice
|
|
110
113
|
extend OpenAI::Internal::Type::Union
|
|
111
114
|
|
|
@@ -228,26 +228,29 @@ module OpenAI
|
|
|
228
228
|
)
|
|
229
229
|
end
|
|
230
230
|
|
|
231
|
-
# A chat completion delta generated by streamed model responses.
|
|
231
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
232
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
233
|
+
# final audio update contains only its expiry timestamp.
|
|
232
234
|
sig { returns(OpenAI::Chat::ChatCompletionChunk::Choice::Delta) }
|
|
233
235
|
attr_reader :delta
|
|
234
236
|
|
|
235
237
|
sig { params(delta: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::OrHash).void }
|
|
236
238
|
attr_writer :delta
|
|
237
239
|
|
|
240
|
+
# The index of the choice in the list of choices.
|
|
241
|
+
sig { returns(Integer) }
|
|
242
|
+
attr_accessor :index
|
|
243
|
+
|
|
238
244
|
# The reason the model stopped generating tokens. This will be `stop` if the model
|
|
239
245
|
# hit a natural stop point or a provided stop sequence, `length` if the maximum
|
|
240
246
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
241
247
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
242
248
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
243
|
-
# function.
|
|
249
|
+
# function. Omitted from the final audio update containing only
|
|
250
|
+
# `delta.audio.expires_at`.
|
|
244
251
|
sig { returns(T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::FinishReason::TaggedSymbol)) }
|
|
245
252
|
attr_accessor :finish_reason
|
|
246
253
|
|
|
247
|
-
# The index of the choice in the list of choices.
|
|
248
|
-
sig { returns(Integer) }
|
|
249
|
-
attr_accessor :index
|
|
250
|
-
|
|
251
254
|
# Log probability information for the choice.
|
|
252
255
|
sig { returns(T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs)) }
|
|
253
256
|
attr_reader :logprobs
|
|
@@ -260,29 +263,32 @@ module OpenAI
|
|
|
260
263
|
|
|
261
264
|
delta: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::OrHash,
|
|
262
265
|
|
|
263
|
-
finish_reason: T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::FinishReason::OrSymbol),
|
|
264
|
-
|
|
265
266
|
index: Integer,
|
|
266
267
|
|
|
268
|
+
finish_reason: T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::FinishReason::OrSymbol),
|
|
269
|
+
|
|
267
270
|
logprobs: T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs::OrHash)
|
|
268
271
|
)
|
|
269
272
|
.returns(T.attached_class)
|
|
270
273
|
end
|
|
271
274
|
def self.new(
|
|
272
275
|
|
|
273
|
-
# A chat completion delta generated by streamed model responses.
|
|
276
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
277
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
278
|
+
# final audio update contains only its expiry timestamp.
|
|
274
279
|
delta:,
|
|
275
280
|
|
|
281
|
+
# The index of the choice in the list of choices.
|
|
282
|
+
index:,
|
|
283
|
+
|
|
276
284
|
# The reason the model stopped generating tokens. This will be `stop` if the model
|
|
277
285
|
# hit a natural stop point or a provided stop sequence, `length` if the maximum
|
|
278
286
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
279
287
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
280
288
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
281
|
-
# function.
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
# The index of the choice in the list of choices.
|
|
285
|
-
index:,
|
|
289
|
+
# function. Omitted from the final audio update containing only
|
|
290
|
+
# `delta.audio.expires_at`.
|
|
291
|
+
finish_reason: nil,
|
|
286
292
|
|
|
287
293
|
# Log probability information for the choice.
|
|
288
294
|
|
|
@@ -294,8 +300,8 @@ module OpenAI
|
|
|
294
300
|
override.returns(
|
|
295
301
|
{
|
|
296
302
|
delta: OpenAI::Chat::ChatCompletionChunk::Choice::Delta,
|
|
297
|
-
finish_reason: T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::FinishReason::TaggedSymbol),
|
|
298
303
|
index: Integer,
|
|
304
|
+
finish_reason: T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::FinishReason::TaggedSymbol),
|
|
299
305
|
logprobs: T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs)
|
|
300
306
|
}
|
|
301
307
|
)
|
|
@@ -311,6 +317,14 @@ module OpenAI
|
|
|
311
317
|
)
|
|
312
318
|
end
|
|
313
319
|
|
|
320
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
321
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
322
|
+
sig { returns(T.nilable(OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio)) }
|
|
323
|
+
attr_reader :audio
|
|
324
|
+
|
|
325
|
+
sig { params(audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio::OrHash).void }
|
|
326
|
+
attr_writer :audio
|
|
327
|
+
|
|
314
328
|
# The contents of the chunk message.
|
|
315
329
|
sig { returns(T.nilable(String)) }
|
|
316
330
|
attr_accessor :content
|
|
@@ -342,10 +356,14 @@ module OpenAI
|
|
|
342
356
|
}
|
|
343
357
|
attr_writer :tool_calls
|
|
344
358
|
|
|
345
|
-
# A chat completion delta generated by streamed model responses.
|
|
359
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
360
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
361
|
+
# final audio update contains only its expiry timestamp.
|
|
346
362
|
sig do
|
|
347
363
|
params(
|
|
348
364
|
|
|
365
|
+
audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio::OrHash,
|
|
366
|
+
|
|
349
367
|
content: T.nilable(String),
|
|
350
368
|
|
|
351
369
|
function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall::OrHash,
|
|
@@ -360,6 +378,10 @@ module OpenAI
|
|
|
360
378
|
end
|
|
361
379
|
def self.new(
|
|
362
380
|
|
|
381
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
382
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
383
|
+
audio: nil,
|
|
384
|
+
|
|
363
385
|
# The contents of the chunk message.
|
|
364
386
|
content: nil,
|
|
365
387
|
|
|
@@ -380,6 +402,7 @@ module OpenAI
|
|
|
380
402
|
sig do
|
|
381
403
|
override.returns(
|
|
382
404
|
{
|
|
405
|
+
audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio,
|
|
383
406
|
content: T.nilable(String),
|
|
384
407
|
function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall,
|
|
385
408
|
refusal: T.nilable(String),
|
|
@@ -391,6 +414,88 @@ module OpenAI
|
|
|
391
414
|
def to_hash
|
|
392
415
|
end
|
|
393
416
|
|
|
417
|
+
class Audio < OpenAI::Internal::Type::BaseModel
|
|
418
|
+
OrHash = T.type_alias do
|
|
419
|
+
T.any(
|
|
420
|
+
OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio,
|
|
421
|
+
OpenAI::Internal::AnyHash
|
|
422
|
+
)
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
# Unique identifier for this audio response.
|
|
426
|
+
sig { returns(T.nilable(String)) }
|
|
427
|
+
attr_reader :id
|
|
428
|
+
|
|
429
|
+
sig { params(id: String).void }
|
|
430
|
+
attr_writer :id
|
|
431
|
+
|
|
432
|
+
# Base64 encoded audio bytes generated by the model, in the format specified in
|
|
433
|
+
# the request.
|
|
434
|
+
sig { returns(T.nilable(String)) }
|
|
435
|
+
attr_reader :data
|
|
436
|
+
|
|
437
|
+
sig { params(data: String).void }
|
|
438
|
+
attr_writer :data
|
|
439
|
+
|
|
440
|
+
# The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
441
|
+
# accessible on the server for use in multi-turn conversations.
|
|
442
|
+
sig { returns(T.nilable(Integer)) }
|
|
443
|
+
attr_reader :expires_at
|
|
444
|
+
|
|
445
|
+
sig { params(expires_at: Integer).void }
|
|
446
|
+
attr_writer :expires_at
|
|
447
|
+
|
|
448
|
+
# Transcript text from this audio chunk.
|
|
449
|
+
sig { returns(T.nilable(String)) }
|
|
450
|
+
attr_reader :transcript
|
|
451
|
+
|
|
452
|
+
sig { params(transcript: String).void }
|
|
453
|
+
attr_writer :transcript
|
|
454
|
+
|
|
455
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
456
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
457
|
+
sig do
|
|
458
|
+
params(
|
|
459
|
+
|
|
460
|
+
id: String,
|
|
461
|
+
|
|
462
|
+
data: String,
|
|
463
|
+
|
|
464
|
+
expires_at: Integer,
|
|
465
|
+
|
|
466
|
+
transcript: String
|
|
467
|
+
)
|
|
468
|
+
.returns(T.attached_class)
|
|
469
|
+
end
|
|
470
|
+
def self.new(
|
|
471
|
+
|
|
472
|
+
# Unique identifier for this audio response.
|
|
473
|
+
id: nil,
|
|
474
|
+
|
|
475
|
+
# Base64 encoded audio bytes generated by the model, in the format specified in
|
|
476
|
+
# the request.
|
|
477
|
+
data: nil,
|
|
478
|
+
|
|
479
|
+
# The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
480
|
+
# accessible on the server for use in multi-turn conversations.
|
|
481
|
+
expires_at: nil,
|
|
482
|
+
|
|
483
|
+
# Transcript text from this audio chunk.
|
|
484
|
+
|
|
485
|
+
transcript: nil
|
|
486
|
+
)
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
sig do
|
|
490
|
+
override.returns(
|
|
491
|
+
{id: String, data: String, expires_at: Integer, transcript: String}
|
|
492
|
+
)
|
|
493
|
+
end
|
|
494
|
+
def to_hash
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
end
|
|
498
|
+
|
|
394
499
|
class FunctionCall < OpenAI::Internal::Type::BaseModel
|
|
395
500
|
OrHash = T.type_alias do
|
|
396
501
|
T.any(
|
|
@@ -633,7 +738,8 @@ module OpenAI
|
|
|
633
738
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
634
739
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
635
740
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
636
|
-
# function.
|
|
741
|
+
# function. Omitted from the final audio update containing only
|
|
742
|
+
# `delta.audio.expires_at`.
|
|
637
743
|
module FinishReason
|
|
638
744
|
extend OpenAI::Internal::Type::Enum
|
|
639
745
|
|
|
@@ -95,6 +95,11 @@ module OpenAI
|
|
|
95
95
|
sig { params(error_type: T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::OrSymbol)).void }
|
|
96
96
|
attr_writer :error_type
|
|
97
97
|
|
|
98
|
+
# An opaque target for explicitly continuing this review, or null when
|
|
99
|
+
# unavailable.
|
|
100
|
+
sig { returns(T.nilable(String)) }
|
|
101
|
+
attr_accessor :review_target
|
|
102
|
+
|
|
98
103
|
# An optional public continuation instruction.
|
|
99
104
|
sig { returns(T.nilable(OpenAI::ErrorObject::Misalignment::Steer)) }
|
|
100
105
|
attr_reader :steer
|
|
@@ -109,6 +114,8 @@ module OpenAI
|
|
|
109
114
|
|
|
110
115
|
error_type: T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::OrSymbol),
|
|
111
116
|
|
|
117
|
+
review_target: T.nilable(String),
|
|
118
|
+
|
|
112
119
|
steer: OpenAI::ErrorObject::Misalignment::Steer::OrHash
|
|
113
120
|
)
|
|
114
121
|
.returns(T.attached_class)
|
|
@@ -121,6 +128,10 @@ module OpenAI
|
|
|
121
128
|
# An optional classification; clients must accept additional values.
|
|
122
129
|
error_type: nil,
|
|
123
130
|
|
|
131
|
+
# An opaque target for explicitly continuing this review, or null when
|
|
132
|
+
# unavailable.
|
|
133
|
+
review_target: nil,
|
|
134
|
+
|
|
124
135
|
# An optional public continuation instruction.
|
|
125
136
|
|
|
126
137
|
steer: nil
|
|
@@ -132,6 +143,7 @@ module OpenAI
|
|
|
132
143
|
{
|
|
133
144
|
detailed_explanation: String,
|
|
134
145
|
error_type: T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::OrSymbol),
|
|
146
|
+
review_target: T.nilable(String),
|
|
135
147
|
steer: OpenAI::ErrorObject::Misalignment::Steer
|
|
136
148
|
}
|
|
137
149
|
)
|
|
@@ -1021,7 +1021,7 @@ module OpenAI
|
|
|
1021
1021
|
# The name of the grader.
|
|
1022
1022
|
name:,
|
|
1023
1023
|
|
|
1024
|
-
# The
|
|
1024
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
1025
1025
|
range: nil,
|
|
1026
1026
|
|
|
1027
1027
|
# The sampling parameters for the model.
|
|
@@ -413,7 +413,7 @@ module OpenAI
|
|
|
413
413
|
# The name of the grader.
|
|
414
414
|
name:,
|
|
415
415
|
|
|
416
|
-
# The
|
|
416
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
417
417
|
range: nil,
|
|
418
418
|
|
|
419
419
|
# The sampling parameters for the model.
|
|
@@ -413,7 +413,7 @@ module OpenAI
|
|
|
413
413
|
# The name of the grader.
|
|
414
414
|
name:,
|
|
415
415
|
|
|
416
|
-
# The
|
|
416
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
417
417
|
range: nil,
|
|
418
418
|
|
|
419
419
|
# The sampling parameters for the model.
|
|
@@ -413,7 +413,7 @@ module OpenAI
|
|
|
413
413
|
# The name of the grader.
|
|
414
414
|
name:,
|
|
415
415
|
|
|
416
|
-
# The
|
|
416
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
417
417
|
range: nil,
|
|
418
418
|
|
|
419
419
|
# The sampling parameters for the model.
|
|
@@ -413,7 +413,7 @@ module OpenAI
|
|
|
413
413
|
# The name of the grader.
|
|
414
414
|
name:,
|
|
415
415
|
|
|
416
|
-
# The
|
|
416
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
417
417
|
range: nil,
|
|
418
418
|
|
|
419
419
|
# The sampling parameters for the model.
|
|
@@ -31,8 +31,13 @@ module OpenAI
|
|
|
31
31
|
sig { params(limit: Integer).void }
|
|
32
32
|
attr_writer :limit
|
|
33
33
|
|
|
34
|
-
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`.
|
|
35
|
-
#
|
|
34
|
+
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Omitting
|
|
35
|
+
# the parameter or passing an empty object applies no metadata filter. An empty
|
|
36
|
+
# value, such as `metadata[k]=`, filters for that key with an empty string value.
|
|
37
|
+
# To select jobs with null metadata, send the literal query string
|
|
38
|
+
# `metadata=null`. Nullable caller types do not specify how a client serializes
|
|
39
|
+
# null for a deep-object parameter. Use a raw query parameter if the client omits
|
|
40
|
+
# null. Do not combine the two query forms.
|
|
36
41
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
37
42
|
attr_accessor :metadata
|
|
38
43
|
|
|
@@ -57,8 +62,13 @@ module OpenAI
|
|
|
57
62
|
# Number of fine-tuning jobs to retrieve.
|
|
58
63
|
limit: nil,
|
|
59
64
|
|
|
60
|
-
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`.
|
|
61
|
-
#
|
|
65
|
+
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Omitting
|
|
66
|
+
# the parameter or passing an empty object applies no metadata filter. An empty
|
|
67
|
+
# value, such as `metadata[k]=`, filters for that key with an empty string value.
|
|
68
|
+
# To select jobs with null metadata, send the literal query string
|
|
69
|
+
# `metadata=null`. Nullable caller types do not specify how a client serializes
|
|
70
|
+
# null for a deep-object parameter. Use a raw query parameter if the client omits
|
|
71
|
+
# null. Do not combine the two query forms.
|
|
62
72
|
metadata: nil,
|
|
63
73
|
|
|
64
74
|
request_options: {}
|
|
@@ -33,7 +33,7 @@ module OpenAI
|
|
|
33
33
|
sig { returns(Symbol) }
|
|
34
34
|
attr_accessor :type
|
|
35
35
|
|
|
36
|
-
# The
|
|
36
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
37
37
|
sig { returns(T.nilable(T::Array[Float])) }
|
|
38
38
|
attr_reader :range
|
|
39
39
|
|
|
@@ -77,7 +77,7 @@ module OpenAI
|
|
|
77
77
|
# The name of the grader.
|
|
78
78
|
name:,
|
|
79
79
|
|
|
80
|
-
# The
|
|
80
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
81
81
|
range: nil,
|
|
82
82
|
|
|
83
83
|
# The sampling parameters for the model.
|
data/rbi/openai/models/image.rbi
CHANGED
|
@@ -12,25 +12,25 @@ module OpenAI
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
16
|
-
# image models,
|
|
17
|
-
#
|
|
15
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
16
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
17
|
+
# support that parameter.
|
|
18
18
|
sig { returns(T.nilable(String)) }
|
|
19
19
|
attr_reader :b64_json
|
|
20
20
|
|
|
21
21
|
sig { params(b64_json: String).void }
|
|
22
22
|
attr_writer :b64_json
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
25
|
+
# revision. Not returned by GPT image models.
|
|
25
26
|
sig { returns(T.nilable(String)) }
|
|
26
27
|
attr_reader :revised_prompt
|
|
27
28
|
|
|
28
29
|
sig { params(revised_prompt: String).void }
|
|
29
30
|
attr_writer :revised_prompt
|
|
30
31
|
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
# models.
|
|
32
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
33
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
34
34
|
sig { returns(T.nilable(String)) }
|
|
35
35
|
attr_reader :url
|
|
36
36
|
|
|
@@ -51,17 +51,17 @@ module OpenAI
|
|
|
51
51
|
end
|
|
52
52
|
def self.new(
|
|
53
53
|
|
|
54
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
55
|
-
# image models,
|
|
56
|
-
#
|
|
54
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
55
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
56
|
+
# support that parameter.
|
|
57
57
|
b64_json: nil,
|
|
58
58
|
|
|
59
|
-
#
|
|
59
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
60
|
+
# revision. Not returned by GPT image models.
|
|
60
61
|
revised_prompt: nil,
|
|
61
62
|
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
# models.
|
|
63
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
64
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
65
65
|
|
|
66
66
|
url: nil
|
|
67
67
|
)
|
|
@@ -24,8 +24,8 @@ module OpenAI
|
|
|
24
24
|
sig { returns(OpenAI::Internal::FileInput) }
|
|
25
25
|
attr_accessor :image
|
|
26
26
|
|
|
27
|
-
# The model
|
|
28
|
-
#
|
|
27
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
28
|
+
# longer accepts requests.
|
|
29
29
|
sig { returns(T.nilable(T.any(String, OpenAI::ImageModel::OrSymbol))) }
|
|
30
30
|
attr_accessor :model
|
|
31
31
|
|
|
@@ -82,8 +82,8 @@ module OpenAI
|
|
|
82
82
|
# content type.
|
|
83
83
|
image:,
|
|
84
84
|
|
|
85
|
-
# The model
|
|
86
|
-
#
|
|
85
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
86
|
+
# longer accepts requests.
|
|
87
87
|
model: nil,
|
|
88
88
|
|
|
89
89
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -123,8 +123,8 @@ module OpenAI
|
|
|
123
123
|
def to_hash
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
-
# The model
|
|
127
|
-
#
|
|
126
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
127
|
+
# longer accepts requests.
|
|
128
128
|
module Model
|
|
129
129
|
extend OpenAI::Internal::Type::Union
|
|
130
130
|
|