openai 0.98.0 → 0.99.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 +7 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_completions_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_costs_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_images_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +16 -3
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +16 -3
- 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/session_create_params.rb +0 -3
- data/lib/openai/models/beta/agents/session_update_params.rb +0 -3
- data/lib/openai/models/beta/beta_response.rb +220 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +220 -0
- data/lib/openai/models/beta/beta_tool.rb +3 -9
- 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/chat/chat_completion_audio_param.rb +6 -3
- data/lib/openai/models/chat_model.rb +178 -0
- 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 +76 -87
- 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_response_create_audio_output.rb +9 -6
- data/lib/openai/models/responses/response_compact_params.rb +220 -0
- data/lib/openai/models/responses/tool.rb +3 -9
- data/lib/openai/models/responses_model.rb +42 -0
- 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/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/images.rb +71 -103
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +8 -0
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +19 -2
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +19 -2
- 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/session_create_params.rbi +0 -3
- data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -3
- data/rbi/openai/models/beta/beta_tool.rbi +3 -9
- data/rbi/openai/models/chat/chat_completion_audio_param.rbi +6 -3
- 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 +61 -82
- 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/responses/tool.rbi +3 -9
- 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/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/images.rbi +69 -103
- data/rbi/openai/resources/webhooks.rbi +5 -0
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_images_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +20 -3
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +20 -3
- 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/session_create_params.rbs +1 -5
- data/sig/openai/models/beta/agents/session_update_params.rbs +1 -5
- data/sig/openai/models/beta/beta_tool.rbs +3 -9
- data/sig/openai/models/chat/chat_completion_audio_param.rbs +4 -2
- 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 +46 -60
- 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/tool.rbs +3 -9
- 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/webhooks.rbs +6 -1
- metadata +25 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice_create_params =
|
|
5
|
+
{
|
|
6
|
+
body: OpenAI::Models::Audio::VoiceCreateParams::body,
|
|
7
|
+
?request_options: OpenAI::request_opts
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class VoiceCreateParams < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
12
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
13
|
+
|
|
14
|
+
# Creates a voice from a consent recording and an audio sample. Requires
|
|
15
|
+
# multipart/form-data.
|
|
16
|
+
attr_accessor body: OpenAI::Models::Audio::VoiceCreateParams::body
|
|
17
|
+
|
|
18
|
+
# @param body
|
|
19
|
+
# Creates a voice from a consent recording and an audio sample. Requires
|
|
20
|
+
# multipart/form-data.
|
|
21
|
+
def initialize: (
|
|
22
|
+
body: OpenAI::Models::Audio::VoiceCreateParams::body,
|
|
23
|
+
?request_options: OpenAI::request_opts
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
body: OpenAI::Models::Audio::VoiceCreateParams::body,
|
|
28
|
+
?request_options: OpenAI::RequestOptions
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type body =
|
|
32
|
+
OpenAI::Audio::VoiceCreateParams::Body::AudioSample
|
|
33
|
+
| OpenAI::Audio::VoiceCreateParams::Body::Prompt
|
|
34
|
+
|
|
35
|
+
module Body
|
|
36
|
+
extend OpenAI::Internal::Type::Union
|
|
37
|
+
|
|
38
|
+
type audio_sample =
|
|
39
|
+
{
|
|
40
|
+
audio_sample: OpenAI::Internal::file_input,
|
|
41
|
+
consent: String,
|
|
42
|
+
name: String,
|
|
43
|
+
?type: OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::type_
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
class AudioSample < OpenAI::Internal::Type::BaseModel
|
|
47
|
+
# The sample audio recording file. Maximum size is 10 MiB.
|
|
48
|
+
#
|
|
49
|
+
# Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
50
|
+
# `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
51
|
+
#
|
|
52
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
53
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
54
|
+
# content type.
|
|
55
|
+
attr_accessor audio_sample: OpenAI::Internal::file_input
|
|
56
|
+
|
|
57
|
+
# The consent recording ID (for example, `cons_1234`).
|
|
58
|
+
attr_accessor consent: String
|
|
59
|
+
|
|
60
|
+
# The name of the new voice.
|
|
61
|
+
attr_accessor name: String
|
|
62
|
+
|
|
63
|
+
# The voice creation method. Defaults to `audio_sample` when omitted.
|
|
64
|
+
attr_reader type: OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::type_?
|
|
65
|
+
|
|
66
|
+
# The voice creation method. Defaults to `audio_sample` when omitted.
|
|
67
|
+
def type=: (
|
|
68
|
+
OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::type_
|
|
69
|
+
) -> OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::type_
|
|
70
|
+
|
|
71
|
+
# @param audio_sample
|
|
72
|
+
# The sample audio recording file. Maximum size is 10 MiB.
|
|
73
|
+
#
|
|
74
|
+
# Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
75
|
+
# `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
76
|
+
#
|
|
77
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
78
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
79
|
+
# content type.
|
|
80
|
+
# @param consent
|
|
81
|
+
# The consent recording ID (for example, `cons_1234`).
|
|
82
|
+
# @param name
|
|
83
|
+
# The name of the new voice.
|
|
84
|
+
# @param type
|
|
85
|
+
# The voice creation method. Defaults to `audio_sample` when omitted.
|
|
86
|
+
def initialize: (
|
|
87
|
+
audio_sample: OpenAI::Internal::file_input,
|
|
88
|
+
consent: String,
|
|
89
|
+
name: String,
|
|
90
|
+
?type: OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::type_
|
|
91
|
+
) -> void
|
|
92
|
+
|
|
93
|
+
def to_hash: -> {
|
|
94
|
+
audio_sample: OpenAI::Internal::file_input,
|
|
95
|
+
consent: String,
|
|
96
|
+
name: String,
|
|
97
|
+
?type: OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::type_
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
type type_ = :audio_sample
|
|
101
|
+
|
|
102
|
+
module Type
|
|
103
|
+
extend OpenAI::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
AUDIO_SAMPLE: :audio_sample
|
|
106
|
+
|
|
107
|
+
def self?.values: -> ::Array[OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample::type_]
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
type prompt =
|
|
112
|
+
{
|
|
113
|
+
name: String,
|
|
114
|
+
prompt: String,
|
|
115
|
+
type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_,
|
|
116
|
+
?model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model,
|
|
117
|
+
?script_hint: String
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
class Prompt < OpenAI::Internal::Type::BaseModel
|
|
121
|
+
# The name of the new voice.
|
|
122
|
+
attr_accessor name: String
|
|
123
|
+
|
|
124
|
+
# A description of the desired voice. Must not contain only whitespace.
|
|
125
|
+
attr_accessor prompt: String
|
|
126
|
+
|
|
127
|
+
# Set to `prompt` to create a voice from a text description.
|
|
128
|
+
attr_accessor type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_
|
|
129
|
+
|
|
130
|
+
# The voice creation model to use. Defaults to `auto`.
|
|
131
|
+
attr_reader model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model?
|
|
132
|
+
|
|
133
|
+
# The voice creation model to use. Defaults to `auto`.
|
|
134
|
+
def model=: (
|
|
135
|
+
OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model
|
|
136
|
+
) -> OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model
|
|
137
|
+
|
|
138
|
+
# Optional text for the voice to speak during creation. If omitted, a script is
|
|
139
|
+
# generated from the prompt. Must not be blank after trimming whitespace; scripts
|
|
140
|
+
# that are too short are rejected.
|
|
141
|
+
attr_reader script_hint: String?
|
|
142
|
+
|
|
143
|
+
# Optional text for the voice to speak during creation. If omitted, a script is
|
|
144
|
+
# generated from the prompt. Must not be blank after trimming whitespace; scripts
|
|
145
|
+
# that are too short are rejected.
|
|
146
|
+
def script_hint=: (String) -> String
|
|
147
|
+
|
|
148
|
+
# @param name
|
|
149
|
+
# The name of the new voice.
|
|
150
|
+
# @param prompt
|
|
151
|
+
# A description of the desired voice. Must not contain only whitespace.
|
|
152
|
+
# @param type
|
|
153
|
+
# Set to `prompt` to create a voice from a text description.
|
|
154
|
+
# @param model
|
|
155
|
+
# The voice creation model to use. Defaults to `auto`.
|
|
156
|
+
# @param script_hint
|
|
157
|
+
# Optional text for the voice to speak during creation. If omitted, a script is
|
|
158
|
+
# generated from the prompt. Must not be blank after trimming whitespace; scripts
|
|
159
|
+
# that are too short are rejected.
|
|
160
|
+
def initialize: (
|
|
161
|
+
name: String,
|
|
162
|
+
prompt: String,
|
|
163
|
+
type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_,
|
|
164
|
+
?model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model,
|
|
165
|
+
?script_hint: String
|
|
166
|
+
) -> void
|
|
167
|
+
|
|
168
|
+
def to_hash: -> {
|
|
169
|
+
name: String,
|
|
170
|
+
prompt: String,
|
|
171
|
+
type: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_,
|
|
172
|
+
?model: OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model,
|
|
173
|
+
?script_hint: String
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type type_ = :prompt
|
|
177
|
+
|
|
178
|
+
module Type
|
|
179
|
+
extend OpenAI::Internal::Type::Enum
|
|
180
|
+
|
|
181
|
+
PROMPT: :prompt
|
|
182
|
+
|
|
183
|
+
def self?.values: -> ::Array[OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::type_]
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
type model = String | :auto | :"2026-10-01"
|
|
187
|
+
|
|
188
|
+
module Model
|
|
189
|
+
extend OpenAI::Internal::Type::Union
|
|
190
|
+
|
|
191
|
+
def self?.variants: -> ::Array[OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::model]
|
|
192
|
+
|
|
193
|
+
AUTO: :auto
|
|
194
|
+
MODEL_2026_10_01: :"2026-10-01"
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
def self?.variants: -> ::Array[OpenAI::Models::Audio::VoiceCreateParams::body]
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
end
|
|
@@ -98,8 +98,7 @@ module OpenAI
|
|
|
98
98
|
?request_options: OpenAI::RequestOptions
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
type service_tier =
|
|
102
|
-
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
101
|
+
type service_tier = :auto | :default | :flex | :priority | :fast
|
|
103
102
|
|
|
104
103
|
module ServiceTier
|
|
105
104
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -119,9 +118,6 @@ module OpenAI
|
|
|
119
118
|
# Uses the fast service tier.
|
|
120
119
|
FAST: :fast
|
|
121
120
|
|
|
122
|
-
# Uses the ultrafast service tier.
|
|
123
|
-
ULTRAFAST: :ultrafast
|
|
124
|
-
|
|
125
121
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentCreateParams::service_tier]
|
|
126
122
|
end
|
|
127
123
|
end
|
|
@@ -106,8 +106,7 @@ module OpenAI
|
|
|
106
106
|
?request_options: OpenAI::RequestOptions
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
type service_tier =
|
|
110
|
-
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
109
|
+
type service_tier = :auto | :default | :flex | :priority | :fast
|
|
111
110
|
|
|
112
111
|
module ServiceTier
|
|
113
112
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -127,9 +126,6 @@ module OpenAI
|
|
|
127
126
|
# Uses the fast service tier.
|
|
128
127
|
FAST: :fast
|
|
129
128
|
|
|
130
|
-
# Uses the ultrafast service tier.
|
|
131
|
-
ULTRAFAST: :ultrafast
|
|
132
|
-
|
|
133
129
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentUpdateParams::service_tier]
|
|
134
130
|
end
|
|
135
131
|
end
|
|
@@ -163,8 +163,7 @@ module OpenAI
|
|
|
163
163
|
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
type service_tier =
|
|
167
|
-
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
166
|
+
type service_tier = :auto | :default | :flex | :priority | :fast
|
|
168
167
|
|
|
169
168
|
module ServiceTier
|
|
170
169
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -184,9 +183,6 @@ module OpenAI
|
|
|
184
183
|
# Uses the fast service tier.
|
|
185
184
|
FAST: :fast
|
|
186
185
|
|
|
187
|
-
# Uses the ultrafast service tier.
|
|
188
|
-
ULTRAFAST: :ultrafast
|
|
189
|
-
|
|
190
186
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionCreateParams::Agent::service_tier]
|
|
191
187
|
end
|
|
192
188
|
end
|
|
@@ -129,8 +129,7 @@ module OpenAI
|
|
|
129
129
|
end
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
-
type service_tier =
|
|
133
|
-
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
132
|
+
type service_tier = :auto | :default | :flex | :priority | :fast
|
|
134
133
|
|
|
135
134
|
module ServiceTier
|
|
136
135
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -150,9 +149,6 @@ module OpenAI
|
|
|
150
149
|
# Uses the fast service tier.
|
|
151
150
|
FAST: :fast
|
|
152
151
|
|
|
153
|
-
# Uses the ultrafast service tier.
|
|
154
|
-
ULTRAFAST: :ultrafast
|
|
155
|
-
|
|
156
152
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier]
|
|
157
153
|
end
|
|
158
154
|
end
|
|
@@ -729,9 +729,7 @@ module OpenAI
|
|
|
729
729
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
730
730
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
731
731
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
732
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
733
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
734
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
732
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
735
733
|
attr_reader size: OpenAI::Models::Beta::BetaTool::ImageGeneration::size?
|
|
736
734
|
|
|
737
735
|
# The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
@@ -743,9 +741,7 @@ module OpenAI
|
|
|
743
741
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
744
742
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
745
743
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
746
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
747
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
748
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
744
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
749
745
|
def size=: (
|
|
750
746
|
OpenAI::Models::Beta::BetaTool::ImageGeneration::size
|
|
751
747
|
) -> OpenAI::Models::Beta::BetaTool::ImageGeneration::size
|
|
@@ -800,9 +796,7 @@ module OpenAI
|
|
|
800
796
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
801
797
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
802
798
|
# `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
803
|
-
# `auto` is supported for models that allow automatic sizing.
|
|
804
|
-
# one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
805
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
799
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
806
800
|
# @param type
|
|
807
801
|
# The type of the image generation tool. Always `image_generation`.
|
|
808
802
|
def initialize: (
|
|
@@ -17,7 +17,8 @@ module OpenAI
|
|
|
17
17
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
18
18
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
19
19
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
20
|
-
# for example `{ "id": "voice_1234" }`.
|
|
20
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
21
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
21
22
|
attr_accessor voice: OpenAI::Models::Chat::ChatCompletionAudioParam::voice
|
|
22
23
|
|
|
23
24
|
# @param format_
|
|
@@ -27,7 +28,8 @@ module OpenAI
|
|
|
27
28
|
# The voice the model uses to respond. Supported built-in voices are `alloy`,
|
|
28
29
|
# `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
|
|
29
30
|
# `marin`, and `cedar`. You may also provide a custom voice object with an `id`,
|
|
30
|
-
# for example `{ "id": "voice_1234" }`.
|
|
31
|
+
# for example `{ "id": "voice_1234" }`. Custom voices must be created from audio
|
|
32
|
+
# samples. Voices created from text prompts are supported only in Live.
|
|
31
33
|
def initialize: (
|
|
32
34
|
format_: OpenAI::Models::Chat::ChatCompletionAudioParam::format_,
|
|
33
35
|
voice: OpenAI::Models::Chat::ChatCompletionAudioParam::voice
|
data/sig/openai/models/image.rbs
CHANGED
|
@@ -3,42 +3,42 @@ module OpenAI
|
|
|
3
3
|
type image = { ?:b64_json => String, ?revised_prompt: String, ?url: String }
|
|
4
4
|
|
|
5
5
|
class Image < OpenAI::Internal::Type::BaseModel
|
|
6
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
7
|
-
# image models,
|
|
8
|
-
#
|
|
6
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
7
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
8
|
+
# support that parameter.
|
|
9
9
|
attr_reader b64_json: String?
|
|
10
10
|
|
|
11
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
12
|
-
# image models,
|
|
13
|
-
#
|
|
11
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
12
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
13
|
+
# support that parameter.
|
|
14
14
|
def b64_json=: (String) -> String
|
|
15
15
|
|
|
16
|
-
#
|
|
16
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
17
|
+
# revision. Not returned by GPT image models.
|
|
17
18
|
attr_reader revised_prompt: String?
|
|
18
19
|
|
|
19
|
-
#
|
|
20
|
+
# The revised prompt used to generate the image, for models that support prompt
|
|
21
|
+
# revision. Not returned by GPT image models.
|
|
20
22
|
def revised_prompt=: (String) -> String
|
|
21
23
|
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# models.
|
|
24
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
25
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
25
26
|
attr_reader url: String?
|
|
26
27
|
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# models.
|
|
28
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
29
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
30
30
|
def url=: (String) -> String
|
|
31
31
|
|
|
32
32
|
# @param b64_json
|
|
33
|
-
# The base64-encoded JSON of the generated image. Returned by default for
|
|
34
|
-
# image models,
|
|
35
|
-
#
|
|
33
|
+
# The base64-encoded JSON of the generated image. Returned by default for GPT
|
|
34
|
+
# image models, or when `response_format` is set to `b64_json` for models that
|
|
35
|
+
# support that parameter.
|
|
36
36
|
# @param revised_prompt
|
|
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
|
# @param url
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# models.
|
|
40
|
+
# The URL of the generated image when `response_format` is set to `url` for models
|
|
41
|
+
# that support that parameter. Unsupported for GPT image models.
|
|
42
42
|
def initialize: (
|
|
43
43
|
?b64_json: String,
|
|
44
44
|
?revised_prompt: String,
|
|
@@ -23,8 +23,8 @@ module OpenAI
|
|
|
23
23
|
# content type.
|
|
24
24
|
attr_accessor image: OpenAI::Internal::file_input
|
|
25
25
|
|
|
26
|
-
# The model
|
|
27
|
-
#
|
|
26
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
27
|
+
# longer accepts requests.
|
|
28
28
|
attr_accessor model: OpenAI::Models::ImageCreateVariationParams::model?
|
|
29
29
|
|
|
30
30
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -57,8 +57,8 @@ module OpenAI
|
|
|
57
57
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
58
58
|
# content type.
|
|
59
59
|
# @param model
|
|
60
|
-
# The model
|
|
61
|
-
#
|
|
60
|
+
# The legacy model used by the retired image variations endpoint. This endpoint no
|
|
61
|
+
# longer accepts requests.
|
|
62
62
|
# @param n
|
|
63
63
|
# The number of images to generate. Must be between 1 and 10.
|
|
64
64
|
# @param response_format
|
|
@@ -32,16 +32,13 @@ module OpenAI
|
|
|
32
32
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
33
33
|
# images.
|
|
34
34
|
#
|
|
35
|
-
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
36
|
-
# file less than 4MB.
|
|
37
|
-
#
|
|
38
35
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
39
36
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
40
37
|
# content type.
|
|
41
38
|
attr_accessor image: OpenAI::Models::ImageEditParams::image
|
|
42
39
|
|
|
43
|
-
# A text description of the desired image(s). The maximum length is
|
|
44
|
-
# characters for
|
|
40
|
+
# A text description of the desired image(s). The maximum length is 32000
|
|
41
|
+
# characters for the GPT image models.
|
|
45
42
|
attr_accessor prompt: String
|
|
46
43
|
|
|
47
44
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
@@ -80,12 +77,11 @@ module OpenAI
|
|
|
80
77
|
# content type.
|
|
81
78
|
def mask=: (OpenAI::Internal::file_input) -> OpenAI::Internal::file_input
|
|
82
79
|
|
|
83
|
-
# The model to use for image
|
|
84
|
-
#
|
|
85
|
-
# `gpt-image-2-
|
|
86
|
-
# `gpt-image-2.5-
|
|
87
|
-
# `
|
|
88
|
-
# `gpt-image-1.5`.
|
|
80
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
81
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
82
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
83
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
84
|
+
# `chatgpt-image-latest`).
|
|
89
85
|
attr_accessor model: OpenAI::Models::ImageEditParams::model?
|
|
90
86
|
|
|
91
87
|
# The number of images to generate. Must be between 1 and 10.
|
|
@@ -115,24 +111,21 @@ module OpenAI
|
|
|
115
111
|
# `xhigh` and `max`. Defaults to `auto`.
|
|
116
112
|
attr_accessor quality: OpenAI::Models::ImageEditParams::quality?
|
|
117
113
|
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
# generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
121
|
-
# `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
114
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
115
|
+
# image models, which always return base64-encoded images.
|
|
122
116
|
attr_accessor response_format: OpenAI::Models::ImageEditParams::response_format?
|
|
123
117
|
|
|
124
|
-
# The size of the generated images.
|
|
125
|
-
# `gpt-image-2
|
|
126
|
-
# `gpt-image-2.5-
|
|
127
|
-
# resolutions are supported as
|
|
128
|
-
# Width and height must both be
|
|
129
|
-
# must be between 1:3 and 3:1.
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
# `
|
|
134
|
-
#
|
|
135
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
118
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
119
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
120
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
121
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
122
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
123
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
124
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
125
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
126
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
127
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
128
|
+
# models that allow automatic sizing.
|
|
136
129
|
attr_accessor size: OpenAI::Models::ImageEditParams::size?
|
|
137
130
|
|
|
138
131
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
@@ -155,15 +148,12 @@ module OpenAI
|
|
|
155
148
|
# be a `png`, `webp`, or `jpg` file less than 50MB. You can provide up to 16
|
|
156
149
|
# images.
|
|
157
150
|
#
|
|
158
|
-
# For `dall-e-2`, you can only provide one image, and it should be a square `png`
|
|
159
|
-
# file less than 4MB.
|
|
160
|
-
#
|
|
161
151
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
162
152
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
163
153
|
# content type.
|
|
164
154
|
# @param prompt
|
|
165
|
-
# A text description of the desired image(s). The maximum length is
|
|
166
|
-
# characters for
|
|
155
|
+
# A text description of the desired image(s). The maximum length is 32000
|
|
156
|
+
# characters for the GPT image models.
|
|
167
157
|
# @param background
|
|
168
158
|
# Allows to set transparency for the background of the generated image(s). Must be
|
|
169
159
|
# one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
@@ -188,12 +178,11 @@ module OpenAI
|
|
|
188
178
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
189
179
|
# content type.
|
|
190
180
|
# @param model
|
|
191
|
-
# The model to use for image
|
|
192
|
-
#
|
|
193
|
-
# `gpt-image-2-
|
|
194
|
-
# `gpt-image-2.5-
|
|
195
|
-
# `
|
|
196
|
-
# `gpt-image-1.5`.
|
|
181
|
+
# The GPT image model to use for image editing (`gpt-image-1`, `gpt-image-1-mini`,
|
|
182
|
+
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
183
|
+
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
184
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
185
|
+
# `chatgpt-image-latest`).
|
|
197
186
|
# @param n
|
|
198
187
|
# The number of images to generate. Must be between 1 and 10.
|
|
199
188
|
# @param output_compression
|
|
@@ -217,23 +206,20 @@ module OpenAI
|
|
|
217
206
|
# `gpt-image-2.5-flare`, including their `2026-09-08` snapshots, also support
|
|
218
207
|
# `xhigh` and `max`. Defaults to `auto`.
|
|
219
208
|
# @param response_format
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
# generated. This parameter is only supported for `dall-e-2` (default is `url` for
|
|
223
|
-
# `dall-e-2`), as GPT image models always return base64-encoded images.
|
|
209
|
+
# Legacy response format parameter for retired image models. Unsupported for GPT
|
|
210
|
+
# image models, which always return base64-encoded images.
|
|
224
211
|
# @param size
|
|
225
|
-
# The size of the generated images.
|
|
226
|
-
# `gpt-image-2
|
|
227
|
-
# `gpt-image-2.5-
|
|
228
|
-
# resolutions are supported as
|
|
229
|
-
# Width and height must both be
|
|
230
|
-
# must be between 1:3 and 3:1.
|
|
231
|
-
#
|
|
232
|
-
#
|
|
233
|
-
#
|
|
234
|
-
# `
|
|
235
|
-
#
|
|
236
|
-
# `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
212
|
+
# The size of the generated images. Defaults to `auto`. For `gpt-image-2`,
|
|
213
|
+
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
214
|
+
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and
|
|
215
|
+
# `gpt-image-2.5-flare-2026-09-08`, arbitrary resolutions are supported as
|
|
216
|
+
# `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be
|
|
217
|
+
# divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1.
|
|
218
|
+
# Resolutions above `2560x1440` are experimental, and the maximum supported
|
|
219
|
+
# resolution is `3840x2160`. The requested size must also satisfy the model's
|
|
220
|
+
# current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
|
|
221
|
+
# `1024x1536` are supported by the GPT image models; `auto` is supported for
|
|
222
|
+
# models that allow automatic sizing.
|
|
237
223
|
# @param user
|
|
238
224
|
# A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
239
225
|
# and detect abuse.
|
|
@@ -328,18 +314,18 @@ module OpenAI
|
|
|
328
314
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::output_format]
|
|
329
315
|
end
|
|
330
316
|
|
|
331
|
-
type quality = :
|
|
317
|
+
type quality = :low | :medium | :high | :xhigh | :max | :auto | :standard
|
|
332
318
|
|
|
333
319
|
module Quality
|
|
334
320
|
extend OpenAI::Internal::Type::Enum
|
|
335
321
|
|
|
336
|
-
STANDARD: :standard
|
|
337
322
|
LOW: :low
|
|
338
323
|
MEDIUM: :medium
|
|
339
324
|
HIGH: :high
|
|
340
325
|
XHIGH: :xhigh
|
|
341
326
|
MAX: :max
|
|
342
327
|
AUTO: :auto
|
|
328
|
+
STANDARD: :standard
|
|
343
329
|
|
|
344
330
|
def self?.values: -> ::Array[OpenAI::Models::ImageEditParams::quality]
|
|
345
331
|
end
|
|
@@ -357,24 +343,24 @@ module OpenAI
|
|
|
357
343
|
|
|
358
344
|
type size =
|
|
359
345
|
String
|
|
360
|
-
| :"256x256"
|
|
361
|
-
| :"512x512"
|
|
362
346
|
| :"1024x1024"
|
|
363
347
|
| :"1536x1024"
|
|
364
348
|
| :"1024x1536"
|
|
365
349
|
| :auto
|
|
350
|
+
| :"256x256"
|
|
351
|
+
| :"512x512"
|
|
366
352
|
|
|
367
353
|
module Size
|
|
368
354
|
extend OpenAI::Internal::Type::Union
|
|
369
355
|
|
|
370
356
|
def self?.variants: -> ::Array[OpenAI::Models::ImageEditParams::size]
|
|
371
357
|
|
|
372
|
-
SIZE_256X256: :"256x256"
|
|
373
|
-
SIZE_512X512: :"512x512"
|
|
374
358
|
SIZE_1024X1024: :"1024x1024"
|
|
375
359
|
SIZE_1536X1024: :"1536x1024"
|
|
376
360
|
SIZE_1024X1536: :"1024x1536"
|
|
377
361
|
AUTO: :auto
|
|
362
|
+
SIZE_256X256: :"256x256"
|
|
363
|
+
SIZE_512X512: :"512x512"
|
|
378
364
|
end
|
|
379
365
|
end
|
|
380
366
|
end
|