openai 0.42.0 → 0.43.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +10 -16
  4. data/lib/openai/models/audio/speech_create_params.rb +9 -7
  5. data/lib/openai/models/chat/chat_completion_audio_param.rb +7 -5
  6. data/lib/openai/models/conversations/conversation_item.rb +1 -1
  7. data/lib/openai/models/conversations/message.rb +1 -1
  8. data/lib/openai/models/realtime/realtime_audio_config_output.rb +9 -9
  9. data/lib/openai/models/realtime/realtime_response_create_audio_output.rb +9 -9
  10. data/lib/openai/models/responses/input_token_count_params.rb +4 -7
  11. data/lib/openai/models/responses/response.rb +17 -8
  12. data/lib/openai/models/responses/response_compact_params.rb +1 -0
  13. data/lib/openai/models/responses/response_compaction_item.rb +4 -2
  14. data/lib/openai/models/responses/response_compaction_item_param.rb +2 -1
  15. data/lib/openai/models/responses/response_function_call_output_item.rb +1 -1
  16. data/lib/openai/models/responses/response_function_shell_tool_call_output.rb +10 -6
  17. data/lib/openai/models/responses/response_function_web_search.rb +11 -3
  18. data/lib/openai/models/responses/response_input_item.rb +1 -0
  19. data/lib/openai/models/responses/response_item.rb +1 -1
  20. data/lib/openai/models/responses/response_output_item.rb +1 -1
  21. data/lib/openai/models/responses/response_output_text.rb +1 -1
  22. data/lib/openai/models/responses/tool.rb +4 -1
  23. data/lib/openai/models/video_create_error.rb +7 -2
  24. data/lib/openai/resources/audio/speech.rb +1 -1
  25. data/lib/openai/resources/images.rb +4 -2
  26. data/lib/openai/resources/responses/input_tokens.rb +1 -1
  27. data/lib/openai/version.rb +1 -1
  28. data/rbi/openai/models/audio/speech_create_params.rbi +12 -9
  29. data/rbi/openai/models/chat/chat_completion_audio_param.rbi +9 -6
  30. data/rbi/openai/models/conversations/message.rbi +1 -1
  31. data/rbi/openai/models/realtime/realtime_audio_config_output.rbi +12 -12
  32. data/rbi/openai/models/realtime/realtime_response_create_audio_output.rbi +12 -12
  33. data/rbi/openai/models/responses/input_token_count_params.rbi +3 -9
  34. data/rbi/openai/models/responses/response.rbi +18 -8
  35. data/rbi/openai/models/responses/response_compaction_item.rbi +4 -0
  36. data/rbi/openai/models/responses/response_compaction_item_param.rbi +2 -0
  37. data/rbi/openai/models/responses/response_function_call_output_item.rbi +1 -1
  38. data/rbi/openai/models/responses/response_function_shell_tool_call_output.rbi +10 -2
  39. data/rbi/openai/models/responses/response_function_web_search.rbi +13 -2
  40. data/rbi/openai/models/responses/response_output_text.rbi +1 -1
  41. data/rbi/openai/models/responses/tool.rbi +3 -0
  42. data/rbi/openai/models/video_create_error.rbi +9 -1
  43. data/rbi/openai/resources/audio/speech.rbi +4 -3
  44. data/rbi/openai/resources/images.rbi +4 -2
  45. data/rbi/openai/resources/responses/input_tokens.rbi +1 -3
  46. data/sig/openai/models/responses/response.rbs +5 -0
  47. data/sig/openai/models/responses/response_function_web_search.rbs +7 -0
  48. metadata +16 -2
@@ -4,18 +4,23 @@ module OpenAI
4
4
  module Models
5
5
  class VideoCreateError < OpenAI::Internal::Type::BaseModel
6
6
  # @!attribute code
7
+ # A machine-readable error code that was returned.
7
8
  #
8
9
  # @return [String]
9
10
  required :code, String
10
11
 
11
12
  # @!attribute message
13
+ # A human-readable description of the error that was returned.
12
14
  #
13
15
  # @return [String]
14
16
  required :message, String
15
17
 
16
18
  # @!method initialize(code:, message:)
17
- # @param code [String]
18
- # @param message [String]
19
+ # An error that occurred while generating the response.
20
+ #
21
+ # @param code [String] A machine-readable error code that was returned.
22
+ #
23
+ # @param message [String] A human-readable description of the error that was returned.
19
24
  end
20
25
  end
21
26
  end
@@ -15,7 +15,7 @@ module OpenAI
15
15
  #
16
16
  # @param model [String, Symbol, OpenAI::Models::Audio::SpeechModel] One of the available [TTS models](https://platform.openai.com/docs/models#tts):
17
17
  #
18
- # @param voice [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice] The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
18
+ # @param voice [String, Symbol, OpenAI::Models::Audio::SpeechCreateParams::Voice] The voice to use when generating the audio. Supported built-in voices are `alloy
19
19
  #
20
20
  # @param instructions [String] Control the voice of your generated audio with additional instructions. Does not
21
21
  #
@@ -45,7 +45,8 @@ module OpenAI
45
45
  # {OpenAI::Models::ImageEditParams} for more details.
46
46
  #
47
47
  # Creates an edited or extended image given one or more source images and a
48
- # prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`.
48
+ # prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
49
+ # and `gpt-image-1-mini`) and `dall-e-2`.
49
50
  #
50
51
  # @overload edit(image:, prompt:, background: nil, input_fidelity: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, user: nil, request_options: {})
51
52
  #
@@ -104,7 +105,8 @@ module OpenAI
104
105
  # {OpenAI::Models::ImageEditParams} for more details.
105
106
  #
106
107
  # Creates an edited or extended image given one or more source images and a
107
- # prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`.
108
+ # prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
109
+ # and `gpt-image-1-mini`) and `dall-e-2`.
108
110
  #
109
111
  # @overload edit_stream_raw(image:, prompt:, background: nil, input_fidelity: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, size: nil, user: nil, request_options: {})
110
112
  #
@@ -27,7 +27,7 @@ module OpenAI
27
27
  #
28
28
  # @param text [OpenAI::Models::Responses::InputTokenCountParams::Text, nil] Configuration options for a text response from the model. Can be plain
29
29
  #
30
- # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell, nil] How the model should select which tool (or tools) to use when generating
30
+ # @param tool_choice [Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell, nil] Controls which tool the model should use, if any.
31
31
  #
32
32
  # @param tools [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::FunctionShellTool, OpenAI::Models::Responses::CustomTool, OpenAI::Models::Responses::ApplyPatchTool, OpenAI::Models::Responses::WebSearchTool, OpenAI::Models::Responses::WebSearchPreviewTool>, nil] An array of tools the model may call while generating a response. You can specif
33
33
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.42.0"
4
+ VERSION = "0.43.0"
5
5
  end
@@ -21,9 +21,10 @@ module OpenAI
21
21
  sig { returns(T.any(String, OpenAI::Audio::SpeechModel::OrSymbol)) }
22
22
  attr_accessor :model
23
23
 
24
- # The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
25
- # `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
26
- # `verse`. Previews of the voices are available in the
24
+ # The voice to use when generating the audio. Supported built-in voices are
25
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
26
+ # `shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
27
+ # in the
27
28
  # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
28
29
  sig do
29
30
  returns(
@@ -105,9 +106,10 @@ module OpenAI
105
106
  # One of the available [TTS models](https://platform.openai.com/docs/models#tts):
106
107
  # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.
107
108
  model:,
108
- # The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
109
- # `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
110
- # `verse`. Previews of the voices are available in the
109
+ # The voice to use when generating the audio. Supported built-in voices are
110
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
111
+ # `shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
112
+ # in the
111
113
  # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
112
114
  voice:,
113
115
  # Control the voice of your generated audio with additional instructions. Does not
@@ -168,9 +170,10 @@ module OpenAI
168
170
  end
169
171
  end
170
172
 
171
- # The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
172
- # `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
173
- # `verse`. Previews of the voices are available in the
173
+ # The voice to use when generating the audio. Supported built-in voices are
174
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
175
+ # `shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
176
+ # in the
174
177
  # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
175
178
  module Voice
176
179
  extend OpenAI::Internal::Type::Union
@@ -21,8 +21,9 @@ module OpenAI
21
21
  end
22
22
  attr_accessor :format_
23
23
 
24
- # The voice the model uses to respond. Supported voices are `alloy`, `ash`,
25
- # `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
24
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
25
+ # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
26
+ # `marin`, and `cedar`.
26
27
  sig do
27
28
  returns(
28
29
  T.any(
@@ -50,8 +51,9 @@ module OpenAI
50
51
  # Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`,
51
52
  # or `pcm16`.
52
53
  format_:,
53
- # The voice the model uses to respond. Supported voices are `alloy`, `ash`,
54
- # `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
54
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
55
+ # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
56
+ # `marin`, and `cedar`.
55
57
  voice:
56
58
  )
57
59
  end
@@ -124,8 +126,9 @@ module OpenAI
124
126
  end
125
127
  end
126
128
 
127
- # The voice the model uses to respond. Supported voices are `alloy`, `ash`,
128
- # `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
129
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
130
+ # `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`,
131
+ # `marin`, and `cedar`.
129
132
  module Voice
130
133
  extend OpenAI::Internal::Type::Union
131
134
 
@@ -87,7 +87,7 @@ module OpenAI
87
87
  def to_hash
88
88
  end
89
89
 
90
- # A text input to the model.
90
+ # A content part that makes up an input or output item.
91
91
  module Content
92
92
  extend OpenAI::Internal::Type::Union
93
93
 
@@ -51,10 +51,10 @@ module OpenAI
51
51
  sig { params(speed: Float).void }
52
52
  attr_writer :speed
53
53
 
54
- # The voice the model uses to respond. Voice cannot be changed during the session
55
- # once the model has responded with audio at least once. Current voice options are
56
- # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
57
- # and `cedar`. We recommend `marin` and `cedar` for best quality.
54
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
55
+ # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
56
+ # `cedar`. Voice cannot be changed during the session once the model has responded
57
+ # with audio at least once. We recommend `marin` and `cedar` for best quality.
58
58
  sig do
59
59
  returns(
60
60
  T.nilable(
@@ -105,10 +105,10 @@ module OpenAI
105
105
  # This parameter is a post-processing adjustment to the audio after it is
106
106
  # generated, it's also possible to prompt the model to speak faster or slower.
107
107
  speed: nil,
108
- # The voice the model uses to respond. Voice cannot be changed during the session
109
- # once the model has responded with audio at least once. Current voice options are
110
- # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
111
- # and `cedar`. We recommend `marin` and `cedar` for best quality.
108
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
109
+ # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
110
+ # `cedar`. Voice cannot be changed during the session once the model has responded
111
+ # with audio at least once. We recommend `marin` and `cedar` for best quality.
112
112
  voice: nil
113
113
  )
114
114
  end
@@ -134,10 +134,10 @@ module OpenAI
134
134
  def to_hash
135
135
  end
136
136
 
137
- # The voice the model uses to respond. Voice cannot be changed during the session
138
- # once the model has responded with audio at least once. Current voice options are
139
- # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
140
- # and `cedar`. We recommend `marin` and `cedar` for best quality.
137
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
138
+ # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
139
+ # `cedar`. Voice cannot be changed during the session once the model has responded
140
+ # with audio at least once. We recommend `marin` and `cedar` for best quality.
141
141
  module Voice
142
142
  extend OpenAI::Internal::Type::Union
143
143
 
@@ -85,10 +85,10 @@ module OpenAI
85
85
  end
86
86
  attr_writer :format_
87
87
 
88
- # The voice the model uses to respond. Voice cannot be changed during the session
89
- # once the model has responded with audio at least once. Current voice options are
90
- # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
91
- # and `cedar`. We recommend `marin` and `cedar` for best quality.
88
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
89
+ # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
90
+ # `cedar`. Voice cannot be changed during the session once the model has responded
91
+ # with audio at least once.
92
92
  sig do
93
93
  returns(
94
94
  T.nilable(
@@ -130,10 +130,10 @@ module OpenAI
130
130
  def self.new(
131
131
  # The format of the output audio.
132
132
  format_: nil,
133
- # The voice the model uses to respond. Voice cannot be changed during the session
134
- # once the model has responded with audio at least once. Current voice options are
135
- # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
136
- # and `cedar`. We recommend `marin` and `cedar` for best quality.
133
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
134
+ # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
135
+ # `cedar`. Voice cannot be changed during the session once the model has responded
136
+ # with audio at least once.
137
137
  voice: nil
138
138
  )
139
139
  end
@@ -158,10 +158,10 @@ module OpenAI
158
158
  def to_hash
159
159
  end
160
160
 
161
- # The voice the model uses to respond. Voice cannot be changed during the session
162
- # once the model has responded with audio at least once. Current voice options are
163
- # `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`,
164
- # and `cedar`. We recommend `marin` and `cedar` for best quality.
161
+ # The voice the model uses to respond. Supported built-in voices are `alloy`,
162
+ # `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and
163
+ # `cedar`. Voice cannot be changed during the session once the model has responded
164
+ # with audio at least once.
165
165
  module Voice
166
166
  extend OpenAI::Internal::Type::Union
167
167
 
@@ -88,9 +88,7 @@ module OpenAI
88
88
  end
89
89
  attr_writer :text
90
90
 
91
- # How the model should select which tool (or tools) to use when generating a
92
- # response. See the `tools` parameter to see how to specify which tools the model
93
- # can call.
91
+ # Controls which tool the model should use, if any.
94
92
  sig do
95
93
  returns(
96
94
  T.nilable(
@@ -249,9 +247,7 @@ module OpenAI
249
247
  # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
250
248
  # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
251
249
  text: nil,
252
- # How the model should select which tool (or tools) to use when generating a
253
- # response. See the `tools` parameter to see how to specify which tools the model
254
- # can call.
250
+ # Controls which tool the model should use, if any.
255
251
  tool_choice: nil,
256
252
  # An array of tools the model may call while generating a response. You can
257
253
  # specify which tool to use by setting the `tool_choice` parameter.
@@ -540,9 +536,7 @@ module OpenAI
540
536
  end
541
537
  end
542
538
 
543
- # How the model should select which tool (or tools) to use when generating a
544
- # response. See the `tools` parameter to see how to specify which tools the model
545
- # can call.
539
+ # Controls which tool the model should use, if any.
546
540
  module ToolChoice
547
541
  extend OpenAI::Internal::Type::Union
548
542
 
@@ -139,8 +139,13 @@ module OpenAI
139
139
  sig { returns(T.nilable(T::Boolean)) }
140
140
  attr_accessor :background
141
141
 
142
- # The conversation that this response belongs to. Input items and output items
143
- # from this response are automatically added to this conversation.
142
+ # Unix timestamp (in seconds) of when this Response was completed. Only present
143
+ # when the status is `completed`.
144
+ sig { returns(T.nilable(Float)) }
145
+ attr_accessor :completed_at
146
+
147
+ # The conversation that this response belonged to. Input items and output items
148
+ # from this response were automatically added to this conversation.
144
149
  sig { returns(T.nilable(OpenAI::Responses::Response::Conversation)) }
145
150
  attr_reader :conversation
146
151
 
@@ -380,6 +385,7 @@ module OpenAI
380
385
  ],
381
386
  top_p: T.nilable(Float),
382
387
  background: T.nilable(T::Boolean),
388
+ completed_at: T.nilable(Float),
383
389
  conversation:
384
390
  T.nilable(OpenAI::Responses::Response::Conversation::OrHash),
385
391
  max_output_tokens: T.nilable(Integer),
@@ -481,8 +487,11 @@ module OpenAI
481
487
  # Whether to run the model response in the background.
482
488
  # [Learn more](https://platform.openai.com/docs/guides/background).
483
489
  background: nil,
484
- # The conversation that this response belongs to. Input items and output items
485
- # from this response are automatically added to this conversation.
490
+ # Unix timestamp (in seconds) of when this Response was completed. Only present
491
+ # when the status is `completed`.
492
+ completed_at: nil,
493
+ # The conversation that this response belonged to. Input items and output items
494
+ # from this response were automatically added to this conversation.
486
495
  conversation: nil,
487
496
  # An upper bound for the number of tokens that can be generated for a response,
488
497
  # including visible output tokens and
@@ -592,6 +601,7 @@ module OpenAI
592
601
  tools: T::Array[OpenAI::Responses::Tool::Variants],
593
602
  top_p: T.nilable(Float),
594
603
  background: T.nilable(T::Boolean),
604
+ completed_at: T.nilable(Float),
595
605
  conversation:
596
606
  T.nilable(OpenAI::Responses::Response::Conversation),
597
607
  max_output_tokens: T.nilable(Integer),
@@ -782,15 +792,15 @@ module OpenAI
782
792
  )
783
793
  end
784
794
 
785
- # The unique ID of the conversation.
795
+ # The unique ID of the conversation that this response was associated with.
786
796
  sig { returns(String) }
787
797
  attr_accessor :id
788
798
 
789
- # The conversation that this response belongs to. Input items and output items
790
- # from this response are automatically added to this conversation.
799
+ # The conversation that this response belonged to. Input items and output items
800
+ # from this response were automatically added to this conversation.
791
801
  sig { params(id: String).returns(T.attached_class) }
792
802
  def self.new(
793
- # The unique ID of the conversation.
803
+ # The unique ID of the conversation that this response was associated with.
794
804
  id:
795
805
  )
796
806
  end
@@ -16,6 +16,7 @@ module OpenAI
16
16
  sig { returns(String) }
17
17
  attr_accessor :id
18
18
 
19
+ # The encrypted content that was produced by compaction.
19
20
  sig { returns(String) }
20
21
  attr_accessor :encrypted_content
21
22
 
@@ -23,6 +24,7 @@ module OpenAI
23
24
  sig { returns(Symbol) }
24
25
  attr_accessor :type
25
26
 
27
+ # The identifier of the actor that created the item.
26
28
  sig { returns(T.nilable(String)) }
27
29
  attr_reader :created_by
28
30
 
@@ -42,7 +44,9 @@ module OpenAI
42
44
  def self.new(
43
45
  # The unique ID of the compaction item.
44
46
  id:,
47
+ # The encrypted content that was produced by compaction.
45
48
  encrypted_content:,
49
+ # The identifier of the actor that created the item.
46
50
  created_by: nil,
47
51
  # The type of the item. Always `compaction`.
48
52
  type: :compaction
@@ -12,6 +12,7 @@ module OpenAI
12
12
  )
13
13
  end
14
14
 
15
+ # The encrypted content of the compaction summary.
15
16
  sig { returns(String) }
16
17
  attr_accessor :encrypted_content
17
18
 
@@ -33,6 +34,7 @@ module OpenAI
33
34
  ).returns(T.attached_class)
34
35
  end
35
36
  def self.new(
37
+ # The encrypted content of the compaction summary.
36
38
  encrypted_content:,
37
39
  # The ID of the compaction item.
38
40
  id: nil,
@@ -3,7 +3,7 @@
3
3
  module OpenAI
4
4
  module Models
5
5
  module Responses
6
- # A text input to the model.
6
+ # A piece of message content, such as text, an image, or a file.
7
7
  module ResponseFunctionCallOutputItem
8
8
  extend OpenAI::Internal::Type::Union
9
9
 
@@ -40,13 +40,14 @@ module OpenAI
40
40
  sig { returns(Symbol) }
41
41
  attr_accessor :type
42
42
 
43
+ # The identifier of the actor that created the item.
43
44
  sig { returns(T.nilable(String)) }
44
45
  attr_reader :created_by
45
46
 
46
47
  sig { params(created_by: String).void }
47
48
  attr_writer :created_by
48
49
 
49
- # The output of a shell tool call.
50
+ # The output of a shell tool call that was emitted.
50
51
  sig do
51
52
  params(
52
53
  id: String,
@@ -71,6 +72,7 @@ module OpenAI
71
72
  max_output_length:,
72
73
  # An array of shell call output contents
73
74
  output:,
75
+ # The identifier of the actor that created the item.
74
76
  created_by: nil,
75
77
  # The type of the shell call output. Always `shell_call_output`.
76
78
  type: :shell_call_output
@@ -113,19 +115,22 @@ module OpenAI
113
115
  end
114
116
  attr_accessor :outcome
115
117
 
118
+ # The standard error output that was captured.
116
119
  sig { returns(String) }
117
120
  attr_accessor :stderr
118
121
 
122
+ # The standard output that was captured.
119
123
  sig { returns(String) }
120
124
  attr_accessor :stdout
121
125
 
126
+ # The identifier of the actor that created the item.
122
127
  sig { returns(T.nilable(String)) }
123
128
  attr_reader :created_by
124
129
 
125
130
  sig { params(created_by: String).void }
126
131
  attr_writer :created_by
127
132
 
128
- # The content of a shell call output.
133
+ # The content of a shell tool call output that was emitted.
129
134
  sig do
130
135
  params(
131
136
  outcome:
@@ -142,8 +147,11 @@ module OpenAI
142
147
  # Represents either an exit outcome (with an exit code) or a timeout outcome for a
143
148
  # shell call output chunk.
144
149
  outcome:,
150
+ # The standard error output that was captured.
145
151
  stderr:,
152
+ # The standard output that was captured.
146
153
  stdout:,
154
+ # The identifier of the actor that created the item.
147
155
  created_by: nil
148
156
  )
149
157
  end
@@ -113,7 +113,7 @@ module OpenAI
113
113
  )
114
114
  end
115
115
 
116
- # The search query.
116
+ # [DEPRECATED] The search query.
117
117
  sig { returns(String) }
118
118
  attr_accessor :query
119
119
 
@@ -121,6 +121,13 @@ module OpenAI
121
121
  sig { returns(Symbol) }
122
122
  attr_accessor :type
123
123
 
124
+ # The search queries.
125
+ sig { returns(T.nilable(T::Array[String])) }
126
+ attr_reader :queries
127
+
128
+ sig { params(queries: T::Array[String]).void }
129
+ attr_writer :queries
130
+
124
131
  # The sources used in the search.
125
132
  sig do
126
133
  returns(
@@ -147,6 +154,7 @@ module OpenAI
147
154
  sig do
148
155
  params(
149
156
  query: String,
157
+ queries: T::Array[String],
150
158
  sources:
151
159
  T::Array[
152
160
  OpenAI::Responses::ResponseFunctionWebSearch::Action::Search::Source::OrHash
@@ -155,8 +163,10 @@ module OpenAI
155
163
  ).returns(T.attached_class)
156
164
  end
157
165
  def self.new(
158
- # The search query.
166
+ # [DEPRECATED] The search query.
159
167
  query:,
168
+ # The search queries.
169
+ queries: nil,
160
170
  # The sources used in the search.
161
171
  sources: nil,
162
172
  # The action type.
@@ -169,6 +179,7 @@ module OpenAI
169
179
  {
170
180
  query: String,
171
181
  type: Symbol,
182
+ queries: T::Array[String],
172
183
  sources:
173
184
  T::Array[
174
185
  OpenAI::Responses::ResponseFunctionWebSearch::Action::Search::Source
@@ -104,7 +104,7 @@ module OpenAI
104
104
  def to_hash
105
105
  end
106
106
 
107
- # A citation to a file.
107
+ # An annotation that applies to a span of output text.
108
108
  module Annotation
109
109
  extend OpenAI::Internal::Type::Union
110
110
 
@@ -718,6 +718,7 @@ module OpenAI
718
718
  sig { params(file_ids: T::Array[String]).void }
719
719
  attr_writer :file_ids
720
720
 
721
+ # The memory limit for the code interpreter container.
721
722
  sig do
722
723
  returns(
723
724
  T.nilable(
@@ -742,6 +743,7 @@ module OpenAI
742
743
  def self.new(
743
744
  # An optional list of uploaded files to make available to your code.
744
745
  file_ids: nil,
746
+ # The memory limit for the code interpreter container.
745
747
  memory_limit: nil,
746
748
  # Always `auto`.
747
749
  type: :auto
@@ -763,6 +765,7 @@ module OpenAI
763
765
  def to_hash
764
766
  end
765
767
 
768
+ # The memory limit for the code interpreter container.
766
769
  module MemoryLimit
767
770
  extend OpenAI::Internal::Type::Enum
768
771
 
@@ -8,14 +8,22 @@ module OpenAI
8
8
  T.any(OpenAI::VideoCreateError, OpenAI::Internal::AnyHash)
9
9
  end
10
10
 
11
+ # A machine-readable error code that was returned.
11
12
  sig { returns(String) }
12
13
  attr_accessor :code
13
14
 
15
+ # A human-readable description of the error that was returned.
14
16
  sig { returns(String) }
15
17
  attr_accessor :message
16
18
 
19
+ # An error that occurred while generating the response.
17
20
  sig { params(code: String, message: String).returns(T.attached_class) }
18
- def self.new(code:, message:)
21
+ def self.new(
22
+ # A machine-readable error code that was returned.
23
+ code:,
24
+ # A human-readable description of the error that was returned.
25
+ message:
26
+ )
19
27
  end
20
28
 
21
29
  sig { override.returns({ code: String, message: String }) }
@@ -26,9 +26,10 @@ module OpenAI
26
26
  # One of the available [TTS models](https://platform.openai.com/docs/models#tts):
27
27
  # `tts-1`, `tts-1-hd`, `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.
28
28
  model:,
29
- # The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
30
- # `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
31
- # `verse`. Previews of the voices are available in the
29
+ # The voice to use when generating the audio. Supported built-in voices are
30
+ # `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
31
+ # `shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
32
+ # in the
32
33
  # [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
33
34
  voice:,
34
35
  # Control the voice of your generated audio with additional instructions. Does not
@@ -45,7 +45,8 @@ module OpenAI
45
45
  # See {OpenAI::Resources::Images#edit_stream_raw} for streaming counterpart.
46
46
  #
47
47
  # Creates an edited or extended image given one or more source images and a
48
- # prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`.
48
+ # prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
49
+ # and `gpt-image-1-mini`) and `dall-e-2`.
49
50
  sig do
50
51
  params(
51
52
  image: OpenAI::ImageEditParams::Image::Variants,
@@ -148,7 +149,8 @@ module OpenAI
148
149
  # See {OpenAI::Resources::Images#edit} for non-streaming counterpart.
149
150
  #
150
151
  # Creates an edited or extended image given one or more source images and a
151
- # prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`.
152
+ # prompt. This endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`,
153
+ # and `gpt-image-1-mini`) and `dall-e-2`.
152
154
  sig do
153
155
  params(
154
156
  image: OpenAI::ImageEditParams::Image::Variants,
@@ -97,9 +97,7 @@ module OpenAI
97
97
  # - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
98
98
  # - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
99
99
  text: nil,
100
- # How the model should select which tool (or tools) to use when generating a
101
- # response. See the `tools` parameter to see how to specify which tools the model
102
- # can call.
100
+ # Controls which tool the model should use, if any.
103
101
  tool_choice: nil,
104
102
  # An array of tools the model may call while generating a response. You can
105
103
  # specify which tool to use by setting the `tool_choice` parameter.