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
@@ -0,0 +1,51 @@
1
+ module OpenAI
2
+ module Models
3
+ type decision_input_image =
4
+ {
5
+ image_url: String,
6
+ ?type: :input_image,
7
+ ?detail: OpenAI::Models::DecisionInputImage::detail?
8
+ }
9
+
10
+ class DecisionInputImage < OpenAI::Internal::Type::BaseModel
11
+ # A base64-encoded image in a data URL.
12
+ attr_accessor image_url: String
13
+
14
+ attr_accessor type: :input_image
15
+
16
+ # The image detail level, using the selected model's image profile. Defaults to
17
+ # auto.
18
+ attr_accessor detail: OpenAI::Models::DecisionInputImage::detail?
19
+
20
+ # @param image_url
21
+ # A base64-encoded image in a data URL.
22
+ # @param detail
23
+ # The image detail level, using the selected model's image profile. Defaults to
24
+ # auto.
25
+ def initialize: (
26
+ image_url: String,
27
+ ?detail: OpenAI::Models::DecisionInputImage::detail?,
28
+ ?type: :input_image
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ image_url: String,
33
+ ?type: :input_image,
34
+ ?detail: OpenAI::Models::DecisionInputImage::detail?
35
+ }
36
+
37
+ type detail = :low | :high | :auto | :original
38
+
39
+ module Detail
40
+ extend OpenAI::Internal::Type::Enum
41
+
42
+ LOW: :low
43
+ HIGH: :high
44
+ AUTO: :auto
45
+ ORIGINAL: :original
46
+
47
+ def self?.values: -> ::Array[OpenAI::Models::DecisionInputImage::detail]
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,57 @@
1
+ module OpenAI
2
+ module Models
3
+ type decision_input_message =
4
+ {
5
+ content: OpenAI::Models::DecisionInputMessage::content,
6
+ ?role: :user,
7
+ ?type: OpenAI::Models::DecisionInputMessage::type_
8
+ }
9
+
10
+ class DecisionInputMessage < OpenAI::Internal::Type::BaseModel
11
+ # Text evidence or an ordered list of text and inline image parts.
12
+ attr_accessor content: OpenAI::Models::DecisionInputMessage::content
13
+
14
+ attr_accessor role: :user
15
+
16
+ attr_reader type: OpenAI::Models::DecisionInputMessage::type_?
17
+
18
+ def type=: (
19
+ OpenAI::Models::DecisionInputMessage::type_
20
+ ) -> OpenAI::Models::DecisionInputMessage::type_
21
+
22
+ # @param content
23
+ # Text evidence or an ordered list of text and inline image parts.
24
+ def initialize: (
25
+ content: OpenAI::Models::DecisionInputMessage::content,
26
+ ?type: OpenAI::Models::DecisionInputMessage::type_,
27
+ ?role: :user
28
+ ) -> void
29
+
30
+ def to_hash: -> {
31
+ content: OpenAI::Models::DecisionInputMessage::content,
32
+ ?role: :user,
33
+ ?type: OpenAI::Models::DecisionInputMessage::type_
34
+ }
35
+
36
+ type content = String | ::Array[OpenAI::Models::decision_input_part]
37
+
38
+ module Content
39
+ extend OpenAI::Internal::Type::Union
40
+
41
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionInputMessage::content]
42
+
43
+ DecisionInputPartArray: OpenAI::Internal::Type::Converter
44
+ end
45
+
46
+ type type_ = :message
47
+
48
+ module Type
49
+ extend OpenAI::Internal::Type::Enum
50
+
51
+ MESSAGE: :message
52
+
53
+ def self?.values: -> ::Array[OpenAI::Models::DecisionInputMessage::type_]
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,12 @@
1
+ module OpenAI
2
+ module Models
3
+ type decision_input_part =
4
+ OpenAI::DecisionInputText | OpenAI::DecisionInputImage
5
+
6
+ module DecisionInputPart
7
+ extend OpenAI::Internal::Type::Union
8
+
9
+ def self?.variants: -> ::Array[OpenAI::Models::decision_input_part]
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ module OpenAI
2
+ module Models
3
+ type decision_input_text = { text: String, ?type: :input_text }
4
+
5
+ class DecisionInputText < OpenAI::Internal::Type::BaseModel
6
+ attr_accessor text: String
7
+
8
+ attr_accessor type: :input_text
9
+
10
+ def initialize: (text: String, ?type: :input_text) -> void
11
+
12
+ def to_hash: -> { text: String, ?type: :input_text }
13
+ end
14
+ end
15
+ end
@@ -40,8 +40,7 @@ module OpenAI
40
40
  # `cedar`. You may also provide a custom voice object with an `id`, for example
41
41
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
42
42
  # model has responded with audio at least once. Custom voices must be created from
43
- # audio samples. Voices created from text prompts are supported only in Live. We
44
- # recommend `marin` and `cedar` for best quality.
43
+ # audio samples. We recommend `marin` and `cedar` for best quality.
45
44
  attr_reader voice: OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice?
46
45
 
47
46
  # The voice the model uses to respond. Supported built-in voices are `alloy`,
@@ -49,8 +48,7 @@ module OpenAI
49
48
  # `cedar`. You may also provide a custom voice object with an `id`, for example
50
49
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
51
50
  # model has responded with audio at least once. Custom voices must be created from
52
- # audio samples. Voices created from text prompts are supported only in Live. We
53
- # recommend `marin` and `cedar` for best quality.
51
+ # audio samples. We recommend `marin` and `cedar` for best quality.
54
52
  def voice=: (
55
53
  OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
56
54
  ) -> OpenAI::Models::Realtime::RealtimeAudioConfigOutput::voice
@@ -71,8 +69,7 @@ module OpenAI
71
69
  # `cedar`. You may also provide a custom voice object with an `id`, for example
72
70
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
73
71
  # model has responded with audio at least once. Custom voices must be created from
74
- # audio samples. Voices created from text prompts are supported only in Live. We
75
- # recommend `marin` and `cedar` for best quality.
72
+ # audio samples. We recommend `marin` and `cedar` for best quality.
76
73
  def initialize: (
77
74
  ?format_: OpenAI::Models::Realtime::realtime_audio_formats,
78
75
  ?speed: Float,
@@ -39,8 +39,7 @@ module OpenAI
39
39
  # `cedar`. You may also provide a custom voice object with an `id`, for example
40
40
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
41
41
  # model has responded with audio at least once. Custom voices must be created from
42
- # audio samples. Voices created from text prompts are supported only in Live. We
43
- # recommend `marin` and `cedar` for best quality.
42
+ # audio samples. We recommend `marin` and `cedar` for best quality.
44
43
  attr_reader voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice?
45
44
 
46
45
  # The voice the model uses to respond. Supported built-in voices are `alloy`,
@@ -48,8 +47,7 @@ module OpenAI
48
47
  # `cedar`. You may also provide a custom voice object with an `id`, for example
49
48
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
50
49
  # model has responded with audio at least once. Custom voices must be created from
51
- # audio samples. Voices created from text prompts are supported only in Live. We
52
- # recommend `marin` and `cedar` for best quality.
50
+ # audio samples. We recommend `marin` and `cedar` for best quality.
53
51
  def voice=: (
54
52
  OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
55
53
  ) -> OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice
@@ -62,8 +60,7 @@ module OpenAI
62
60
  # `cedar`. You may also provide a custom voice object with an `id`, for example
63
61
  # `{ "id": "voice_1234" }`. Voice cannot be changed during the session once the
64
62
  # model has responded with audio at least once. Custom voices must be created from
65
- # audio samples. Voices created from text prompts are supported only in Live. We
66
- # recommend `marin` and `cedar` for best quality.
63
+ # audio samples. We recommend `marin` and `cedar` for best quality.
67
64
  def initialize: (
68
65
  ?format_: OpenAI::Models::Realtime::realtime_audio_formats,
69
66
  ?voice: OpenAI::Models::Realtime::RealtimeResponseCreateAudioOutput::Output::voice