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,321 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Audio
|
|
7
|
+
|
|
8
|
+
class VoiceCreateParams < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
OrHash = T.type_alias do
|
|
14
|
+
T.any(
|
|
15
|
+
OpenAI::Audio::VoiceCreateParams,
|
|
16
|
+
OpenAI::Internal::AnyHash
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Creates a voice from a consent recording and an audio sample. Requires
|
|
21
|
+
# multipart/form-data.
|
|
22
|
+
sig {
|
|
23
|
+
returns(
|
|
24
|
+
T.any(OpenAI::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Audio::VoiceCreateParams::Body::Prompt)
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
attr_accessor :body
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
|
|
32
|
+
body: T.any(
|
|
33
|
+
OpenAI::Audio::VoiceCreateParams::Body::AudioSample::OrHash,
|
|
34
|
+
OpenAI::Audio::VoiceCreateParams::Body::Prompt::OrHash
|
|
35
|
+
),
|
|
36
|
+
|
|
37
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
38
|
+
)
|
|
39
|
+
.returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
|
|
43
|
+
# Creates a voice from a consent recording and an audio sample. Requires
|
|
44
|
+
# multipart/form-data.
|
|
45
|
+
body:,
|
|
46
|
+
|
|
47
|
+
request_options: {}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
sig do
|
|
52
|
+
override.returns(
|
|
53
|
+
{
|
|
54
|
+
body: T.any(
|
|
55
|
+
OpenAI::Audio::VoiceCreateParams::Body::AudioSample,
|
|
56
|
+
OpenAI::Audio::VoiceCreateParams::Body::Prompt
|
|
57
|
+
),
|
|
58
|
+
request_options: OpenAI::RequestOptions
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
def to_hash
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Creates a voice from a consent recording and an audio sample. Requires
|
|
66
|
+
# multipart/form-data.
|
|
67
|
+
module Body
|
|
68
|
+
extend OpenAI::Internal::Type::Union
|
|
69
|
+
|
|
70
|
+
Variants = T.type_alias {
|
|
71
|
+
T.any(OpenAI::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Audio::VoiceCreateParams::Body::Prompt)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
class AudioSample < OpenAI::Internal::Type::BaseModel
|
|
75
|
+
OrHash = T.type_alias do
|
|
76
|
+
T.any(
|
|
77
|
+
OpenAI::Audio::VoiceCreateParams::Body::AudioSample,
|
|
78
|
+
OpenAI::Internal::AnyHash
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# The sample audio recording file. Maximum size is 10 MiB.
|
|
83
|
+
#
|
|
84
|
+
# Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
85
|
+
# `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
86
|
+
#
|
|
87
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
88
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
89
|
+
# content type.
|
|
90
|
+
sig { returns(OpenAI::Internal::FileInput) }
|
|
91
|
+
attr_accessor :audio_sample
|
|
92
|
+
|
|
93
|
+
# The consent recording ID (for example, `cons_1234`).
|
|
94
|
+
sig { returns(String) }
|
|
95
|
+
attr_accessor :consent
|
|
96
|
+
|
|
97
|
+
# The name of the new voice.
|
|
98
|
+
sig { returns(String) }
|
|
99
|
+
attr_accessor :name
|
|
100
|
+
|
|
101
|
+
# The voice creation method. Defaults to `audio_sample` when omitted.
|
|
102
|
+
sig { returns(T.nilable(OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type::OrSymbol)) }
|
|
103
|
+
attr_reader :type
|
|
104
|
+
|
|
105
|
+
sig { params(type: OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type::OrSymbol).void }
|
|
106
|
+
attr_writer :type
|
|
107
|
+
|
|
108
|
+
# Creates a voice from a consent recording and an audio sample. Requires
|
|
109
|
+
# multipart/form-data.
|
|
110
|
+
sig do
|
|
111
|
+
params(
|
|
112
|
+
|
|
113
|
+
audio_sample: OpenAI::Internal::FileInput,
|
|
114
|
+
|
|
115
|
+
consent: String,
|
|
116
|
+
|
|
117
|
+
name: String,
|
|
118
|
+
|
|
119
|
+
type: OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type::OrSymbol
|
|
120
|
+
)
|
|
121
|
+
.returns(T.attached_class)
|
|
122
|
+
end
|
|
123
|
+
def self.new(
|
|
124
|
+
|
|
125
|
+
# The sample audio recording file. Maximum size is 10 MiB.
|
|
126
|
+
#
|
|
127
|
+
# Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
|
|
128
|
+
# `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
|
|
129
|
+
#
|
|
130
|
+
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
131
|
+
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
132
|
+
# content type.
|
|
133
|
+
audio_sample:,
|
|
134
|
+
|
|
135
|
+
# The consent recording ID (for example, `cons_1234`).
|
|
136
|
+
consent:,
|
|
137
|
+
|
|
138
|
+
# The name of the new voice.
|
|
139
|
+
name:,
|
|
140
|
+
|
|
141
|
+
# The voice creation method. Defaults to `audio_sample` when omitted.
|
|
142
|
+
|
|
143
|
+
type: nil
|
|
144
|
+
)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
sig do
|
|
148
|
+
override.returns(
|
|
149
|
+
{
|
|
150
|
+
audio_sample: OpenAI::Internal::FileInput,
|
|
151
|
+
consent: String,
|
|
152
|
+
name: String,
|
|
153
|
+
type: OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type::OrSymbol
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# The voice creation method. Defaults to `audio_sample` when omitted.
|
|
161
|
+
module Type
|
|
162
|
+
extend OpenAI::Internal::Type::Enum
|
|
163
|
+
|
|
164
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type) }
|
|
165
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
166
|
+
|
|
167
|
+
AUDIO_SAMPLE = T.let(
|
|
168
|
+
:audio_sample,
|
|
169
|
+
OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type::TaggedSymbol
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
sig {
|
|
173
|
+
override.returns(T::Array[OpenAI::Audio::VoiceCreateParams::Body::AudioSample::Type::TaggedSymbol])
|
|
174
|
+
}
|
|
175
|
+
def self.values
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
class Prompt < OpenAI::Internal::Type::BaseModel
|
|
181
|
+
OrHash = T.type_alias do
|
|
182
|
+
T.any(
|
|
183
|
+
OpenAI::Audio::VoiceCreateParams::Body::Prompt,
|
|
184
|
+
OpenAI::Internal::AnyHash
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# The name of the new voice.
|
|
189
|
+
sig { returns(String) }
|
|
190
|
+
attr_accessor :name
|
|
191
|
+
|
|
192
|
+
# A description of the desired voice. Must not contain only whitespace.
|
|
193
|
+
sig { returns(String) }
|
|
194
|
+
attr_accessor :prompt
|
|
195
|
+
|
|
196
|
+
# Set to `prompt` to create a voice from a text description.
|
|
197
|
+
sig { returns(OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::OrSymbol) }
|
|
198
|
+
attr_accessor :type
|
|
199
|
+
|
|
200
|
+
# The voice creation model to use. Defaults to `auto`.
|
|
201
|
+
sig { returns(T.nilable(T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol))) }
|
|
202
|
+
attr_reader :model
|
|
203
|
+
|
|
204
|
+
sig { params(model: T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol)).void }
|
|
205
|
+
attr_writer :model
|
|
206
|
+
|
|
207
|
+
# Optional text for the voice to speak during creation. If omitted, a script is
|
|
208
|
+
# generated from the prompt. Must not be blank after trimming whitespace; scripts
|
|
209
|
+
# that are too short are rejected.
|
|
210
|
+
sig { returns(T.nilable(String)) }
|
|
211
|
+
attr_reader :script_hint
|
|
212
|
+
|
|
213
|
+
sig { params(script_hint: String).void }
|
|
214
|
+
attr_writer :script_hint
|
|
215
|
+
|
|
216
|
+
# Creates a synthetic voice from a text description. Supports application/json or
|
|
217
|
+
# multipart/form-data.
|
|
218
|
+
sig do
|
|
219
|
+
params(
|
|
220
|
+
|
|
221
|
+
name: String,
|
|
222
|
+
|
|
223
|
+
prompt: String,
|
|
224
|
+
|
|
225
|
+
type: OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::OrSymbol,
|
|
226
|
+
|
|
227
|
+
model: T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol),
|
|
228
|
+
|
|
229
|
+
script_hint: String
|
|
230
|
+
)
|
|
231
|
+
.returns(T.attached_class)
|
|
232
|
+
end
|
|
233
|
+
def self.new(
|
|
234
|
+
|
|
235
|
+
# The name of the new voice.
|
|
236
|
+
name:,
|
|
237
|
+
|
|
238
|
+
# A description of the desired voice. Must not contain only whitespace.
|
|
239
|
+
prompt:,
|
|
240
|
+
|
|
241
|
+
# Set to `prompt` to create a voice from a text description.
|
|
242
|
+
type:,
|
|
243
|
+
|
|
244
|
+
# The voice creation model to use. Defaults to `auto`.
|
|
245
|
+
model: nil,
|
|
246
|
+
|
|
247
|
+
# Optional text for the voice to speak during creation. If omitted, a script is
|
|
248
|
+
# generated from the prompt. Must not be blank after trimming whitespace; scripts
|
|
249
|
+
# that are too short are rejected.
|
|
250
|
+
|
|
251
|
+
script_hint: nil
|
|
252
|
+
)
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
sig do
|
|
256
|
+
override.returns(
|
|
257
|
+
{
|
|
258
|
+
name: String,
|
|
259
|
+
prompt: String,
|
|
260
|
+
type: OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::OrSymbol,
|
|
261
|
+
model: T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::OrSymbol),
|
|
262
|
+
script_hint: String
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
def to_hash
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Set to `prompt` to create a voice from a text description.
|
|
270
|
+
module Type
|
|
271
|
+
extend OpenAI::Internal::Type::Enum
|
|
272
|
+
|
|
273
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type) }
|
|
274
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
275
|
+
|
|
276
|
+
PROMPT = T.let(:prompt, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::TaggedSymbol)
|
|
277
|
+
|
|
278
|
+
sig { override.returns(T::Array[OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type::TaggedSymbol]) }
|
|
279
|
+
def self.values
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# The voice creation model to use. Defaults to `auto`.
|
|
284
|
+
module Model
|
|
285
|
+
extend OpenAI::Internal::Type::Union
|
|
286
|
+
|
|
287
|
+
Variants = T.type_alias {
|
|
288
|
+
T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol)
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
sig { override.returns(T::Array[OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::Variants]) }
|
|
292
|
+
def self.variants
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
TaggedSymbol = T.type_alias do
|
|
296
|
+
T.all(Symbol, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model)
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
300
|
+
|
|
301
|
+
AUTO = T.let(:auto, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol)
|
|
302
|
+
MODEL_2026_10_01 = T.let(
|
|
303
|
+
:"2026-10-01",
|
|
304
|
+
OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
sig { override.returns(T::Array[OpenAI::Audio::VoiceCreateParams::Body::Variants]) }
|
|
311
|
+
def self.variants
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
end
|
|
321
|
+
end
|
|
@@ -206,9 +206,6 @@ module OpenAI
|
|
|
206
206
|
# Uses the fast service tier.
|
|
207
207
|
FAST = T.let(:fast, OpenAI::Beta::AgentCreateParams::ServiceTier::TaggedSymbol)
|
|
208
208
|
|
|
209
|
-
# Uses the ultrafast service tier.
|
|
210
|
-
ULTRAFAST = T.let(:ultrafast, OpenAI::Beta::AgentCreateParams::ServiceTier::TaggedSymbol)
|
|
211
|
-
|
|
212
209
|
sig { override.returns(T::Array[OpenAI::Beta::AgentCreateParams::ServiceTier::TaggedSymbol]) }
|
|
213
210
|
def self.values
|
|
214
211
|
end
|
|
@@ -217,9 +217,6 @@ module OpenAI
|
|
|
217
217
|
# Uses the fast service tier.
|
|
218
218
|
FAST = T.let(:fast, OpenAI::Beta::AgentUpdateParams::ServiceTier::TaggedSymbol)
|
|
219
219
|
|
|
220
|
-
# Uses the ultrafast service tier.
|
|
221
|
-
ULTRAFAST = T.let(:ultrafast, OpenAI::Beta::AgentUpdateParams::ServiceTier::TaggedSymbol)
|
|
222
|
-
|
|
223
220
|
sig { override.returns(T::Array[OpenAI::Beta::AgentUpdateParams::ServiceTier::TaggedSymbol]) }
|
|
224
221
|
def self.values
|
|
225
222
|
end
|
|
@@ -312,9 +312,6 @@ module OpenAI
|
|
|
312
312
|
# Uses the fast service tier.
|
|
313
313
|
FAST = T.let(:fast, OpenAI::Beta::Agents::SessionCreateParams::Agent::ServiceTier::TaggedSymbol)
|
|
314
314
|
|
|
315
|
-
# Uses the ultrafast service tier.
|
|
316
|
-
ULTRAFAST = T.let(:ultrafast, OpenAI::Beta::Agents::SessionCreateParams::Agent::ServiceTier::TaggedSymbol)
|
|
317
|
-
|
|
318
315
|
sig {
|
|
319
316
|
override.returns(T::Array[OpenAI::Beta::Agents::SessionCreateParams::Agent::ServiceTier::TaggedSymbol])
|
|
320
317
|
}
|
|
@@ -234,9 +234,6 @@ module OpenAI
|
|
|
234
234
|
# Uses the fast service tier.
|
|
235
235
|
FAST = T.let(:fast, OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::TaggedSymbol)
|
|
236
236
|
|
|
237
|
-
# Uses the ultrafast service tier.
|
|
238
|
-
ULTRAFAST = T.let(:ultrafast, OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::TaggedSymbol)
|
|
239
|
-
|
|
240
237
|
sig {
|
|
241
238
|
override.returns(T::Array[OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::TaggedSymbol])
|
|
242
239
|
}
|
|
@@ -1050,9 +1050,7 @@ module OpenAI
|
|
|
1050
1050
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1051
1051
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1052
1052
|
# `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`.
|
|
1053
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1056
1054
|
sig { returns(T.nilable(T.any(String, OpenAI::Beta::BetaTool::ImageGeneration::Size::OrSymbol))) }
|
|
1057
1055
|
attr_reader :size
|
|
1058
1056
|
|
|
@@ -1150,9 +1148,7 @@ module OpenAI
|
|
|
1150
1148
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1151
1149
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1152
1150
|
# `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`.
|
|
1151
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1156
1152
|
size: nil,
|
|
1157
1153
|
|
|
1158
1154
|
# The type of the image generation tool. Always `image_generation`.
|
|
@@ -1407,9 +1403,7 @@ module OpenAI
|
|
|
1407
1403
|
# the maximum supported resolution is `3840x2160`. The requested size must also
|
|
1408
1404
|
# satisfy the model's current pixel and edge limits. The standard sizes
|
|
1409
1405
|
# `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`.
|
|
1406
|
+
# `auto` is supported for models that allow automatic sizing.
|
|
1413
1407
|
module Size
|
|
1414
1408
|
extend OpenAI::Internal::Type::Union
|
|
1415
1409
|
|
|
@@ -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
|
|
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
|
|