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
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
?api_key_id: String?,
|
|
90
90
|
?batch: bool?,
|
|
91
91
|
?input_audio_tokens: Integer,
|
|
92
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
93
|
?input_cache_write_tokens: Integer,
|
|
93
94
|
?input_cached_audio_tokens: Integer,
|
|
94
95
|
?input_cached_image_tokens: Integer,
|
|
@@ -136,10 +137,20 @@ module OpenAI
|
|
|
136
137
|
# The aggregated number of uncached audio input tokens used.
|
|
137
138
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
139
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
140
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
141
|
+
# retention period.
|
|
142
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
143
|
+
|
|
144
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
145
|
+
# retention period.
|
|
146
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
147
|
+
|
|
148
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
149
|
+
# retention period.
|
|
140
150
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
151
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
152
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
153
|
+
# retention period.
|
|
143
154
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
155
|
|
|
145
156
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -242,8 +253,12 @@ module OpenAI
|
|
|
242
253
|
# batch or not.
|
|
243
254
|
# @param input_audio_tokens
|
|
244
255
|
# The aggregated number of uncached audio input tokens used.
|
|
256
|
+
# @param input_cache_write_12h_tokens
|
|
257
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
258
|
+
# retention period.
|
|
245
259
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
260
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
261
|
+
# retention period.
|
|
247
262
|
# @param input_cached_audio_tokens
|
|
248
263
|
# The aggregated number of cached audio input tokens used.
|
|
249
264
|
# @param input_cached_image_tokens
|
|
@@ -286,6 +301,7 @@ module OpenAI
|
|
|
286
301
|
?api_key_id: String?,
|
|
287
302
|
?batch: bool?,
|
|
288
303
|
?input_audio_tokens: Integer,
|
|
304
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
305
|
?input_cache_write_tokens: Integer,
|
|
290
306
|
?input_cached_audio_tokens: Integer,
|
|
291
307
|
?input_cached_image_tokens: Integer,
|
|
@@ -312,6 +328,7 @@ module OpenAI
|
|
|
312
328
|
?api_key_id: String?,
|
|
313
329
|
?batch: bool?,
|
|
314
330
|
?input_audio_tokens: Integer,
|
|
331
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
332
|
?input_cache_write_tokens: Integer,
|
|
316
333
|
?input_cached_audio_tokens: Integer,
|
|
317
334
|
?input_cached_image_tokens: Integer,
|
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
?api_key_id: String?,
|
|
90
90
|
?batch: bool?,
|
|
91
91
|
?input_audio_tokens: Integer,
|
|
92
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
93
|
?input_cache_write_tokens: Integer,
|
|
93
94
|
?input_cached_audio_tokens: Integer,
|
|
94
95
|
?input_cached_image_tokens: Integer,
|
|
@@ -136,10 +137,20 @@ module OpenAI
|
|
|
136
137
|
# The aggregated number of uncached audio input tokens used.
|
|
137
138
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
139
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
140
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
141
|
+
# retention period.
|
|
142
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
143
|
+
|
|
144
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
145
|
+
# retention period.
|
|
146
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
147
|
+
|
|
148
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
149
|
+
# retention period.
|
|
140
150
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
151
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
152
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
153
|
+
# retention period.
|
|
143
154
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
155
|
|
|
145
156
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -242,8 +253,12 @@ module OpenAI
|
|
|
242
253
|
# batch or not.
|
|
243
254
|
# @param input_audio_tokens
|
|
244
255
|
# The aggregated number of uncached audio input tokens used.
|
|
256
|
+
# @param input_cache_write_12h_tokens
|
|
257
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
258
|
+
# retention period.
|
|
245
259
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
260
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
261
|
+
# retention period.
|
|
247
262
|
# @param input_cached_audio_tokens
|
|
248
263
|
# The aggregated number of cached audio input tokens used.
|
|
249
264
|
# @param input_cached_image_tokens
|
|
@@ -286,6 +301,7 @@ module OpenAI
|
|
|
286
301
|
?api_key_id: String?,
|
|
287
302
|
?batch: bool?,
|
|
288
303
|
?input_audio_tokens: Integer,
|
|
304
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
305
|
?input_cache_write_tokens: Integer,
|
|
290
306
|
?input_cached_audio_tokens: Integer,
|
|
291
307
|
?input_cached_image_tokens: Integer,
|
|
@@ -312,6 +328,7 @@ module OpenAI
|
|
|
312
328
|
?api_key_id: String?,
|
|
313
329
|
?batch: bool?,
|
|
314
330
|
?input_audio_tokens: Integer,
|
|
331
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
332
|
?input_cache_write_tokens: Integer,
|
|
316
333
|
?input_cached_audio_tokens: Integer,
|
|
317
334
|
?input_cached_image_tokens: Integer,
|
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
?api_key_id: String?,
|
|
90
90
|
?batch: bool?,
|
|
91
91
|
?input_audio_tokens: Integer,
|
|
92
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
93
|
?input_cache_write_tokens: Integer,
|
|
93
94
|
?input_cached_audio_tokens: Integer,
|
|
94
95
|
?input_cached_image_tokens: Integer,
|
|
@@ -136,10 +137,20 @@ module OpenAI
|
|
|
136
137
|
# The aggregated number of uncached audio input tokens used.
|
|
137
138
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
139
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
140
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
141
|
+
# retention period.
|
|
142
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
143
|
+
|
|
144
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
145
|
+
# retention period.
|
|
146
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
147
|
+
|
|
148
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
149
|
+
# retention period.
|
|
140
150
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
151
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
152
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
153
|
+
# retention period.
|
|
143
154
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
155
|
|
|
145
156
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -242,8 +253,12 @@ module OpenAI
|
|
|
242
253
|
# batch or not.
|
|
243
254
|
# @param input_audio_tokens
|
|
244
255
|
# The aggregated number of uncached audio input tokens used.
|
|
256
|
+
# @param input_cache_write_12h_tokens
|
|
257
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
258
|
+
# retention period.
|
|
245
259
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
260
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
261
|
+
# retention period.
|
|
247
262
|
# @param input_cached_audio_tokens
|
|
248
263
|
# The aggregated number of cached audio input tokens used.
|
|
249
264
|
# @param input_cached_image_tokens
|
|
@@ -286,6 +301,7 @@ module OpenAI
|
|
|
286
301
|
?api_key_id: String?,
|
|
287
302
|
?batch: bool?,
|
|
288
303
|
?input_audio_tokens: Integer,
|
|
304
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
305
|
?input_cache_write_tokens: Integer,
|
|
290
306
|
?input_cached_audio_tokens: Integer,
|
|
291
307
|
?input_cached_image_tokens: Integer,
|
|
@@ -312,6 +328,7 @@ module OpenAI
|
|
|
312
328
|
?api_key_id: String?,
|
|
313
329
|
?batch: bool?,
|
|
314
330
|
?input_audio_tokens: Integer,
|
|
331
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
332
|
?input_cache_write_tokens: Integer,
|
|
316
333
|
?input_cached_audio_tokens: Integer,
|
|
317
334
|
?input_cached_image_tokens: Integer,
|
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
?api_key_id: String?,
|
|
90
90
|
?batch: bool?,
|
|
91
91
|
?input_audio_tokens: Integer,
|
|
92
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
93
|
?input_cache_write_tokens: Integer,
|
|
93
94
|
?input_cached_audio_tokens: Integer,
|
|
94
95
|
?input_cached_image_tokens: Integer,
|
|
@@ -136,10 +137,20 @@ module OpenAI
|
|
|
136
137
|
# The aggregated number of uncached audio input tokens used.
|
|
137
138
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
139
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
140
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
141
|
+
# retention period.
|
|
142
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
143
|
+
|
|
144
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
145
|
+
# retention period.
|
|
146
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
147
|
+
|
|
148
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
149
|
+
# retention period.
|
|
140
150
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
151
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
152
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
153
|
+
# retention period.
|
|
143
154
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
155
|
|
|
145
156
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -242,8 +253,12 @@ module OpenAI
|
|
|
242
253
|
# batch or not.
|
|
243
254
|
# @param input_audio_tokens
|
|
244
255
|
# The aggregated number of uncached audio input tokens used.
|
|
256
|
+
# @param input_cache_write_12h_tokens
|
|
257
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
258
|
+
# retention period.
|
|
245
259
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
260
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
261
|
+
# retention period.
|
|
247
262
|
# @param input_cached_audio_tokens
|
|
248
263
|
# The aggregated number of cached audio input tokens used.
|
|
249
264
|
# @param input_cached_image_tokens
|
|
@@ -286,6 +301,7 @@ module OpenAI
|
|
|
286
301
|
?api_key_id: String?,
|
|
287
302
|
?batch: bool?,
|
|
288
303
|
?input_audio_tokens: Integer,
|
|
304
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
305
|
?input_cache_write_tokens: Integer,
|
|
290
306
|
?input_cached_audio_tokens: Integer,
|
|
291
307
|
?input_cached_image_tokens: Integer,
|
|
@@ -312,6 +328,7 @@ module OpenAI
|
|
|
312
328
|
?api_key_id: String?,
|
|
313
329
|
?batch: bool?,
|
|
314
330
|
?input_audio_tokens: Integer,
|
|
331
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
332
|
?input_cache_write_tokens: Integer,
|
|
316
333
|
?input_cached_audio_tokens: Integer,
|
|
317
334
|
?input_cached_image_tokens: Integer,
|
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
?api_key_id: String?,
|
|
90
90
|
?batch: bool?,
|
|
91
91
|
?input_audio_tokens: Integer,
|
|
92
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
93
|
?input_cache_write_tokens: Integer,
|
|
93
94
|
?input_cached_audio_tokens: Integer,
|
|
94
95
|
?input_cached_image_tokens: Integer,
|
|
@@ -136,10 +137,20 @@ module OpenAI
|
|
|
136
137
|
# The aggregated number of uncached audio input tokens used.
|
|
137
138
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
139
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
140
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
141
|
+
# retention period.
|
|
142
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
143
|
+
|
|
144
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
145
|
+
# retention period.
|
|
146
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
147
|
+
|
|
148
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
149
|
+
# retention period.
|
|
140
150
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
151
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
152
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
153
|
+
# retention period.
|
|
143
154
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
155
|
|
|
145
156
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -242,8 +253,12 @@ module OpenAI
|
|
|
242
253
|
# batch or not.
|
|
243
254
|
# @param input_audio_tokens
|
|
244
255
|
# The aggregated number of uncached audio input tokens used.
|
|
256
|
+
# @param input_cache_write_12h_tokens
|
|
257
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
258
|
+
# retention period.
|
|
245
259
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
260
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
261
|
+
# retention period.
|
|
247
262
|
# @param input_cached_audio_tokens
|
|
248
263
|
# The aggregated number of cached audio input tokens used.
|
|
249
264
|
# @param input_cached_image_tokens
|
|
@@ -286,6 +301,7 @@ module OpenAI
|
|
|
286
301
|
?api_key_id: String?,
|
|
287
302
|
?batch: bool?,
|
|
288
303
|
?input_audio_tokens: Integer,
|
|
304
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
305
|
?input_cache_write_tokens: Integer,
|
|
290
306
|
?input_cached_audio_tokens: Integer,
|
|
291
307
|
?input_cached_image_tokens: Integer,
|
|
@@ -312,6 +328,7 @@ module OpenAI
|
|
|
312
328
|
?api_key_id: String?,
|
|
313
329
|
?batch: bool?,
|
|
314
330
|
?input_audio_tokens: Integer,
|
|
331
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
332
|
?input_cache_write_tokens: Integer,
|
|
316
333
|
?input_cached_audio_tokens: Integer,
|
|
317
334
|
?input_cached_image_tokens: Integer,
|
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
?api_key_id: String?,
|
|
90
90
|
?batch: bool?,
|
|
91
91
|
?input_audio_tokens: Integer,
|
|
92
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
93
|
?input_cache_write_tokens: Integer,
|
|
93
94
|
?input_cached_audio_tokens: Integer,
|
|
94
95
|
?input_cached_image_tokens: Integer,
|
|
@@ -136,10 +137,20 @@ module OpenAI
|
|
|
136
137
|
# The aggregated number of uncached audio input tokens used.
|
|
137
138
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
139
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
140
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
141
|
+
# retention period.
|
|
142
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
143
|
+
|
|
144
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
145
|
+
# retention period.
|
|
146
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
147
|
+
|
|
148
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
149
|
+
# retention period.
|
|
140
150
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
151
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
152
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
153
|
+
# retention period.
|
|
143
154
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
155
|
|
|
145
156
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -242,8 +253,12 @@ module OpenAI
|
|
|
242
253
|
# batch or not.
|
|
243
254
|
# @param input_audio_tokens
|
|
244
255
|
# The aggregated number of uncached audio input tokens used.
|
|
256
|
+
# @param input_cache_write_12h_tokens
|
|
257
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
258
|
+
# retention period.
|
|
245
259
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
260
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
261
|
+
# retention period.
|
|
247
262
|
# @param input_cached_audio_tokens
|
|
248
263
|
# The aggregated number of cached audio input tokens used.
|
|
249
264
|
# @param input_cached_image_tokens
|
|
@@ -286,6 +301,7 @@ module OpenAI
|
|
|
286
301
|
?api_key_id: String?,
|
|
287
302
|
?batch: bool?,
|
|
288
303
|
?input_audio_tokens: Integer,
|
|
304
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
305
|
?input_cache_write_tokens: Integer,
|
|
290
306
|
?input_cached_audio_tokens: Integer,
|
|
291
307
|
?input_cached_image_tokens: Integer,
|
|
@@ -312,6 +328,7 @@ module OpenAI
|
|
|
312
328
|
?api_key_id: String?,
|
|
313
329
|
?batch: bool?,
|
|
314
330
|
?input_audio_tokens: Integer,
|
|
331
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
332
|
?input_cache_write_tokens: Integer,
|
|
316
333
|
?input_cached_audio_tokens: Integer,
|
|
317
334
|
?input_cached_image_tokens: Integer,
|
|
@@ -89,6 +89,7 @@ module OpenAI
|
|
|
89
89
|
?api_key_id: String?,
|
|
90
90
|
?batch: bool?,
|
|
91
91
|
?input_audio_tokens: Integer,
|
|
92
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
92
93
|
?input_cache_write_tokens: Integer,
|
|
93
94
|
?input_cached_audio_tokens: Integer,
|
|
94
95
|
?input_cached_image_tokens: Integer,
|
|
@@ -136,10 +137,20 @@ module OpenAI
|
|
|
136
137
|
# The aggregated number of uncached audio input tokens used.
|
|
137
138
|
def input_audio_tokens=: (Integer) -> Integer
|
|
138
139
|
|
|
139
|
-
# The aggregated number of input tokens written to the cache
|
|
140
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
141
|
+
# retention period.
|
|
142
|
+
attr_reader input_cache_write_12h_tokens: Integer?
|
|
143
|
+
|
|
144
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
145
|
+
# retention period.
|
|
146
|
+
def input_cache_write_12h_tokens=: (Integer) -> Integer
|
|
147
|
+
|
|
148
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
149
|
+
# retention period.
|
|
140
150
|
attr_reader input_cache_write_tokens: Integer?
|
|
141
151
|
|
|
142
|
-
# The aggregated number of input tokens written to the cache
|
|
152
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
153
|
+
# retention period.
|
|
143
154
|
def input_cache_write_tokens=: (Integer) -> Integer
|
|
144
155
|
|
|
145
156
|
# The aggregated number of cached audio input tokens used.
|
|
@@ -242,8 +253,12 @@ module OpenAI
|
|
|
242
253
|
# batch or not.
|
|
243
254
|
# @param input_audio_tokens
|
|
244
255
|
# The aggregated number of uncached audio input tokens used.
|
|
256
|
+
# @param input_cache_write_12h_tokens
|
|
257
|
+
# The aggregated number of input tokens written to the cache with a 12-hour
|
|
258
|
+
# retention period.
|
|
245
259
|
# @param input_cache_write_tokens
|
|
246
|
-
# The aggregated number of input tokens written to the cache
|
|
260
|
+
# The aggregated number of input tokens written to the cache with a 30-minute
|
|
261
|
+
# retention period.
|
|
247
262
|
# @param input_cached_audio_tokens
|
|
248
263
|
# The aggregated number of cached audio input tokens used.
|
|
249
264
|
# @param input_cached_image_tokens
|
|
@@ -286,6 +301,7 @@ module OpenAI
|
|
|
286
301
|
?api_key_id: String?,
|
|
287
302
|
?batch: bool?,
|
|
288
303
|
?input_audio_tokens: Integer,
|
|
304
|
+
?input_cache_write_12h_tokens: Integer,
|
|
289
305
|
?input_cache_write_tokens: Integer,
|
|
290
306
|
?input_cached_audio_tokens: Integer,
|
|
291
307
|
?input_cached_image_tokens: Integer,
|
|
@@ -312,6 +328,7 @@ module OpenAI
|
|
|
312
328
|
?api_key_id: String?,
|
|
313
329
|
?batch: bool?,
|
|
314
330
|
?input_audio_tokens: Integer,
|
|
331
|
+
?:input_cache_write_12h_tokens => Integer,
|
|
315
332
|
?input_cache_write_tokens: Integer,
|
|
316
333
|
?input_cached_audio_tokens: Integer,
|
|
317
334
|
?input_cached_image_tokens: Integer,
|
|
@@ -31,6 +31,8 @@ module OpenAI
|
|
|
31
31
|
# object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
|
|
32
32
|
# voices are available in the
|
|
33
33
|
# [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
|
|
34
|
+
# Custom voices must be created from audio samples. Voices created from text
|
|
35
|
+
# prompts are supported only in Live.
|
|
34
36
|
attr_accessor voice: OpenAI::Models::Audio::SpeechCreateParams::voice
|
|
35
37
|
|
|
36
38
|
# Control the voice of your generated audio with additional instructions. Does not
|
|
@@ -82,6 +84,8 @@ module OpenAI
|
|
|
82
84
|
# object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
|
|
83
85
|
# voices are available in the
|
|
84
86
|
# [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
|
|
87
|
+
# Custom voices must be created from audio samples. Voices created from text
|
|
88
|
+
# prompts are supported only in Live.
|
|
85
89
|
# @param instructions
|
|
86
90
|
# Control the voice of your generated audio with additional instructions. Does not
|
|
87
91
|
# work with `tts-1` or `tts-1-hd`.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Audio
|
|
4
|
+
type voice =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
created_at: Integer,
|
|
8
|
+
name: String,
|
|
9
|
+
?object: :"audio.voice",
|
|
10
|
+
type: OpenAI::Models::Audio::Voice::type_
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class Voice < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The voice identifier, which can be referenced in API endpoints.
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
# The Unix timestamp (in seconds) for when the voice was created.
|
|
18
|
+
attr_accessor created_at: Integer
|
|
19
|
+
|
|
20
|
+
# The name of the voice.
|
|
21
|
+
attr_accessor name: String
|
|
22
|
+
|
|
23
|
+
# The object type, which is always `audio.voice`.
|
|
24
|
+
attr_accessor object: :"audio.voice"
|
|
25
|
+
|
|
26
|
+
# How the voice was created. Voices created from text prompts are supported only
|
|
27
|
+
# in Live.
|
|
28
|
+
attr_accessor type: OpenAI::Models::Audio::Voice::type_
|
|
29
|
+
|
|
30
|
+
# @param id
|
|
31
|
+
# The voice identifier, which can be referenced in API endpoints.
|
|
32
|
+
# @param created_at
|
|
33
|
+
# The Unix timestamp (in seconds) for when the voice was created.
|
|
34
|
+
# @param name
|
|
35
|
+
# The name of the voice.
|
|
36
|
+
# @param type
|
|
37
|
+
# How the voice was created. Voices created from text prompts are supported only
|
|
38
|
+
# in Live.
|
|
39
|
+
# @param object
|
|
40
|
+
# The object type, which is always `audio.voice`.
|
|
41
|
+
def initialize: (
|
|
42
|
+
id: String,
|
|
43
|
+
created_at: Integer,
|
|
44
|
+
name: String,
|
|
45
|
+
type: OpenAI::Models::Audio::Voice::type_,
|
|
46
|
+
?object: :"audio.voice"
|
|
47
|
+
) -> void
|
|
48
|
+
|
|
49
|
+
def to_hash: -> {
|
|
50
|
+
id: String,
|
|
51
|
+
created_at: Integer,
|
|
52
|
+
name: String,
|
|
53
|
+
?object: :"audio.voice",
|
|
54
|
+
type: OpenAI::Models::Audio::Voice::type_
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type type_ = :audio_sample | :prompt
|
|
58
|
+
|
|
59
|
+
module Type
|
|
60
|
+
extend OpenAI::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
AUDIO_SAMPLE: :audio_sample
|
|
63
|
+
PROMPT: :prompt
|
|
64
|
+
|
|
65
|
+
def self?.values: -> ::Array[OpenAI::Models::Audio::Voice::type_]
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|