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
|
@@ -15,7 +15,8 @@ module OpenAI
|
|
|
15
15
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
16
16
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
17
17
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
18
|
-
# for example `{ "id": "voice_1234" }`.
|
|
18
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
19
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
19
20
|
#
|
|
20
21
|
# @return [String, Symbol, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice::ID, OpenAI::Models::Chat::ChatCompletionAudioParam::Voice]
|
|
21
22
|
required :voice, union: -> { OpenAI::Chat::ChatCompletionAudioParam::Voice }
|
|
@@ -33,7 +34,8 @@ module OpenAI
|
|
|
33
34
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
34
35
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
35
36
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
36
|
-
# for example `{ "id": "voice_1234" }`.
|
|
37
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
38
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
37
39
|
|
|
38
40
|
# Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`,
|
|
39
41
|
# or `pcm16`.
|
|
@@ -56,7 +58,8 @@ module OpenAI
|
|
|
56
58
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
57
59
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
58
60
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
59
|
-
# for example `{ "id": "voice_1234" }`.
|
|
61
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
62
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
60
63
|
#
|
|
61
64
|
# @see OpenAI::Models::Chat::ChatCompletionAudioParam#voice
|
|
62
65
|
module Voice
|
|
@@ -172,21 +172,30 @@ module OpenAI
|
|
|
172
172
|
# The object type, which is always `chat.completion.chunk`.
|
|
173
173
|
class Choice < OpenAI::Internal::Type::BaseModel
|
|
174
174
|
# @!attribute delta
|
|
175
|
-
# A chat completion delta generated by streamed model responses.
|
|
175
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
176
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
177
|
+
# final audio update contains only its expiry timestamp.
|
|
176
178
|
#
|
|
177
179
|
# @return [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta]
|
|
178
180
|
required :delta, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta }
|
|
179
181
|
|
|
182
|
+
# @!attribute index
|
|
183
|
+
# The index of the choice in the list of choices.
|
|
184
|
+
#
|
|
185
|
+
# @return [Integer]
|
|
186
|
+
required :index, Integer
|
|
187
|
+
|
|
180
188
|
# @!attribute finish_reason
|
|
181
189
|
# The reason the model stopped generating tokens. This will be `stop` if the model
|
|
182
190
|
# hit a natural stop point or a provided stop sequence, `length` if the maximum
|
|
183
191
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
184
192
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
185
193
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
186
|
-
# function.
|
|
194
|
+
# function. Omitted from the final audio update containing only
|
|
195
|
+
# `delta.audio.expires_at`.
|
|
187
196
|
#
|
|
188
197
|
# @return [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::FinishReason, nil]
|
|
189
|
-
|
|
198
|
+
optional(
|
|
190
199
|
:finish_reason,
|
|
191
200
|
enum: -> {
|
|
192
201
|
OpenAI::Chat::ChatCompletionChunk::Choice::FinishReason
|
|
@@ -194,21 +203,20 @@ module OpenAI
|
|
|
194
203
|
nil?: true
|
|
195
204
|
)
|
|
196
205
|
|
|
197
|
-
# @!attribute index
|
|
198
|
-
# The index of the choice in the list of choices.
|
|
199
|
-
#
|
|
200
|
-
# @return [Integer]
|
|
201
|
-
required :index, Integer
|
|
202
|
-
|
|
203
206
|
# @!attribute logprobs
|
|
204
207
|
# Log probability information for the choice.
|
|
205
208
|
#
|
|
206
209
|
# @return [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Logprobs, nil]
|
|
207
210
|
optional :logprobs, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs }, nil?: true
|
|
208
211
|
|
|
209
|
-
# @!method initialize(delta:,
|
|
212
|
+
# @!method initialize(delta:, index:, finish_reason: nil, logprobs: nil)
|
|
210
213
|
# @param delta [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta]
|
|
211
|
-
# A chat completion delta generated by streamed model responses.
|
|
214
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
215
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
216
|
+
# final audio update contains only its expiry timestamp.
|
|
217
|
+
#
|
|
218
|
+
# @param index [Integer]
|
|
219
|
+
# The index of the choice in the list of choices.
|
|
212
220
|
#
|
|
213
221
|
# @param finish_reason [Symbol, OpenAI::Models::Chat::ChatCompletionChunk::Choice::FinishReason, nil]
|
|
214
222
|
# The reason the model stopped generating tokens. This will be `stop` if the model
|
|
@@ -216,16 +224,21 @@ module OpenAI
|
|
|
216
224
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
217
225
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
218
226
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
219
|
-
# function.
|
|
220
|
-
#
|
|
221
|
-
# @param index [Integer]
|
|
222
|
-
# The index of the choice in the list of choices.
|
|
227
|
+
# function. Omitted from the final audio update containing only
|
|
228
|
+
# `delta.audio.expires_at`.
|
|
223
229
|
#
|
|
224
230
|
# @param logprobs [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Logprobs, nil]
|
|
225
231
|
# Log probability information for the choice.
|
|
226
232
|
|
|
227
233
|
# @see OpenAI::Models::Chat::ChatCompletionChunk::Choice#delta
|
|
228
234
|
class Delta < OpenAI::Internal::Type::BaseModel
|
|
235
|
+
# @!attribute audio
|
|
236
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
237
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
238
|
+
#
|
|
239
|
+
# @return [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::Audio, nil]
|
|
240
|
+
optional :audio, -> { OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio }
|
|
241
|
+
|
|
229
242
|
# @!attribute content
|
|
230
243
|
# The contents of the chunk message.
|
|
231
244
|
#
|
|
@@ -261,8 +274,14 @@ module OpenAI
|
|
|
261
274
|
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall] }
|
|
262
275
|
)
|
|
263
276
|
|
|
264
|
-
# @!method initialize(content: nil, function_call: nil, refusal: nil, role: nil, tool_calls: nil)
|
|
265
|
-
# A chat completion delta generated by streamed model responses.
|
|
277
|
+
# @!method initialize(audio: nil, content: nil, function_call: nil, refusal: nil, role: nil, tool_calls: nil)
|
|
278
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
279
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
280
|
+
# final audio update contains only its expiry timestamp.
|
|
281
|
+
#
|
|
282
|
+
# @param audio [OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::Audio]
|
|
283
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
284
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
266
285
|
#
|
|
267
286
|
# @param content [String, nil]
|
|
268
287
|
# The contents of the chunk message.
|
|
@@ -279,6 +298,53 @@ module OpenAI
|
|
|
279
298
|
#
|
|
280
299
|
# @param tool_calls [Array<OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta::ToolCall>]
|
|
281
300
|
|
|
301
|
+
# @see OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta#audio
|
|
302
|
+
class Audio < OpenAI::Internal::Type::BaseModel
|
|
303
|
+
# @!attribute id
|
|
304
|
+
# Unique identifier for this audio response.
|
|
305
|
+
#
|
|
306
|
+
# @return [String, nil]
|
|
307
|
+
optional :id, String
|
|
308
|
+
|
|
309
|
+
# @!attribute data
|
|
310
|
+
# Base64 encoded audio bytes generated by the model, in the format specified in
|
|
311
|
+
# the request.
|
|
312
|
+
#
|
|
313
|
+
# @return [String, nil]
|
|
314
|
+
optional :data, String
|
|
315
|
+
|
|
316
|
+
# @!attribute expires_at
|
|
317
|
+
# The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
318
|
+
# accessible on the server for use in multi-turn conversations.
|
|
319
|
+
#
|
|
320
|
+
# @return [Integer, nil]
|
|
321
|
+
optional :expires_at, Integer
|
|
322
|
+
|
|
323
|
+
# @!attribute transcript
|
|
324
|
+
# Transcript text from this audio chunk.
|
|
325
|
+
#
|
|
326
|
+
# @return [String, nil]
|
|
327
|
+
optional :transcript, String
|
|
328
|
+
|
|
329
|
+
# @!method initialize(id: nil, data: nil, expires_at: nil, transcript: nil)
|
|
330
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
331
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
332
|
+
#
|
|
333
|
+
# @param id [String]
|
|
334
|
+
# Unique identifier for this audio response.
|
|
335
|
+
#
|
|
336
|
+
# @param data [String]
|
|
337
|
+
# Base64 encoded audio bytes generated by the model, in the format specified in
|
|
338
|
+
# the request.
|
|
339
|
+
#
|
|
340
|
+
# @param expires_at [Integer]
|
|
341
|
+
# The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
342
|
+
# accessible on the server for use in multi-turn conversations.
|
|
343
|
+
#
|
|
344
|
+
# @param transcript [String]
|
|
345
|
+
# Transcript text from this audio chunk.
|
|
346
|
+
end
|
|
347
|
+
|
|
282
348
|
# @deprecated
|
|
283
349
|
#
|
|
284
350
|
# @see OpenAI::Models::Chat::ChatCompletionChunk::Choice::Delta#function_call
|
|
@@ -409,7 +475,8 @@ module OpenAI
|
|
|
409
475
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
410
476
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
411
477
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
412
|
-
# function.
|
|
478
|
+
# function. Omitted from the final audio update containing only
|
|
479
|
+
# `delta.audio.expires_at`.
|
|
413
480
|
#
|
|
414
481
|
# @see OpenAI::Models::Chat::ChatCompletionChunk::Choice#finish_reason
|
|
415
482
|
module FinishReason
|
|
@@ -19,80 +19,258 @@ module OpenAI
|
|
|
19
19
|
GPT_5_4_NANO = :"gpt-5.4-nano"
|
|
20
20
|
GPT_5_4_MINI_2026_03_17 = :"gpt-5.4-mini-2026-03-17"
|
|
21
21
|
GPT_5_4_NANO_2026_03_17 = :"gpt-5.4-nano-2026-03-17"
|
|
22
|
+
# @deprecated Announced shutdown date: 2026-08-10. See
|
|
23
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
24
|
+
# replacements.
|
|
22
25
|
GPT_5_3_CHAT_LATEST = :"gpt-5.3-chat-latest"
|
|
23
26
|
GPT_5_2 = :"gpt-5.2"
|
|
24
27
|
GPT_5_2_2025_12_11 = :"gpt-5.2-2025-12-11"
|
|
28
|
+
# @deprecated Announced shutdown date: 2026-08-10. See
|
|
29
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
30
|
+
# replacements.
|
|
25
31
|
GPT_5_2_CHAT_LATEST = :"gpt-5.2-chat-latest"
|
|
26
32
|
GPT_5_2_PRO = :"gpt-5.2-pro"
|
|
27
33
|
GPT_5_2_PRO_2025_12_11 = :"gpt-5.2-pro-2025-12-11"
|
|
28
34
|
GPT_5_1 = :"gpt-5.1"
|
|
29
35
|
GPT_5_1_2025_11_13 = :"gpt-5.1-2025-11-13"
|
|
36
|
+
# @deprecated Announced shutdown date: 2026-07-23. See
|
|
37
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
38
|
+
# replacements.
|
|
30
39
|
GPT_5_1_CODEX = :"gpt-5.1-codex"
|
|
40
|
+
# @deprecated Not a supported model ID. Retained for SDK compatibility.
|
|
31
41
|
GPT_5_1_MINI = :"gpt-5.1-mini"
|
|
42
|
+
# @deprecated Announced shutdown date: 2026-07-23. See
|
|
43
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
44
|
+
# replacements.
|
|
32
45
|
GPT_5_1_CHAT_LATEST = :"gpt-5.1-chat-latest"
|
|
46
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
47
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
48
|
+
# replacements.
|
|
33
49
|
GPT_5 = :"gpt-5"
|
|
50
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
51
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
52
|
+
# replacements.
|
|
34
53
|
GPT_5_MINI = :"gpt-5-mini"
|
|
54
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
55
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
56
|
+
# replacements.
|
|
35
57
|
GPT_5_NANO = :"gpt-5-nano"
|
|
58
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
59
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
60
|
+
# replacements.
|
|
36
61
|
GPT_5_2025_08_07 = :"gpt-5-2025-08-07"
|
|
62
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
63
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
64
|
+
# replacements.
|
|
37
65
|
GPT_5_MINI_2025_08_07 = :"gpt-5-mini-2025-08-07"
|
|
66
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
67
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
68
|
+
# replacements.
|
|
38
69
|
GPT_5_NANO_2025_08_07 = :"gpt-5-nano-2025-08-07"
|
|
70
|
+
# @deprecated Announced shutdown date: 2026-07-23. See
|
|
71
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
72
|
+
# replacements.
|
|
39
73
|
GPT_5_CHAT_LATEST = :"gpt-5-chat-latest"
|
|
40
74
|
GPT_4_1 = :"gpt-4.1"
|
|
41
75
|
GPT_4_1_MINI = :"gpt-4.1-mini"
|
|
76
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
77
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
78
|
+
# replacements.
|
|
42
79
|
GPT_4_1_NANO = :"gpt-4.1-nano"
|
|
43
80
|
GPT_4_1_2025_04_14 = :"gpt-4.1-2025-04-14"
|
|
44
81
|
GPT_4_1_MINI_2025_04_14 = :"gpt-4.1-mini-2025-04-14"
|
|
82
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
83
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
84
|
+
# replacements.
|
|
45
85
|
GPT_4_1_NANO_2025_04_14 = :"gpt-4.1-nano-2025-04-14"
|
|
86
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
87
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
88
|
+
# replacements.
|
|
46
89
|
O4_MINI = :"o4-mini"
|
|
90
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
91
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
92
|
+
# replacements.
|
|
47
93
|
O4_MINI_2025_04_16 = :"o4-mini-2025-04-16"
|
|
94
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
95
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
96
|
+
# replacements.
|
|
48
97
|
O3 = :o3
|
|
98
|
+
# @deprecated Announced shutdown date: 2026-12-11. See
|
|
99
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
100
|
+
# replacements.
|
|
49
101
|
O3_2025_04_16 = :"o3-2025-04-16"
|
|
102
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
103
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
104
|
+
# replacements.
|
|
50
105
|
O3_MINI = :"o3-mini"
|
|
106
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
107
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
108
|
+
# replacements.
|
|
51
109
|
O3_MINI_2025_01_31 = :"o3-mini-2025-01-31"
|
|
110
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
111
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
112
|
+
# replacements.
|
|
52
113
|
O1 = :o1
|
|
114
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
115
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
116
|
+
# replacements.
|
|
53
117
|
O1_2024_12_17 = :"o1-2024-12-17"
|
|
118
|
+
# @deprecated Announced shutdown date: 2025-07-28. See
|
|
119
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
120
|
+
# replacements.
|
|
54
121
|
O1_PREVIEW = :"o1-preview"
|
|
122
|
+
# @deprecated Announced shutdown date: 2025-07-28. See
|
|
123
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
124
|
+
# replacements.
|
|
55
125
|
O1_PREVIEW_2024_09_12 = :"o1-preview-2024-09-12"
|
|
126
|
+
# @deprecated Announced shutdown date: 2025-10-27. See
|
|
127
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
128
|
+
# replacements.
|
|
56
129
|
O1_MINI = :"o1-mini"
|
|
130
|
+
# @deprecated Announced shutdown date: 2025-10-27. See
|
|
131
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
132
|
+
# replacements.
|
|
57
133
|
O1_MINI_2024_09_12 = :"o1-mini-2024-09-12"
|
|
58
134
|
GPT_4O = :"gpt-4o"
|
|
59
135
|
GPT_4O_2024_11_20 = :"gpt-4o-2024-11-20"
|
|
60
136
|
GPT_4O_2024_08_06 = :"gpt-4o-2024-08-06"
|
|
137
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
138
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
139
|
+
# replacements.
|
|
61
140
|
GPT_4O_2024_05_13 = :"gpt-4o-2024-05-13"
|
|
141
|
+
# @deprecated Announced shutdown date: 2027-01-20. See
|
|
142
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
143
|
+
# replacements.
|
|
62
144
|
GPT_AUDIO_MINI = :"gpt-audio-mini"
|
|
145
|
+
# @deprecated Announced shutdown date: 2027-01-20. See
|
|
146
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
147
|
+
# replacements.
|
|
63
148
|
GPT_AUDIO_MINI_2025_12_15 = :"gpt-audio-mini-2025-12-15"
|
|
149
|
+
# @deprecated Announced shutdown date: 2026-05-07. See
|
|
150
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
151
|
+
# replacements.
|
|
64
152
|
GPT_4O_AUDIO_PREVIEW = :"gpt-4o-audio-preview"
|
|
153
|
+
# @deprecated Announced shutdown date: 2025-10-10. See
|
|
154
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
155
|
+
# replacements.
|
|
65
156
|
GPT_4O_AUDIO_PREVIEW_2024_10_01 = :"gpt-4o-audio-preview-2024-10-01"
|
|
157
|
+
# @deprecated Announced shutdown date: 2026-05-07. See
|
|
158
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
159
|
+
# replacements.
|
|
66
160
|
GPT_4O_AUDIO_PREVIEW_2024_12_17 = :"gpt-4o-audio-preview-2024-12-17"
|
|
161
|
+
# @deprecated Announced shutdown date: 2026-05-07. See
|
|
162
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
163
|
+
# replacements.
|
|
67
164
|
GPT_4O_AUDIO_PREVIEW_2025_06_03 = :"gpt-4o-audio-preview-2025-06-03"
|
|
165
|
+
# @deprecated Announced shutdown date: 2026-05-07. See
|
|
166
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
167
|
+
# replacements.
|
|
68
168
|
GPT_4O_MINI_AUDIO_PREVIEW = :"gpt-4o-mini-audio-preview"
|
|
169
|
+
# @deprecated Announced shutdown date: 2026-05-07. See
|
|
170
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
171
|
+
# replacements.
|
|
69
172
|
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17 = :"gpt-4o-mini-audio-preview-2024-12-17"
|
|
173
|
+
# @deprecated Announced shutdown date: 2026-07-23. See
|
|
174
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
175
|
+
# replacements.
|
|
70
176
|
GPT_4O_SEARCH_PREVIEW = :"gpt-4o-search-preview"
|
|
177
|
+
# @deprecated Announced shutdown date: 2026-07-23. See
|
|
178
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
179
|
+
# replacements.
|
|
71
180
|
GPT_4O_MINI_SEARCH_PREVIEW = :"gpt-4o-mini-search-preview"
|
|
181
|
+
# @deprecated Announced shutdown date: 2026-07-23. See
|
|
182
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
183
|
+
# replacements.
|
|
72
184
|
GPT_4O_SEARCH_PREVIEW_2025_03_11 = :"gpt-4o-search-preview-2025-03-11"
|
|
185
|
+
# @deprecated Announced shutdown date: 2026-07-23. See
|
|
186
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
187
|
+
# replacements.
|
|
73
188
|
GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11 = :"gpt-4o-mini-search-preview-2025-03-11"
|
|
189
|
+
# @deprecated Announced shutdown date: 2026-02-17. See
|
|
190
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
191
|
+
# replacements.
|
|
74
192
|
CHATGPT_4O_LATEST = :"chatgpt-4o-latest"
|
|
193
|
+
# @deprecated Announced shutdown date: 2026-02-12. See
|
|
194
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
195
|
+
# replacements.
|
|
75
196
|
CODEX_MINI_LATEST = :"codex-mini-latest"
|
|
76
197
|
GPT_4O_MINI = :"gpt-4o-mini"
|
|
77
198
|
GPT_4O_MINI_2024_07_18 = :"gpt-4o-mini-2024-07-18"
|
|
199
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
200
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
201
|
+
# replacements.
|
|
78
202
|
GPT_4_TURBO = :"gpt-4-turbo"
|
|
203
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
204
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
205
|
+
# replacements.
|
|
79
206
|
GPT_4_TURBO_2024_04_09 = :"gpt-4-turbo-2024-04-09"
|
|
207
|
+
# @deprecated Announced shutdown date: 2026-03-26. See
|
|
208
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
209
|
+
# replacements.
|
|
80
210
|
GPT_4_0125_PREVIEW = :"gpt-4-0125-preview"
|
|
211
|
+
# @deprecated Announced shutdown date: 2026-03-26. See
|
|
212
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
213
|
+
# replacements.
|
|
81
214
|
GPT_4_TURBO_PREVIEW = :"gpt-4-turbo-preview"
|
|
215
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
216
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
217
|
+
# replacements.
|
|
82
218
|
GPT_4_1106_PREVIEW = :"gpt-4-1106-preview"
|
|
219
|
+
# @deprecated Announced shutdown date: 2024-12-06. See
|
|
220
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
221
|
+
# replacements.
|
|
83
222
|
GPT_4_VISION_PREVIEW = :"gpt-4-vision-preview"
|
|
223
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
224
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
225
|
+
# replacements.
|
|
84
226
|
GPT_4 = :"gpt-4"
|
|
227
|
+
# @deprecated Announced shutdown date: 2026-03-26. See
|
|
228
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
229
|
+
# replacements.
|
|
85
230
|
GPT_4_0314 = :"gpt-4-0314"
|
|
231
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
232
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
233
|
+
# replacements.
|
|
86
234
|
GPT_4_0613 = :"gpt-4-0613"
|
|
235
|
+
# @deprecated Announced shutdown date: 2025-06-06. See
|
|
236
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
237
|
+
# replacements.
|
|
87
238
|
GPT_4_32K = :"gpt-4-32k"
|
|
239
|
+
# @deprecated Announced shutdown date: 2025-06-06. See
|
|
240
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
241
|
+
# replacements.
|
|
88
242
|
GPT_4_32K_0314 = :"gpt-4-32k-0314"
|
|
243
|
+
# @deprecated Announced shutdown date: 2025-06-06. See
|
|
244
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
245
|
+
# replacements.
|
|
89
246
|
GPT_4_32K_0613 = :"gpt-4-32k-0613"
|
|
247
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
248
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
249
|
+
# replacements.
|
|
90
250
|
GPT_3_5_TURBO = :"gpt-3.5-turbo"
|
|
251
|
+
# @deprecated Announced shutdown date: 2024-09-13. See
|
|
252
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
253
|
+
# replacements.
|
|
91
254
|
GPT_3_5_TURBO_16K = :"gpt-3.5-turbo-16k"
|
|
255
|
+
# @deprecated Announced shutdown date: 2024-09-13. See
|
|
256
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
257
|
+
# replacements.
|
|
92
258
|
GPT_3_5_TURBO_0301 = :"gpt-3.5-turbo-0301"
|
|
259
|
+
# @deprecated Announced shutdown date: 2024-09-13. See
|
|
260
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
261
|
+
# replacements.
|
|
93
262
|
GPT_3_5_TURBO_0613 = :"gpt-3.5-turbo-0613"
|
|
263
|
+
# @deprecated Announced shutdown date: 2026-09-28. See
|
|
264
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
265
|
+
# replacements.
|
|
94
266
|
GPT_3_5_TURBO_1106 = :"gpt-3.5-turbo-1106"
|
|
267
|
+
# @deprecated Announced shutdown date: 2026-10-23. See
|
|
268
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
269
|
+
# replacements.
|
|
95
270
|
GPT_3_5_TURBO_0125 = :"gpt-3.5-turbo-0125"
|
|
271
|
+
# @deprecated Announced shutdown date: 2024-09-13. See
|
|
272
|
+
# https://developers.openai.com/api/docs/deprecations for details and recommended
|
|
273
|
+
# replacements.
|
|
96
274
|
GPT_3_5_TURBO_16K_0613 = :"gpt-3.5-turbo-16k-0613"
|
|
97
275
|
|
|
98
276
|
# @!method self.values
|
|
@@ -49,19 +49,30 @@ module OpenAI
|
|
|
49
49
|
# @return [String, Symbol, OpenAI::Models::ErrorObject::Misalignment::ErrorType, nil]
|
|
50
50
|
optional :error_type, union: -> { OpenAI::ErrorObject::Misalignment::ErrorType }
|
|
51
51
|
|
|
52
|
+
# @!attribute review_target
|
|
53
|
+
# An opaque target for explicitly continuing this review, or null when
|
|
54
|
+
# unavailable.
|
|
55
|
+
#
|
|
56
|
+
# @return [String, nil]
|
|
57
|
+
optional :review_target, String, nil?: true
|
|
58
|
+
|
|
52
59
|
# @!attribute steer
|
|
53
60
|
# An optional public continuation instruction.
|
|
54
61
|
#
|
|
55
62
|
# @return [OpenAI::Models::ErrorObject::Misalignment::Steer, nil]
|
|
56
63
|
optional :steer, -> { OpenAI::ErrorObject::Misalignment::Steer }
|
|
57
64
|
|
|
58
|
-
# @!method initialize(detailed_explanation: nil, error_type: nil, steer: nil)
|
|
65
|
+
# @!method initialize(detailed_explanation: nil, error_type: nil, review_target: nil, steer: nil)
|
|
59
66
|
# @param detailed_explanation [String]
|
|
60
67
|
# The public explanation for this block.
|
|
61
68
|
#
|
|
62
69
|
# @param error_type [String, Symbol, OpenAI::Models::ErrorObject::Misalignment::ErrorType]
|
|
63
70
|
# An optional classification; clients must accept additional values.
|
|
64
71
|
#
|
|
72
|
+
# @param review_target [String, nil]
|
|
73
|
+
# An opaque target for explicitly continuing this review, or null when
|
|
74
|
+
# unavailable.
|
|
75
|
+
#
|
|
65
76
|
# @param steer [OpenAI::Models::ErrorObject::Misalignment::Steer]
|
|
66
77
|
# An optional public continuation instruction.
|
|
67
78
|
|
|
@@ -552,7 +552,7 @@ module OpenAI
|
|
|
552
552
|
# The name of the grader.
|
|
553
553
|
#
|
|
554
554
|
# @param range [Array<Float>]
|
|
555
|
-
# The
|
|
555
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
556
556
|
#
|
|
557
557
|
# @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams]
|
|
558
558
|
# The sampling parameters for the model.
|
|
@@ -261,7 +261,7 @@ module OpenAI
|
|
|
261
261
|
# The name of the grader.
|
|
262
262
|
#
|
|
263
263
|
# @param range [Array<Float>]
|
|
264
|
-
# The
|
|
264
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
265
265
|
#
|
|
266
266
|
# @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams]
|
|
267
267
|
# The sampling parameters for the model.
|
|
@@ -261,7 +261,7 @@ module OpenAI
|
|
|
261
261
|
# The name of the grader.
|
|
262
262
|
#
|
|
263
263
|
# @param range [Array<Float>]
|
|
264
|
-
# The
|
|
264
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
265
265
|
#
|
|
266
266
|
# @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams]
|
|
267
267
|
# The sampling parameters for the model.
|
|
@@ -261,7 +261,7 @@ module OpenAI
|
|
|
261
261
|
# The name of the grader.
|
|
262
262
|
#
|
|
263
263
|
# @param range [Array<Float>]
|
|
264
|
-
# The
|
|
264
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
265
265
|
#
|
|
266
266
|
# @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams]
|
|
267
267
|
# The sampling parameters for the model.
|
|
@@ -261,7 +261,7 @@ module OpenAI
|
|
|
261
261
|
# The name of the grader.
|
|
262
262
|
#
|
|
263
263
|
# @param range [Array<Float>]
|
|
264
|
-
# The
|
|
264
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
265
265
|
#
|
|
266
266
|
# @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams]
|
|
267
267
|
# The sampling parameters for the model.
|
|
@@ -21,8 +21,13 @@ module OpenAI
|
|
|
21
21
|
optional :limit, Integer
|
|
22
22
|
|
|
23
23
|
# @!attribute metadata
|
|
24
|
-
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`.
|
|
25
|
-
#
|
|
24
|
+
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Omitting
|
|
25
|
+
# the parameter or passing an empty object applies no metadata filter. An empty
|
|
26
|
+
# value, such as `metadata[k]=`, filters for that key with an empty string value.
|
|
27
|
+
# To select jobs with null metadata, send the literal query string
|
|
28
|
+
# `metadata=null`. Nullable caller types do not specify how a client serializes
|
|
29
|
+
# null for a deep-object parameter. Use a raw query parameter if the client omits
|
|
30
|
+
# null. Do not combine the two query forms.
|
|
26
31
|
#
|
|
27
32
|
# @return [Hash{Symbol=>String}, nil]
|
|
28
33
|
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
@@ -35,8 +40,13 @@ module OpenAI
|
|
|
35
40
|
# Number of fine-tuning jobs to retrieve.
|
|
36
41
|
#
|
|
37
42
|
# @param metadata [Hash{Symbol=>String}, nil]
|
|
38
|
-
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`.
|
|
39
|
-
#
|
|
43
|
+
# Optional metadata filter. To filter, use the syntax `metadata[k]=v`. Omitting
|
|
44
|
+
# the parameter or passing an empty object applies no metadata filter. An empty
|
|
45
|
+
# value, such as `metadata[k]=`, filters for that key with an empty string value.
|
|
46
|
+
# To select jobs with null metadata, send the literal query string
|
|
47
|
+
# `metadata=null`. Nullable caller types do not specify how a client serializes
|
|
48
|
+
# null for a deep-object parameter. Use a raw query parameter if the client omits
|
|
49
|
+
# null. Do not combine the two query forms.
|
|
40
50
|
#
|
|
41
51
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
42
52
|
end
|
|
@@ -30,7 +30,7 @@ module OpenAI
|
|
|
30
30
|
required :type, const: :score_model
|
|
31
31
|
|
|
32
32
|
# @!attribute range
|
|
33
|
-
# The
|
|
33
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
34
34
|
#
|
|
35
35
|
# @return [Array<Float>, nil]
|
|
36
36
|
optional :range, OpenAI::Internal::Type::ArrayOf[Float]
|
|
@@ -55,7 +55,7 @@ module OpenAI
|
|
|
55
55
|
# The name of the grader.
|
|
56
56
|
#
|
|
57
57
|
# @param range [Array<Float>]
|
|
58
|
-
# The
|
|
58
|
+
# The service requires two numbers for the score range. Defaults to `[0, 1]`.
|
|
59
59
|
#
|
|
60
60
|
# @param sampling_params [OpenAI::Models::Graders::ScoreModelGrader::SamplingParams]
|
|
61
61
|
# The sampling parameters for the model.
|
data/lib/openai/models/image.rb
CHANGED
|
@@ -4,23 +4,23 @@ module OpenAI
|
|
|
4
4
|
module Models
|
|
5
5
|
class Image < OpenAI::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute b64_json
|
|
7
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
8
|
-
# image models,
|
|
9
|
-
#
|
|
7
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
8
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
9
|
+
# support that parameter.
|
|
10
10
|
#
|
|
11
11
|
# @return [String, nil]
|
|
12
12
|
optional :b64_json, String
|
|
13
13
|
|
|
14
14
|
# @!attribute revised_prompt
|
|
15
|
-
#
|
|
15
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
16
|
+
# revision. Not returned by GPT image models.
|
|
16
17
|
#
|
|
17
18
|
# @return [String, nil]
|
|
18
19
|
optional :revised_prompt, String
|
|
19
20
|
|
|
20
21
|
# @!attribute url
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
# models.
|
|
22
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
23
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
24
24
|
#
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
optional :url, String
|
|
@@ -29,17 +29,17 @@ module OpenAI
|
|
|
29
29
|
# Represents the content or the URL of an image generated by the OpenAI API.
|
|
30
30
|
#
|
|
31
31
|
# @param b64_json [String]
|
|
32
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
33
|
-
# image models,
|
|
34
|
-
#
|
|
32
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
33
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
34
|
+
# support that parameter.
|
|
35
35
|
#
|
|
36
36
|
# @param revised_prompt [String]
|
|
37
|
-
#
|
|
37
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
38
|
+
# revision. Not returned by GPT image models.
|
|
38
39
|
#
|
|
39
40
|
# @param url [String]
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
# models.
|
|
41
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
42
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
end
|