openai 0.107.0 → 0.109.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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +55 -1
  4. data/examples/chat/tool_runner.rb +33 -0
  5. data/lib/openai/client.rb +2 -2
  6. data/lib/openai/helpers/chat/tool_runner.rb +259 -0
  7. data/lib/openai/helpers/client_runtime.rb +11 -0
  8. data/lib/openai/helpers/realtime/recovery.rb +8 -2
  9. data/lib/openai/helpers/responses_websocket/incremental.rb +5 -1
  10. data/lib/openai/helpers/responses_websocket/session.rb +11 -4
  11. data/lib/openai/helpers/streaming/chat_completion_resource.rb +52 -0
  12. data/lib/openai/internal/provider.rb +1 -0
  13. data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +4 -4
  14. data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +4 -4
  15. data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +4 -4
  16. data/lib/openai/models/admin/organization/usage_completions_response.rb +4 -4
  17. data/lib/openai/models/admin/organization/usage_costs_response.rb +4 -4
  18. data/lib/openai/models/admin/organization/usage_decisions_response.rb +4 -4
  19. data/lib/openai/models/admin/organization/usage_embeddings_response.rb +4 -4
  20. data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +4 -4
  21. data/lib/openai/models/admin/organization/usage_images_response.rb +4 -4
  22. data/lib/openai/models/admin/organization/usage_moderations_response.rb +4 -4
  23. data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +4 -4
  24. data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +4 -4
  25. data/lib/openai/models/audio/voice_consent.rb +58 -0
  26. data/lib/openai/models/audio/voice_consent_create_params.rb +57 -0
  27. data/lib/openai/models/audio/voice_consent_delete_params.rb +22 -0
  28. data/lib/openai/models/audio/voice_consent_deleted.rb +34 -0
  29. data/lib/openai/models/audio/voice_consent_list_params.rb +42 -0
  30. data/lib/openai/models/audio/voice_consent_retrieve_params.rb +22 -0
  31. data/lib/openai/models/audio/voice_consent_update_params.rb +32 -0
  32. data/lib/openai/providers/vertex.rb +229 -0
  33. data/lib/openai/resources/audio/voice_consents.rb +163 -0
  34. data/lib/openai/resources/audio.rb +5 -0
  35. data/lib/openai/version.rb +1 -1
  36. data/lib/openai.rb +9 -0
  37. data/rbi/openai/helpers/chat/tool_runner.rbi +74 -0
  38. data/rbi/openai/internal/provider.rbi +3 -0
  39. data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +4 -4
  40. data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +4 -4
  41. data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +4 -4
  42. data/rbi/openai/models/admin/organization/usage_completions_response.rbi +4 -4
  43. data/rbi/openai/models/admin/organization/usage_costs_response.rbi +4 -4
  44. data/rbi/openai/models/admin/organization/usage_decisions_response.rbi +4 -4
  45. data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +4 -4
  46. data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +4 -4
  47. data/rbi/openai/models/admin/organization/usage_images_response.rbi +4 -4
  48. data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +4 -4
  49. data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +4 -4
  50. data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +4 -4
  51. data/rbi/openai/models/audio/voice_consent.rbi +86 -0
  52. data/rbi/openai/models/audio/voice_consent_create_params.rbi +92 -0
  53. data/rbi/openai/models/audio/voice_consent_delete_params.rbi +53 -0
  54. data/rbi/openai/models/audio/voice_consent_deleted.rbi +62 -0
  55. data/rbi/openai/models/audio/voice_consent_list_params.rbi +78 -0
  56. data/rbi/openai/models/audio/voice_consent_retrieve_params.rbi +53 -0
  57. data/rbi/openai/models/audio/voice_consent_update_params.rbi +62 -0
  58. data/rbi/openai/models/response_format_json_schema.rbi +13 -11
  59. data/rbi/openai/providers.rbi +13 -0
  60. data/rbi/openai/resources/audio/voice_consents.rbi +108 -0
  61. data/rbi/openai/resources/audio.rbi +4 -0
  62. data/sig/openai/helpers/chat/tool_runner.rbs +48 -0
  63. data/sig/openai/internal/provider.rbs +3 -1
  64. data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +6 -6
  65. data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +6 -6
  66. data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +6 -6
  67. data/sig/openai/models/admin/organization/usage_completions_response.rbs +6 -6
  68. data/sig/openai/models/admin/organization/usage_costs_response.rbs +6 -6
  69. data/sig/openai/models/admin/organization/usage_decisions_response.rbs +4 -4
  70. data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +6 -6
  71. data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +6 -6
  72. data/sig/openai/models/admin/organization/usage_images_response.rbs +6 -6
  73. data/sig/openai/models/admin/organization/usage_moderations_response.rbs +6 -6
  74. data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +6 -6
  75. data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +6 -6
  76. data/sig/openai/models/audio/voice_consent.rbs +57 -0
  77. data/sig/openai/models/audio/voice_consent_create_params.rbs +61 -0
  78. data/sig/openai/models/audio/voice_consent_delete_params.rbs +25 -0
  79. data/sig/openai/models/audio/voice_consent_deleted.rbs +31 -0
  80. data/sig/openai/models/audio/voice_consent_list_params.rbs +57 -0
  81. data/sig/openai/models/audio/voice_consent_retrieve_params.rbs +25 -0
  82. data/sig/openai/models/audio/voice_consent_update_params.rbs +36 -0
  83. data/sig/openai/providers.rbs +8 -0
  84. data/sig/openai/resources/audio/voice_consents.rbs +38 -0
  85. data/sig/openai/resources/audio.rbs +2 -0
  86. data/vertex.md +29 -0
  87. metadata +32 -1
@@ -245,8 +245,8 @@ module OpenAI
245
245
  optional :input_cache_write_30m_tokens, Integer, nil?: true
246
246
 
247
247
  # @!attribute input_cache_write_tokens
248
- # The aggregated number of input tokens written to the cache with a 30-minute
249
- # retention period.
248
+ # The aggregated number of input tokens written to the cache across 30-minute and
249
+ # 12-hour retention periods.
250
250
  #
251
251
  # @return [Integer, nil]
252
252
  optional :input_cache_write_tokens, Integer
@@ -384,8 +384,8 @@ module OpenAI
384
384
  # retention period. May be absent or null for older responses.
385
385
  #
386
386
  # @param input_cache_write_tokens [Integer]
387
- # The aggregated number of input tokens written to the cache with a 30-minute
388
- # retention period.
387
+ # The aggregated number of input tokens written to the cache across 30-minute and
388
+ # 12-hour retention periods.
389
389
  #
390
390
  # @param input_cached_audio_tokens [Integer]
391
391
  # The aggregated number of cached audio input tokens used.
@@ -241,8 +241,8 @@ module OpenAI
241
241
  optional :input_cache_write_30m_tokens, Integer, nil?: true
242
242
 
243
243
  # @!attribute input_cache_write_tokens
244
- # The aggregated number of input tokens written to the cache with a 30-minute
245
- # retention period.
244
+ # The aggregated number of input tokens written to the cache across 30-minute and
245
+ # 12-hour retention periods.
246
246
  #
247
247
  # @return [Integer, nil]
248
248
  optional :input_cache_write_tokens, Integer
@@ -380,8 +380,8 @@ module OpenAI
380
380
  # retention period. May be absent or null for older responses.
381
381
  #
382
382
  # @param input_cache_write_tokens [Integer]
383
- # The aggregated number of input tokens written to the cache with a 30-minute
384
- # retention period.
383
+ # The aggregated number of input tokens written to the cache across 30-minute and
384
+ # 12-hour retention periods.
385
385
  #
386
386
  # @param input_cached_audio_tokens [Integer]
387
387
  # The aggregated number of cached audio input tokens used.
@@ -239,8 +239,8 @@ module OpenAI
239
239
  optional :input_cache_write_30m_tokens, Integer, nil?: true
240
240
 
241
241
  # @!attribute input_cache_write_tokens
242
- # The aggregated number of input tokens written to the cache with a 30-minute
243
- # retention period.
242
+ # The aggregated number of input tokens written to the cache across 30-minute and
243
+ # 12-hour retention periods.
244
244
  #
245
245
  # @return [Integer, nil]
246
246
  optional :input_cache_write_tokens, Integer
@@ -378,8 +378,8 @@ module OpenAI
378
378
  # retention period. May be absent or null for older responses.
379
379
  #
380
380
  # @param input_cache_write_tokens [Integer]
381
- # The aggregated number of input tokens written to the cache with a 30-minute
382
- # retention period.
381
+ # The aggregated number of input tokens written to the cache across 30-minute and
382
+ # 12-hour retention periods.
383
383
  #
384
384
  # @param input_cached_audio_tokens [Integer]
385
385
  # The aggregated number of cached audio input tokens used.
@@ -145,8 +145,8 @@ module OpenAI
145
145
  optional :input_cache_write_30m_tokens, Integer, nil?: true
146
146
 
147
147
  # @!attribute input_cache_write_tokens
148
- # The aggregated number of input tokens written to the cache with a 30-minute
149
- # retention period.
148
+ # The aggregated number of input tokens written to the cache across 30-minute and
149
+ # 12-hour retention periods.
150
150
  #
151
151
  # @return [Integer, nil]
152
152
  optional :input_cache_write_tokens, Integer, nil?: true
@@ -284,8 +284,8 @@ module OpenAI
284
284
  # retention period.
285
285
  #
286
286
  # @param input_cache_write_tokens [Integer, nil]
287
- # The aggregated number of input tokens written to the cache with a 30-minute
288
- # retention period.
287
+ # The aggregated number of input tokens written to the cache across 30-minute and
288
+ # 12-hour retention periods.
289
289
  #
290
290
  # @param input_cached_audio_tokens [Integer, nil]
291
291
  # The aggregated number of cached audio input tokens used.
@@ -241,8 +241,8 @@ module OpenAI
241
241
  optional :input_cache_write_30m_tokens, Integer, nil?: true
242
242
 
243
243
  # @!attribute input_cache_write_tokens
244
- # The aggregated number of input tokens written to the cache with a 30-minute
245
- # retention period.
244
+ # The aggregated number of input tokens written to the cache across 30-minute and
245
+ # 12-hour retention periods.
246
246
  #
247
247
  # @return [Integer, nil]
248
248
  optional :input_cache_write_tokens, Integer
@@ -380,8 +380,8 @@ module OpenAI
380
380
  # retention period. May be absent or null for older responses.
381
381
  #
382
382
  # @param input_cache_write_tokens [Integer]
383
- # The aggregated number of input tokens written to the cache with a 30-minute
384
- # retention period.
383
+ # The aggregated number of input tokens written to the cache across 30-minute and
384
+ # 12-hour retention periods.
385
385
  #
386
386
  # @param input_cached_audio_tokens [Integer]
387
387
  # The aggregated number of cached audio input tokens used.
@@ -243,8 +243,8 @@ module OpenAI
243
243
  optional :input_cache_write_30m_tokens, Integer, nil?: true
244
244
 
245
245
  # @!attribute input_cache_write_tokens
246
- # The aggregated number of input tokens written to the cache with a 30-minute
247
- # retention period.
246
+ # The aggregated number of input tokens written to the cache across 30-minute and
247
+ # 12-hour retention periods.
248
248
  #
249
249
  # @return [Integer, nil]
250
250
  optional :input_cache_write_tokens, Integer
@@ -382,8 +382,8 @@ module OpenAI
382
382
  # retention period. May be absent or null for older responses.
383
383
  #
384
384
  # @param input_cache_write_tokens [Integer]
385
- # The aggregated number of input tokens written to the cache with a 30-minute
386
- # retention period.
385
+ # The aggregated number of input tokens written to the cache across 30-minute and
386
+ # 12-hour retention periods.
387
387
  #
388
388
  # @param input_cached_audio_tokens [Integer]
389
389
  # The aggregated number of cached audio input tokens used.
@@ -239,8 +239,8 @@ module OpenAI
239
239
  optional :input_cache_write_30m_tokens, Integer, nil?: true
240
240
 
241
241
  # @!attribute input_cache_write_tokens
242
- # The aggregated number of input tokens written to the cache with a 30-minute
243
- # retention period.
242
+ # The aggregated number of input tokens written to the cache across 30-minute and
243
+ # 12-hour retention periods.
244
244
  #
245
245
  # @return [Integer, nil]
246
246
  optional :input_cache_write_tokens, Integer
@@ -378,8 +378,8 @@ module OpenAI
378
378
  # retention period. May be absent or null for older responses.
379
379
  #
380
380
  # @param input_cache_write_tokens [Integer]
381
- # The aggregated number of input tokens written to the cache with a 30-minute
382
- # retention period.
381
+ # The aggregated number of input tokens written to the cache across 30-minute and
382
+ # 12-hour retention periods.
383
383
  #
384
384
  # @param input_cached_audio_tokens [Integer]
385
385
  # The aggregated number of cached audio input tokens used.
@@ -241,8 +241,8 @@ module OpenAI
241
241
  optional :input_cache_write_30m_tokens, Integer, nil?: true
242
242
 
243
243
  # @!attribute input_cache_write_tokens
244
- # The aggregated number of input tokens written to the cache with a 30-minute
245
- # retention period.
244
+ # The aggregated number of input tokens written to the cache across 30-minute and
245
+ # 12-hour retention periods.
246
246
  #
247
247
  # @return [Integer, nil]
248
248
  optional :input_cache_write_tokens, Integer
@@ -380,8 +380,8 @@ module OpenAI
380
380
  # retention period. May be absent or null for older responses.
381
381
  #
382
382
  # @param input_cache_write_tokens [Integer]
383
- # The aggregated number of input tokens written to the cache with a 30-minute
384
- # retention period.
383
+ # The aggregated number of input tokens written to the cache across 30-minute and
384
+ # 12-hour retention periods.
385
385
  #
386
386
  # @param input_cached_audio_tokens [Integer]
387
387
  # The aggregated number of cached audio input tokens used.
@@ -243,8 +243,8 @@ module OpenAI
243
243
  optional :input_cache_write_30m_tokens, Integer, nil?: true
244
244
 
245
245
  # @!attribute input_cache_write_tokens
246
- # The aggregated number of input tokens written to the cache with a 30-minute
247
- # retention period.
246
+ # The aggregated number of input tokens written to the cache across 30-minute and
247
+ # 12-hour retention periods.
248
248
  #
249
249
  # @return [Integer, nil]
250
250
  optional :input_cache_write_tokens, Integer
@@ -382,8 +382,8 @@ module OpenAI
382
382
  # retention period. May be absent or null for older responses.
383
383
  #
384
384
  # @param input_cache_write_tokens [Integer]
385
- # The aggregated number of input tokens written to the cache with a 30-minute
386
- # retention period.
385
+ # The aggregated number of input tokens written to the cache across 30-minute and
386
+ # 12-hour retention periods.
387
387
  #
388
388
  # @param input_cached_audio_tokens [Integer]
389
389
  # The aggregated number of cached audio input tokens used.
@@ -243,8 +243,8 @@ module OpenAI
243
243
  optional :input_cache_write_30m_tokens, Integer, nil?: true
244
244
 
245
245
  # @!attribute input_cache_write_tokens
246
- # The aggregated number of input tokens written to the cache with a 30-minute
247
- # retention period.
246
+ # The aggregated number of input tokens written to the cache across 30-minute and
247
+ # 12-hour retention periods.
248
248
  #
249
249
  # @return [Integer, nil]
250
250
  optional :input_cache_write_tokens, Integer
@@ -382,8 +382,8 @@ module OpenAI
382
382
  # retention period. May be absent or null for older responses.
383
383
  #
384
384
  # @param input_cache_write_tokens [Integer]
385
- # The aggregated number of input tokens written to the cache with a 30-minute
386
- # retention period.
385
+ # The aggregated number of input tokens written to the cache across 30-minute and
386
+ # 12-hour retention periods.
387
387
  #
388
388
  # @param input_cached_audio_tokens [Integer]
389
389
  # The aggregated number of cached audio input tokens used.
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::VoiceConsents#create
7
+ class VoiceConsent < OpenAI::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The consent recording identifier.
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute created_at
15
+ # The Unix timestamp (in seconds) for when the consent recording was created.
16
+ #
17
+ # @return [Integer]
18
+ required :created_at, Integer
19
+
20
+ # @!attribute language
21
+ # The BCP 47 language tag for the consent phrase (for example, `en-US`).
22
+ #
23
+ # @return [String]
24
+ required :language, String
25
+
26
+ # @!attribute name
27
+ # The label provided when the consent recording was uploaded.
28
+ #
29
+ # @return [String]
30
+ required :name, String
31
+
32
+ # @!attribute object
33
+ # The object type, which is always `audio.voice_consent`.
34
+ #
35
+ # @return [Symbol, :"audio.voice_consent"]
36
+ required :object, const: :"audio.voice_consent"
37
+
38
+ # @!method initialize(id:, created_at:, language:, name:, object: :"audio.voice_consent")
39
+ # A consent recording used to authorize creation of a custom voice.
40
+ #
41
+ # @param id [String]
42
+ # The consent recording identifier.
43
+ #
44
+ # @param created_at [Integer]
45
+ # The Unix timestamp (in seconds) for when the consent recording was created.
46
+ #
47
+ # @param language [String]
48
+ # The BCP 47 language tag for the consent phrase (for example, `en-US`).
49
+ #
50
+ # @param name [String]
51
+ # The label provided when the consent recording was uploaded.
52
+ #
53
+ # @param object [Symbol, :"audio.voice_consent"]
54
+ # The object type, which is always `audio.voice_consent`.
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::VoiceConsents#create
7
+ class VoiceConsentCreateParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute language
12
+ # The BCP 47 language tag for the consent phrase (for example, `en-US`).
13
+ #
14
+ # @return [String]
15
+ required :language, String
16
+
17
+ # @!attribute name
18
+ # The label to use for this consent recording.
19
+ #
20
+ # @return [String]
21
+ required :name, String
22
+
23
+ # @!attribute recording
24
+ # The consent audio recording file. Maximum size is 10 MiB.
25
+ #
26
+ # Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
27
+ # `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
28
+ #
29
+ # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
30
+ # metadata. Use `OpenAI::FilePart` when you need to override the filename or
31
+ # content type.
32
+ #
33
+ # @return [Pathname, StringIO, IO, String, OpenAI::FilePart]
34
+ required :recording, OpenAI::Internal::Type::FileInput
35
+
36
+ # @!method initialize(language:, name:, recording:, request_options: {})
37
+ # @param language [String]
38
+ # The BCP 47 language tag for the consent phrase (for example, `en-US`).
39
+ #
40
+ # @param name [String]
41
+ # The label to use for this consent recording.
42
+ #
43
+ # @param recording [Pathname, StringIO, IO, String, OpenAI::FilePart]
44
+ # The consent audio recording file. Maximum size is 10 MiB.
45
+ #
46
+ # Supported MIME types: `audio/mpeg`, `audio/wav`, `audio/x-wav`, `audio/ogg`,
47
+ # `audio/aac`, `audio/flac`, `audio/webm`, `audio/mp4`.
48
+ #
49
+ # `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
50
+ # metadata. Use `OpenAI::FilePart` when you need to override the filename or
51
+ # content type.
52
+ #
53
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::VoiceConsents#delete
7
+ class VoiceConsentDeleteParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute consent_id
12
+ #
13
+ # @return [String]
14
+ required :consent_id, String
15
+
16
+ # @!method initialize(consent_id:, request_options: {})
17
+ # @param consent_id [String]
18
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::VoiceConsents#delete
7
+ class VoiceConsentDeleted < OpenAI::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The consent recording identifier.
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute deleted
15
+ #
16
+ # @return [Boolean]
17
+ required :deleted, OpenAI::Internal::Type::Boolean
18
+
19
+ # @!attribute object
20
+ #
21
+ # @return [Symbol, :"audio.voice_consent"]
22
+ required :object, const: :"audio.voice_consent"
23
+
24
+ # @!method initialize(id:, deleted:, object: :"audio.voice_consent")
25
+ # @param id [String]
26
+ # The consent recording identifier.
27
+ #
28
+ # @param deleted [Boolean]
29
+ #
30
+ # @param object [Symbol, :"audio.voice_consent"]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::VoiceConsents#list
7
+ class VoiceConsentListParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute after
12
+ # A cursor for use in pagination. `after` is an object ID that defines your place
13
+ # in the list. For instance, if you make a list request and receive 100 objects,
14
+ # ending with obj_foo, your subsequent call can include after=obj_foo in order to
15
+ # fetch the next page of the list.
16
+ #
17
+ # @return [String, nil]
18
+ optional :after, String
19
+
20
+ # @!attribute limit
21
+ # A limit on the number of objects to be returned. Limit can range between 1 and
22
+ # 100, and the default is 20.
23
+ #
24
+ # @return [Integer, nil]
25
+ optional :limit, Integer
26
+
27
+ # @!method initialize(after: nil, limit: nil, request_options: {})
28
+ # @param after [String]
29
+ # A cursor for use in pagination. `after` is an object ID that defines your place
30
+ # in the list. For instance, if you make a list request and receive 100 objects,
31
+ # ending with obj_foo, your subsequent call can include after=obj_foo in order to
32
+ # fetch the next page of the list.
33
+ #
34
+ # @param limit [Integer]
35
+ # A limit on the number of objects to be returned. Limit can range between 1 and
36
+ # 100, and the default is 20.
37
+ #
38
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::VoiceConsents#retrieve
7
+ class VoiceConsentRetrieveParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute consent_id
12
+ #
13
+ # @return [String]
14
+ required :consent_id, String
15
+
16
+ # @!method initialize(consent_id:, request_options: {})
17
+ # @param consent_id [String]
18
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Audio
6
+ # @see OpenAI::Resources::Audio::VoiceConsents#update
7
+ class VoiceConsentUpdateParams < OpenAI::Internal::Type::BaseModel
8
+ extend OpenAI::Internal::Type::RequestParameters::Converter
9
+ include OpenAI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute consent_id
12
+ #
13
+ # @return [String]
14
+ required :consent_id, String
15
+
16
+ # @!attribute name
17
+ # The updated label for this consent recording.
18
+ #
19
+ # @return [String]
20
+ required :name, String
21
+
22
+ # @!method initialize(consent_id:, name:, request_options: {})
23
+ # @param consent_id [String]
24
+ #
25
+ # @param name [String]
26
+ # The updated label for this consent recording.
27
+ #
28
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
29
+ end
30
+ end
31
+ end
32
+ end