openai 0.100.0 → 0.101.1

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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/openai/client.rb +4 -0
  5. data/lib/openai/models/audio/speech_create_params.rb +3 -6
  6. data/lib/openai/models/audio/voice.rb +4 -9
  7. data/lib/openai/models/audio/voice_create_params.rb +3 -100
  8. data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +1166 -3
  9. data/lib/openai/models/beta/beta_tool_search_output_namespace_tool.rb +176 -0
  10. data/lib/openai/models/chat/chat_completion_audio_param.rb +3 -3
  11. data/lib/openai/models/decision.rb +313 -0
  12. data/lib/openai/models/decision_create_params.rb +233 -0
  13. data/lib/openai/models/decision_input_image.rb +53 -0
  14. data/lib/openai/models/decision_input_message.rb +60 -0
  15. data/lib/openai/models/decision_input_part.rb +20 -0
  16. data/lib/openai/models/decision_input_text.rb +21 -0
  17. data/lib/openai/models/realtime/realtime_audio_config_output.rb +3 -6
  18. data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +3 -6
  19. data/lib/openai/models/responses/response_tool_search_output_item_param.rb +1166 -3
  20. data/lib/openai/models/responses/tool_search_output_namespace_tool.rb +174 -0
  21. data/lib/openai/models.rb +12 -0
  22. data/lib/openai/resources/audio/speech.rb +1 -2
  23. data/lib/openai/resources/audio/voices.rb +10 -10
  24. data/lib/openai/resources/decisions.rb +59 -0
  25. data/lib/openai/version.rb +1 -1
  26. data/lib/openai.rb +9 -0
  27. data/rbi/openai/client.rbi +3 -0
  28. data/rbi/openai/models/audio/speech_create_params.rbi +3 -6
  29. data/rbi/openai/models/audio/voice.rbi +4 -9
  30. data/rbi/openai/models/audio/voice_create_params.rbi +4 -149
  31. data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +1893 -18
  32. data/rbi/openai/models/beta/beta_tool_search_output_namespace_tool.rbi +272 -0
  33. data/rbi/openai/models/chat/chat_completion_audio_param.rbi +3 -3
  34. data/rbi/openai/models/decision.rbi +586 -0
  35. data/rbi/openai/models/decision_create_params.rbi +435 -0
  36. data/rbi/openai/models/decision_input_image.rbi +81 -0
  37. data/rbi/openai/models/decision_input_message.rbi +96 -0
  38. data/rbi/openai/models/decision_input_part.rbi +24 -0
  39. data/rbi/openai/models/decision_input_text.rbi +49 -0
  40. data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +3 -6
  41. data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +3 -6
  42. data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +1901 -18
  43. data/rbi/openai/models/responses/tool_search_output_namespace_tool.rbi +272 -0
  44. data/rbi/openai/models.rbi +12 -0
  45. data/rbi/openai/resources/audio/speech.rbi +1 -2
  46. data/rbi/openai/resources/audio/voices.rbi +10 -13
  47. data/rbi/openai/resources/decisions.rbi +57 -0
  48. data/sig/openai/client.rbs +2 -0
  49. data/sig/openai/models/audio/speech_create_params.rbs +2 -4
  50. data/sig/openai/models/audio/voice.rbs +3 -6
  51. data/sig/openai/models/audio/voice_create_params.rbs +1 -90
  52. data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +993 -4
  53. data/sig/openai/models/beta/beta_tool_search_output_namespace_tool.rbs +162 -0
  54. data/sig/openai/models/chat/chat_completion_audio_param.rbs +2 -2
  55. data/sig/openai/models/decision.rbs +296 -0
  56. data/sig/openai/models/decision_create_params.rbs +227 -0
  57. data/sig/openai/models/decision_input_image.rbs +51 -0
  58. data/sig/openai/models/decision_input_message.rbs +57 -0
  59. data/sig/openai/models/decision_input_part.rbs +12 -0
  60. data/sig/openai/models/decision_input_text.rbs +15 -0
  61. data/sig/openai/models/realtime/realtime_audio_config_output.rbs +3 -6
  62. data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +3 -6
  63. data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +993 -4
  64. data/sig/openai/models/responses/tool_search_output_namespace_tool.rbs +160 -0
  65. data/sig/openai/models.rbs +12 -0
  66. data/sig/openai/resources/decisions.rbs +15 -0
  67. metadata +28 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f48afd92b1ad4726998649830f3158bae15ba7b60dfdb6388453493ffffcec91
4
- data.tar.gz: ad88a01ba827d00dad0f8f05e7d53165a70eae0bf8abdfdf043f0bbcf2ee45b5
3
+ metadata.gz: 76f7d390fded7c11700ad3bd5449bce21cac262612deaedc06c5c2df965fa5e2
4
+ data.tar.gz: e29844fdeeb065f5ccce08487880a1ff5b1b89fe08c5a29fe2b5c9ab2cba6ddf
5
5
  SHA512:
6
- metadata.gz: 7167c3f0f5586c6da077aad8f7203eb4d5b38b70674927750f61836f856d21553a999791bc0ceae1ea052228c7ce1e9fc49d495da3ee1f151fbb951bcd84465c
7
- data.tar.gz: e141202139c857c8e071dfe9c0bb1cb7031fea50a58fda0a601c9b5980b8034babbc73382a573dce97c4ec71cd68cae9d867914d0b7edd97a184b27106d6d54f
6
+ metadata.gz: b5c9ea9bfb85686d4ff3d061e88dd5bbb80bcfdb4789d87d93e5e21fe3dd0b429aa9cb3cc7ca537f8b9f93f9580ba2c9147105269c767ff37a3166605db23c33
7
+ data.tar.gz: 86de051adcf41d15877a3c20cf4c8592f01b44ae4ab95a318dce426493a76cfa9fc13ca5f2b74c02fbf051b3c36781e09f65f60f9b02de41d7e5af9e22cd779b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.101.1](https://github.com/openai/openai-ruby/compare/v0.101.0...v0.101.1) (2026-10-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **api:** correct custom voice creation parameters ([#814](https://github.com/openai/openai-ruby/issues/814)) ([8e6daec](https://github.com/openai/openai-ruby/commit/8e6daecffadccb2f2cd5f442daa63cf4e2b73340))
9
+
10
+ ## [0.101.0](https://github.com/openai/openai-ruby/compare/v0.100.0...v0.101.0) (2026-10-06)
11
+
12
+
13
+ ### Features
14
+
15
+ * **api:** add standalone Decisions support ([#811](https://github.com/openai/openai-ruby/issues/811)) ([ab10fa3](https://github.com/openai/openai-ruby/commit/ab10fa3742cde6fe968d13099917c2c6282bd76d))
16
+
3
17
  ## [0.100.0](https://github.com/openai/openai-ruby/compare/v0.99.0...v0.100.0) (2026-10-06)
4
18
 
5
19
 
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.100.0"
18
+ gem "openai", "~> 0.101.1"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
data/lib/openai/client.rb CHANGED
@@ -40,6 +40,9 @@ module OpenAI
40
40
  # @api private
41
41
  attr_reader :workload_identity_auth
42
42
 
43
+ # @return [OpenAI::Resources::Decisions]
44
+ attr_reader :decisions
45
+
43
46
  # Given a prompt, the model will return one or more predicted completions, and can
44
47
  # also return the probabilities of alternative tokens at each position.
45
48
  # @return [OpenAI::Resources::Completions]
@@ -812,6 +815,7 @@ module OpenAI
812
815
  on_retry: self.on_retry()
813
816
  )
814
817
 
818
+ @decisions = OpenAI::Resources::Decisions.new(client: self)
815
819
  @completions = OpenAI::Resources::Completions.new(client: self)
816
820
  @chat = OpenAI::Resources::Chat.new(client: self)
817
821
  @embeddings = OpenAI::Resources::Embeddings.new(client: self)
@@ -29,8 +29,7 @@ module OpenAI
29
29
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
30
30
  # voices are available in the
31
31
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
32
- # Custom voices must be created from audio samples. Voices created from text
33
- # prompts are supported only in Live.
32
+ # Custom voices must be created from audio samples.
34
33
  #
35
34
  # @return [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice::ID, OpenAI::Models::Audio::SpeechCreateParams::Voice]
36
35
  required :voice, union: -> { OpenAI::Audio::SpeechCreateParams::Voice }
@@ -79,8 +78,7 @@ module OpenAI
79
78
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
80
79
  # voices are available in the
81
80
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
82
- # Custom voices must be created from audio samples. Voices created from text
83
- # prompts are supported only in Live.
81
+ # Custom voices must be created from audio samples.
84
82
  #
85
83
  # @param instructions [String]
86
84
  # Control the voice of your generated audio with additional instructions. Does not
@@ -121,8 +119,7 @@ module OpenAI
121
119
  # object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
122
120
  # voices are available in the
123
121
  # [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options).
124
- # Custom voices must be created from audio samples. Voices created from text
125
- # prompts are supported only in Live.
122
+ # Custom voices must be created from audio samples.
126
123
  module Voice
127
124
  extend OpenAI::Internal::Type::Union
128
125
 
@@ -30,15 +30,13 @@ module OpenAI
30
30
  required :object, const: :"audio.voice"
31
31
 
32
32
  # @!attribute type
33
- # How the voice was created. Voices created from text prompts are supported only
34
- # in Live.
33
+ # How the voice was created.
35
34
  #
36
35
  # @return [Symbol, OpenAI::Models::Audio::Voice::Type]
37
36
  required :type, enum: -> { OpenAI::Audio::Voice::Type }
38
37
 
39
38
  # @!method initialize(id:, created_at:, name:, type:, object: :"audio.voice")
40
- # A custom voice that can be used for audio output. Voices created from text
41
- # prompts are supported only in Live.
39
+ # A custom voice that can be used for audio output.
42
40
  #
43
41
  # @param id [String]
44
42
  # The voice identifier, which can be referenced in API endpoints.
@@ -50,21 +48,18 @@ module OpenAI
50
48
  # The name of the voice.
51
49
  #
52
50
  # @param type [Symbol, OpenAI::Models::Audio::Voice::Type]
53
- # How the voice was created. Voices created from text prompts are supported only
54
- # in Live.
51
+ # How the voice was created.
55
52
  #
56
53
  # @param object [Symbol, :"audio.voice"]
57
54
  # The object type, which is always `audio.voice`.
58
55
 
59
- # How the voice was created. Voices created from text prompts are supported only
60
- # in Live.
56
+ # How the voice was created.
61
57
  #
62
58
  # @see OpenAI::Models::Audio::Voice#type
63
59
  module Type
64
60
  extend OpenAI::Internal::Type::Enum
65
61
 
66
62
  AUDIO_SAMPLE = :audio_sample
67
- PROMPT = :prompt
68
63
 
69
64
  # @!method self.values
70
65
  # @return [Array<Symbol>]
@@ -12,11 +12,11 @@ module OpenAI
12
12
  # Creates a voice from a consent recording and an audio sample. Requires
13
13
  # multipart/form-data.
14
14
  #
15
- # @return [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt]
15
+ # @return [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample]
16
16
  required :body, union: -> { OpenAI::Audio::VoiceCreateParams::Body }
17
17
 
18
18
  # @!method initialize(body:, request_options: {})
19
- # @param body [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt]
19
+ # @param body [OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample]
20
20
  # Creates a voice from a consent recording and an audio sample. Requires
21
21
  # multipart/form-data.
22
22
  #
@@ -43,9 +43,6 @@ module OpenAI
43
43
  # Creates a voice from a consent recording and an audio sample. Requires multipart/form-data.
44
44
  variant :audio_sample, -> { OpenAI::Audio::VoiceCreateParams::Body::AudioSample }
45
45
 
46
- # Creates a synthetic voice from a text description. Supports application/json or multipart/form-data.
47
- variant :prompt, -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt }
48
-
49
46
  class AudioSample < OpenAI::Internal::Type::BaseModel
50
47
  # @!attribute audio_sample
51
48
  # The sample audio recording file. Maximum size is 10 MiB.
@@ -114,102 +111,8 @@ module OpenAI
114
111
  end
115
112
  end
116
113
 
117
- class Prompt < OpenAI::Internal::Type::BaseModel
118
- # @!attribute name
119
- # The name of the new voice.
120
- #
121
- # @return [String]
122
- required :name, String
123
-
124
- # @!attribute prompt
125
- # A description of the desired voice. Must not contain only whitespace.
126
- #
127
- # @return [String]
128
- required :prompt, String
129
-
130
- # @!attribute type
131
- # Set to `prompt` to create a voice from a text description.
132
- #
133
- # @return [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Type]
134
- required :type, enum: -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt::Type }
135
-
136
- # @!attribute model
137
- # The voice creation model to use. Defaults to `auto`.
138
- #
139
- # @return [String, Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model, nil]
140
- optional :model, union: -> { OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model }
141
-
142
- # @!attribute script_hint
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
- #
147
- # @return [String, nil]
148
- optional :script_hint, String
149
-
150
- # @!method initialize(name:, prompt:, type:, model: nil, script_hint: nil)
151
- # Creates a synthetic voice from a text description. Supports application/json or
152
- # multipart/form-data.
153
- #
154
- # @param name [String]
155
- # The name of the new voice.
156
- #
157
- # @param prompt [String]
158
- # A description of the desired voice. Must not contain only whitespace.
159
- #
160
- # @param type [Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Type]
161
- # Set to `prompt` to create a voice from a text description.
162
- #
163
- # @param model [String, Symbol, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model]
164
- # The voice creation model to use. Defaults to `auto`.
165
- #
166
- # @param script_hint [String]
167
- # Optional text for the voice to speak during creation. If omitted, a script is
168
- # generated from the prompt. Must not be blank after trimming whitespace; scripts
169
- # that are too short are rejected.
170
-
171
- # Set to `prompt` to create a voice from a text description.
172
- #
173
- # @see OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt#type
174
- module Type
175
- extend OpenAI::Internal::Type::Enum
176
-
177
- PROMPT = :prompt
178
-
179
- # @!method self.values
180
- # @return [Array<Symbol>]
181
- end
182
-
183
- # The voice creation model to use. Defaults to `auto`.
184
- #
185
- # @see OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt#model
186
- module Model
187
- extend OpenAI::Internal::Type::Union
188
-
189
- variant String
190
-
191
- variant const: -> { OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model::AUTO }
192
-
193
- variant const: -> { OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt::Model::MODEL_2026_10_01 }
194
-
195
- # @!method self.variants
196
- # @return [Array(String, Symbol)]
197
-
198
- define_sorbet_constant!(:Variants) do
199
- T.type_alias { T.any(String, OpenAI::Audio::VoiceCreateParams::Body::Prompt::Model::TaggedSymbol) }
200
- end
201
-
202
- # @!group
203
-
204
- AUTO = :auto
205
- MODEL_2026_10_01 = :"2026-10-01"
206
-
207
- # @!endgroup
208
- end
209
- end
210
-
211
114
  # @!method self.variants
212
- # @return [Array(OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample, OpenAI::Models::Audio::VoiceCreateParams::Body::Prompt)]
115
+ # @return [Array(OpenAI::Models::Audio::VoiceCreateParams::Body::AudioSample)]
213
116
  end
214
117
  end
215
118
  end