openai 0.24.0 → 0.25.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 +8 -0
- data/README.md +1 -1
- data/lib/openai/models/conversations/message.rb +27 -3
- data/lib/openai/models/conversations/summary_text_content.rb +5 -2
- data/lib/openai/models/responses/response_content.rb +25 -1
- data/lib/openai/models/responses/response_content_part_added_event.rb +27 -3
- data/lib/openai/models/responses/response_content_part_done_event.rb +27 -3
- data/lib/openai/models/responses/response_reasoning_item.rb +6 -8
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/conversations/message.rbi +34 -0
- data/rbi/openai/models/conversations/summary_text_content.rbi +8 -1
- data/rbi/openai/models/responses/response_content.rbi +34 -1
- data/rbi/openai/models/responses/response_content_part_added_event.rbi +36 -2
- data/rbi/openai/models/responses/response_content_part_done_event.rbi +36 -2
- data/rbi/openai/models/responses/response_reasoning_item.rbi +6 -4
- data/sig/openai/models/conversations/message.rbs +13 -0
- data/sig/openai/models/responses/response_content.rbs +13 -0
- data/sig/openai/models/responses/response_content_part_added_event.rbs +13 -0
- data/sig/openai/models/responses/response_content_part_done_event.rbs +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dc675367c0d22c19f6848d5034b7308425efa10723a6f307d98fbe893d3f845
|
4
|
+
data.tar.gz: 5c68c6b1380750a012260cf3f7fa3d1dc53ab69b6a551771231003f794e0f7ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe5c26cf866c0b149d023170d7f4b19248602b5fbc16cc6e712e5e06d5077ef925f562ce70ef856001327b8acbfb2e3779bfd1b2a41e567045ee0c2f33485704
|
7
|
+
data.tar.gz: 16473b0015ca790feb4a22670fe324bc329fc6e01b7bfd4319e95cab3ab05a4e14ef9277edaf239f486f9deee474b0a330031a597b74335e6bf1e49bf8c08792
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.25.0 (2025-09-19)
|
4
|
+
|
5
|
+
Full Changelog: [v0.24.0...v0.25.0](https://github.com/openai/openai-ruby/compare/v0.24.0...v0.25.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** add reasoning_text ([48073e9](https://github.com/openai/openai-ruby/commit/48073e955e50f7818fc0c422b7b5ce80c853536c))
|
10
|
+
|
3
11
|
## 0.24.0 (2025-09-17)
|
4
12
|
|
5
13
|
Full Changelog: [v0.23.3...v0.24.0](https://github.com/openai/openai-ruby/compare/v0.23.3...v0.24.0)
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ module OpenAI
|
|
13
13
|
# @!attribute content
|
14
14
|
# The content of the message
|
15
15
|
#
|
16
|
-
# @return [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>]
|
16
|
+
# @return [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Conversations::Message::Content::ReasoningText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>]
|
17
17
|
required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Conversations::Message::Content] }
|
18
18
|
|
19
19
|
# @!attribute role
|
@@ -44,7 +44,7 @@ module OpenAI
|
|
44
44
|
#
|
45
45
|
# @param id [String] The unique ID of the message.
|
46
46
|
#
|
47
|
-
# @param content [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>] The content of the message
|
47
|
+
# @param content [Array<OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Conversations::Message::Content::ReasoningText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile>] The content of the message
|
48
48
|
#
|
49
49
|
# @param role [Symbol, OpenAI::Models::Conversations::Message::Role] The role of the message. One of `unknown`, `user`, `assistant`, `system`, `criti
|
50
50
|
#
|
@@ -70,6 +70,9 @@ module OpenAI
|
|
70
70
|
# A summary text from the model.
|
71
71
|
variant :summary_text, -> { OpenAI::Conversations::SummaryTextContent }
|
72
72
|
|
73
|
+
# Reasoning text from the model.
|
74
|
+
variant :reasoning_text, -> { OpenAI::Conversations::Message::Content::ReasoningText }
|
75
|
+
|
73
76
|
# A refusal from the model.
|
74
77
|
variant :refusal, -> { OpenAI::Responses::ResponseOutputRefusal }
|
75
78
|
|
@@ -82,8 +85,29 @@ module OpenAI
|
|
82
85
|
# A file input to the model.
|
83
86
|
variant :input_file, -> { OpenAI::Responses::ResponseInputFile }
|
84
87
|
|
88
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
89
|
+
# @!attribute text
|
90
|
+
# The reasoning text from the model.
|
91
|
+
#
|
92
|
+
# @return [String]
|
93
|
+
required :text, String
|
94
|
+
|
95
|
+
# @!attribute type
|
96
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
97
|
+
#
|
98
|
+
# @return [Symbol, :reasoning_text]
|
99
|
+
required :type, const: :reasoning_text
|
100
|
+
|
101
|
+
# @!method initialize(text:, type: :reasoning_text)
|
102
|
+
# Reasoning text from the model.
|
103
|
+
#
|
104
|
+
# @param text [String] The reasoning text from the model.
|
105
|
+
#
|
106
|
+
# @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
|
107
|
+
end
|
108
|
+
|
85
109
|
# @!method self.variants
|
86
|
-
# @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile)]
|
110
|
+
# @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Conversations::TextContent, OpenAI::Models::Conversations::SummaryTextContent, OpenAI::Models::Conversations::Message::Content::ReasoningText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Conversations::ComputerScreenshotContent, OpenAI::Models::Responses::ResponseInputFile)]
|
87
111
|
end
|
88
112
|
|
89
113
|
# The role of the message. One of `unknown`, `user`, `assistant`, `system`,
|
@@ -5,11 +5,13 @@ module OpenAI
|
|
5
5
|
module Conversations
|
6
6
|
class SummaryTextContent < OpenAI::Internal::Type::BaseModel
|
7
7
|
# @!attribute text
|
8
|
+
# A summary of the reasoning output from the model so far.
|
8
9
|
#
|
9
10
|
# @return [String]
|
10
11
|
required :text, String
|
11
12
|
|
12
13
|
# @!attribute type
|
14
|
+
# The type of the object. Always `summary_text`.
|
13
15
|
#
|
14
16
|
# @return [Symbol, :summary_text]
|
15
17
|
required :type, const: :summary_text
|
@@ -17,8 +19,9 @@ module OpenAI
|
|
17
19
|
# @!method initialize(text:, type: :summary_text)
|
18
20
|
# A summary text from the model.
|
19
21
|
#
|
20
|
-
# @param text [String]
|
21
|
-
#
|
22
|
+
# @param text [String] A summary of the reasoning output from the model so far.
|
23
|
+
#
|
24
|
+
# @param type [Symbol, :summary_text] The type of the object. Always `summary_text`.
|
22
25
|
end
|
23
26
|
end
|
24
27
|
end
|
@@ -25,8 +25,32 @@ module OpenAI
|
|
25
25
|
# A refusal from the model.
|
26
26
|
variant -> { OpenAI::Responses::ResponseOutputRefusal }
|
27
27
|
|
28
|
+
# Reasoning text from the model.
|
29
|
+
variant -> { OpenAI::Responses::ResponseContent::ReasoningTextContent }
|
30
|
+
|
31
|
+
class ReasoningTextContent < OpenAI::Internal::Type::BaseModel
|
32
|
+
# @!attribute text
|
33
|
+
# The reasoning text from the model.
|
34
|
+
#
|
35
|
+
# @return [String]
|
36
|
+
required :text, String
|
37
|
+
|
38
|
+
# @!attribute type
|
39
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
40
|
+
#
|
41
|
+
# @return [Symbol, :reasoning_text]
|
42
|
+
required :type, const: :reasoning_text
|
43
|
+
|
44
|
+
# @!method initialize(text:, type: :reasoning_text)
|
45
|
+
# Reasoning text from the model.
|
46
|
+
#
|
47
|
+
# @param text [String] The reasoning text from the model.
|
48
|
+
#
|
49
|
+
# @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
|
50
|
+
end
|
51
|
+
|
28
52
|
# @!method self.variants
|
29
|
-
# @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Responses::ResponseInputFile, OpenAI::Models::Responses::ResponseInputAudio, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)]
|
53
|
+
# @return [Array(OpenAI::Models::Responses::ResponseInputText, OpenAI::Models::Responses::ResponseInputImage, OpenAI::Models::Responses::ResponseInputFile, OpenAI::Models::Responses::ResponseInputAudio, OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContent::ReasoningTextContent)]
|
30
54
|
end
|
31
55
|
end
|
32
56
|
end
|
@@ -25,7 +25,7 @@ module OpenAI
|
|
25
25
|
# @!attribute part
|
26
26
|
# The content part that was added.
|
27
27
|
#
|
28
|
-
# @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal]
|
28
|
+
# @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText]
|
29
29
|
required :part, union: -> { OpenAI::Responses::ResponseContentPartAddedEvent::Part }
|
30
30
|
|
31
31
|
# @!attribute sequence_number
|
@@ -52,7 +52,7 @@ module OpenAI
|
|
52
52
|
#
|
53
53
|
# @param output_index [Integer] The index of the output item that the content part was added to.
|
54
54
|
#
|
55
|
-
# @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal] The content part that was added.
|
55
|
+
# @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText] The content part that was added.
|
56
56
|
#
|
57
57
|
# @param sequence_number [Integer] The sequence number of this event.
|
58
58
|
#
|
@@ -72,8 +72,32 @@ module OpenAI
|
|
72
72
|
# A refusal from the model.
|
73
73
|
variant :refusal, -> { OpenAI::Responses::ResponseOutputRefusal }
|
74
74
|
|
75
|
+
# Reasoning text from the model.
|
76
|
+
variant :reasoning_text, -> { OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText }
|
77
|
+
|
78
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
79
|
+
# @!attribute text
|
80
|
+
# The reasoning text from the model.
|
81
|
+
#
|
82
|
+
# @return [String]
|
83
|
+
required :text, String
|
84
|
+
|
85
|
+
# @!attribute type
|
86
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
87
|
+
#
|
88
|
+
# @return [Symbol, :reasoning_text]
|
89
|
+
required :type, const: :reasoning_text
|
90
|
+
|
91
|
+
# @!method initialize(text:, type: :reasoning_text)
|
92
|
+
# Reasoning text from the model.
|
93
|
+
#
|
94
|
+
# @param text [String] The reasoning text from the model.
|
95
|
+
#
|
96
|
+
# @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
|
97
|
+
end
|
98
|
+
|
75
99
|
# @!method self.variants
|
76
|
-
# @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)]
|
100
|
+
# @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartAddedEvent::Part::ReasoningText)]
|
77
101
|
end
|
78
102
|
end
|
79
103
|
end
|
@@ -25,7 +25,7 @@ module OpenAI
|
|
25
25
|
# @!attribute part
|
26
26
|
# The content part that is done.
|
27
27
|
#
|
28
|
-
# @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal]
|
28
|
+
# @return [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText]
|
29
29
|
required :part, union: -> { OpenAI::Responses::ResponseContentPartDoneEvent::Part }
|
30
30
|
|
31
31
|
# @!attribute sequence_number
|
@@ -52,7 +52,7 @@ module OpenAI
|
|
52
52
|
#
|
53
53
|
# @param output_index [Integer] The index of the output item that the content part was added to.
|
54
54
|
#
|
55
|
-
# @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal] The content part that is done.
|
55
|
+
# @param part [OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText] The content part that is done.
|
56
56
|
#
|
57
57
|
# @param sequence_number [Integer] The sequence number of this event.
|
58
58
|
#
|
@@ -72,8 +72,32 @@ module OpenAI
|
|
72
72
|
# A refusal from the model.
|
73
73
|
variant :refusal, -> { OpenAI::Responses::ResponseOutputRefusal }
|
74
74
|
|
75
|
+
# Reasoning text from the model.
|
76
|
+
variant :reasoning_text, -> { OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText }
|
77
|
+
|
78
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
79
|
+
# @!attribute text
|
80
|
+
# The reasoning text from the model.
|
81
|
+
#
|
82
|
+
# @return [String]
|
83
|
+
required :text, String
|
84
|
+
|
85
|
+
# @!attribute type
|
86
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
87
|
+
#
|
88
|
+
# @return [Symbol, :reasoning_text]
|
89
|
+
required :type, const: :reasoning_text
|
90
|
+
|
91
|
+
# @!method initialize(text:, type: :reasoning_text)
|
92
|
+
# Reasoning text from the model.
|
93
|
+
#
|
94
|
+
# @param text [String] The reasoning text from the model.
|
95
|
+
#
|
96
|
+
# @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
|
97
|
+
end
|
98
|
+
|
75
99
|
# @!method self.variants
|
76
|
-
# @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal)]
|
100
|
+
# @return [Array(OpenAI::Models::Responses::ResponseOutputText, OpenAI::Models::Responses::ResponseOutputRefusal, OpenAI::Models::Responses::ResponseContentPartDoneEvent::Part::ReasoningText)]
|
77
101
|
end
|
78
102
|
end
|
79
103
|
end
|
@@ -79,8 +79,7 @@ module OpenAI
|
|
79
79
|
required :type, const: :summary_text
|
80
80
|
|
81
81
|
# @!method initialize(text:, type: :summary_text)
|
82
|
-
#
|
83
|
-
# {OpenAI::Models::Responses::ResponseReasoningItem::Summary} for more details.
|
82
|
+
# A summary text from the model.
|
84
83
|
#
|
85
84
|
# @param text [String] A summary of the reasoning output from the model so far.
|
86
85
|
#
|
@@ -89,24 +88,23 @@ module OpenAI
|
|
89
88
|
|
90
89
|
class Content < OpenAI::Internal::Type::BaseModel
|
91
90
|
# @!attribute text
|
92
|
-
#
|
91
|
+
# The reasoning text from the model.
|
93
92
|
#
|
94
93
|
# @return [String]
|
95
94
|
required :text, String
|
96
95
|
|
97
96
|
# @!attribute type
|
98
|
-
# The type of the
|
97
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
99
98
|
#
|
100
99
|
# @return [Symbol, :reasoning_text]
|
101
100
|
required :type, const: :reasoning_text
|
102
101
|
|
103
102
|
# @!method initialize(text:, type: :reasoning_text)
|
104
|
-
#
|
105
|
-
# {OpenAI::Models::Responses::ResponseReasoningItem::Content} for more details.
|
103
|
+
# Reasoning text from the model.
|
106
104
|
#
|
107
|
-
# @param text [String]
|
105
|
+
# @param text [String] The reasoning text from the model.
|
108
106
|
#
|
109
|
-
# @param type [Symbol, :reasoning_text] The type of the
|
107
|
+
# @param type [Symbol, :reasoning_text] The type of the reasoning text. Always `reasoning_text`.
|
110
108
|
end
|
111
109
|
|
112
110
|
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
data/lib/openai/version.rb
CHANGED
@@ -44,6 +44,7 @@ module OpenAI
|
|
44
44
|
OpenAI::Responses::ResponseOutputText::OrHash,
|
45
45
|
OpenAI::Conversations::TextContent::OrHash,
|
46
46
|
OpenAI::Conversations::SummaryTextContent::OrHash,
|
47
|
+
OpenAI::Conversations::Message::Content::ReasoningText::OrHash,
|
47
48
|
OpenAI::Responses::ResponseOutputRefusal::OrHash,
|
48
49
|
OpenAI::Responses::ResponseInputImage::OrHash,
|
49
50
|
OpenAI::Conversations::ComputerScreenshotContent::OrHash,
|
@@ -97,6 +98,7 @@ module OpenAI
|
|
97
98
|
OpenAI::Responses::ResponseOutputText,
|
98
99
|
OpenAI::Conversations::TextContent,
|
99
100
|
OpenAI::Conversations::SummaryTextContent,
|
101
|
+
OpenAI::Conversations::Message::Content::ReasoningText,
|
100
102
|
OpenAI::Responses::ResponseOutputRefusal,
|
101
103
|
OpenAI::Responses::ResponseInputImage,
|
102
104
|
OpenAI::Conversations::ComputerScreenshotContent,
|
@@ -104,6 +106,38 @@ module OpenAI
|
|
104
106
|
)
|
105
107
|
end
|
106
108
|
|
109
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
110
|
+
OrHash =
|
111
|
+
T.type_alias do
|
112
|
+
T.any(
|
113
|
+
OpenAI::Conversations::Message::Content::ReasoningText,
|
114
|
+
OpenAI::Internal::AnyHash
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
118
|
+
# The reasoning text from the model.
|
119
|
+
sig { returns(String) }
|
120
|
+
attr_accessor :text
|
121
|
+
|
122
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
123
|
+
sig { returns(Symbol) }
|
124
|
+
attr_accessor :type
|
125
|
+
|
126
|
+
# Reasoning text from the model.
|
127
|
+
sig { params(text: String, type: Symbol).returns(T.attached_class) }
|
128
|
+
def self.new(
|
129
|
+
# The reasoning text from the model.
|
130
|
+
text:,
|
131
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
132
|
+
type: :reasoning_text
|
133
|
+
)
|
134
|
+
end
|
135
|
+
|
136
|
+
sig { override.returns({ text: String, type: Symbol }) }
|
137
|
+
def to_hash
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
107
141
|
sig do
|
108
142
|
override.returns(
|
109
143
|
T::Array[OpenAI::Conversations::Message::Content::Variants]
|
@@ -12,15 +12,22 @@ module OpenAI
|
|
12
12
|
)
|
13
13
|
end
|
14
14
|
|
15
|
+
# A summary of the reasoning output from the model so far.
|
15
16
|
sig { returns(String) }
|
16
17
|
attr_accessor :text
|
17
18
|
|
19
|
+
# The type of the object. Always `summary_text`.
|
18
20
|
sig { returns(Symbol) }
|
19
21
|
attr_accessor :type
|
20
22
|
|
21
23
|
# A summary text from the model.
|
22
24
|
sig { params(text: String, type: Symbol).returns(T.attached_class) }
|
23
|
-
def self.new(
|
25
|
+
def self.new(
|
26
|
+
# A summary of the reasoning output from the model so far.
|
27
|
+
text:,
|
28
|
+
# The type of the object. Always `summary_text`.
|
29
|
+
type: :summary_text
|
30
|
+
)
|
24
31
|
end
|
25
32
|
|
26
33
|
sig { override.returns({ text: String, type: Symbol }) }
|
@@ -15,10 +15,43 @@ module OpenAI
|
|
15
15
|
OpenAI::Responses::ResponseInputFile,
|
16
16
|
OpenAI::Responses::ResponseInputAudio,
|
17
17
|
OpenAI::Responses::ResponseOutputText,
|
18
|
-
OpenAI::Responses::ResponseOutputRefusal
|
18
|
+
OpenAI::Responses::ResponseOutputRefusal,
|
19
|
+
OpenAI::Responses::ResponseContent::ReasoningTextContent
|
19
20
|
)
|
20
21
|
end
|
21
22
|
|
23
|
+
class ReasoningTextContent < OpenAI::Internal::Type::BaseModel
|
24
|
+
OrHash =
|
25
|
+
T.type_alias do
|
26
|
+
T.any(
|
27
|
+
OpenAI::Responses::ResponseContent::ReasoningTextContent,
|
28
|
+
OpenAI::Internal::AnyHash
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
# The reasoning text from the model.
|
33
|
+
sig { returns(String) }
|
34
|
+
attr_accessor :text
|
35
|
+
|
36
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
37
|
+
sig { returns(Symbol) }
|
38
|
+
attr_accessor :type
|
39
|
+
|
40
|
+
# Reasoning text from the model.
|
41
|
+
sig { params(text: String, type: Symbol).returns(T.attached_class) }
|
42
|
+
def self.new(
|
43
|
+
# The reasoning text from the model.
|
44
|
+
text:,
|
45
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
46
|
+
type: :reasoning_text
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
sig { override.returns({ text: String, type: Symbol }) }
|
51
|
+
def to_hash
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
22
55
|
sig do
|
23
56
|
override.returns(
|
24
57
|
T::Array[OpenAI::Responses::ResponseContent::Variants]
|
@@ -49,7 +49,8 @@ module OpenAI
|
|
49
49
|
part:
|
50
50
|
T.any(
|
51
51
|
OpenAI::Responses::ResponseOutputText::OrHash,
|
52
|
-
OpenAI::Responses::ResponseOutputRefusal::OrHash
|
52
|
+
OpenAI::Responses::ResponseOutputRefusal::OrHash,
|
53
|
+
OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText::OrHash
|
53
54
|
),
|
54
55
|
sequence_number: Integer,
|
55
56
|
type: Symbol
|
@@ -95,10 +96,43 @@ module OpenAI
|
|
95
96
|
T.type_alias do
|
96
97
|
T.any(
|
97
98
|
OpenAI::Responses::ResponseOutputText,
|
98
|
-
OpenAI::Responses::ResponseOutputRefusal
|
99
|
+
OpenAI::Responses::ResponseOutputRefusal,
|
100
|
+
OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText
|
99
101
|
)
|
100
102
|
end
|
101
103
|
|
104
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
105
|
+
OrHash =
|
106
|
+
T.type_alias do
|
107
|
+
T.any(
|
108
|
+
OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText,
|
109
|
+
OpenAI::Internal::AnyHash
|
110
|
+
)
|
111
|
+
end
|
112
|
+
|
113
|
+
# The reasoning text from the model.
|
114
|
+
sig { returns(String) }
|
115
|
+
attr_accessor :text
|
116
|
+
|
117
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
118
|
+
sig { returns(Symbol) }
|
119
|
+
attr_accessor :type
|
120
|
+
|
121
|
+
# Reasoning text from the model.
|
122
|
+
sig { params(text: String, type: Symbol).returns(T.attached_class) }
|
123
|
+
def self.new(
|
124
|
+
# The reasoning text from the model.
|
125
|
+
text:,
|
126
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
127
|
+
type: :reasoning_text
|
128
|
+
)
|
129
|
+
end
|
130
|
+
|
131
|
+
sig { override.returns({ text: String, type: Symbol }) }
|
132
|
+
def to_hash
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
102
136
|
sig do
|
103
137
|
override.returns(
|
104
138
|
T::Array[
|
@@ -49,7 +49,8 @@ module OpenAI
|
|
49
49
|
part:
|
50
50
|
T.any(
|
51
51
|
OpenAI::Responses::ResponseOutputText::OrHash,
|
52
|
-
OpenAI::Responses::ResponseOutputRefusal::OrHash
|
52
|
+
OpenAI::Responses::ResponseOutputRefusal::OrHash,
|
53
|
+
OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText::OrHash
|
53
54
|
),
|
54
55
|
sequence_number: Integer,
|
55
56
|
type: Symbol
|
@@ -95,10 +96,43 @@ module OpenAI
|
|
95
96
|
T.type_alias do
|
96
97
|
T.any(
|
97
98
|
OpenAI::Responses::ResponseOutputText,
|
98
|
-
OpenAI::Responses::ResponseOutputRefusal
|
99
|
+
OpenAI::Responses::ResponseOutputRefusal,
|
100
|
+
OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText
|
99
101
|
)
|
100
102
|
end
|
101
103
|
|
104
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
105
|
+
OrHash =
|
106
|
+
T.type_alias do
|
107
|
+
T.any(
|
108
|
+
OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText,
|
109
|
+
OpenAI::Internal::AnyHash
|
110
|
+
)
|
111
|
+
end
|
112
|
+
|
113
|
+
# The reasoning text from the model.
|
114
|
+
sig { returns(String) }
|
115
|
+
attr_accessor :text
|
116
|
+
|
117
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
118
|
+
sig { returns(Symbol) }
|
119
|
+
attr_accessor :type
|
120
|
+
|
121
|
+
# Reasoning text from the model.
|
122
|
+
sig { params(text: String, type: Symbol).returns(T.attached_class) }
|
123
|
+
def self.new(
|
124
|
+
# The reasoning text from the model.
|
125
|
+
text:,
|
126
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
127
|
+
type: :reasoning_text
|
128
|
+
)
|
129
|
+
end
|
130
|
+
|
131
|
+
sig { override.returns({ text: String, type: Symbol }) }
|
132
|
+
def to_hash
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
102
136
|
sig do
|
103
137
|
override.returns(
|
104
138
|
T::Array[
|
@@ -141,6 +141,7 @@ module OpenAI
|
|
141
141
|
sig { returns(Symbol) }
|
142
142
|
attr_accessor :type
|
143
143
|
|
144
|
+
# A summary text from the model.
|
144
145
|
sig { params(text: String, type: Symbol).returns(T.attached_class) }
|
145
146
|
def self.new(
|
146
147
|
# A summary of the reasoning output from the model so far.
|
@@ -164,19 +165,20 @@ module OpenAI
|
|
164
165
|
)
|
165
166
|
end
|
166
167
|
|
167
|
-
#
|
168
|
+
# The reasoning text from the model.
|
168
169
|
sig { returns(String) }
|
169
170
|
attr_accessor :text
|
170
171
|
|
171
|
-
# The type of the
|
172
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
172
173
|
sig { returns(Symbol) }
|
173
174
|
attr_accessor :type
|
174
175
|
|
176
|
+
# Reasoning text from the model.
|
175
177
|
sig { params(text: String, type: Symbol).returns(T.attached_class) }
|
176
178
|
def self.new(
|
177
|
-
#
|
179
|
+
# The reasoning text from the model.
|
178
180
|
text:,
|
179
|
-
# The type of the
|
181
|
+
# The type of the reasoning text. Always `reasoning_text`.
|
180
182
|
type: :reasoning_text
|
181
183
|
)
|
182
184
|
end
|
@@ -42,6 +42,7 @@ module OpenAI
|
|
42
42
|
| OpenAI::Responses::ResponseOutputText
|
43
43
|
| OpenAI::Conversations::TextContent
|
44
44
|
| OpenAI::Conversations::SummaryTextContent
|
45
|
+
| OpenAI::Conversations::Message::Content::ReasoningText
|
45
46
|
| OpenAI::Responses::ResponseOutputRefusal
|
46
47
|
| OpenAI::Responses::ResponseInputImage
|
47
48
|
| OpenAI::Conversations::ComputerScreenshotContent
|
@@ -50,6 +51,18 @@ module OpenAI
|
|
50
51
|
module Content
|
51
52
|
extend OpenAI::Internal::Type::Union
|
52
53
|
|
54
|
+
type reasoning_text = { text: String, type: :reasoning_text }
|
55
|
+
|
56
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
57
|
+
attr_accessor text: String
|
58
|
+
|
59
|
+
attr_accessor type: :reasoning_text
|
60
|
+
|
61
|
+
def initialize: (text: String, ?type: :reasoning_text) -> void
|
62
|
+
|
63
|
+
def to_hash: -> { text: String, type: :reasoning_text }
|
64
|
+
end
|
65
|
+
|
53
66
|
def self?.variants: -> ::Array[OpenAI::Models::Conversations::Message::content]
|
54
67
|
end
|
55
68
|
|
@@ -8,10 +8,23 @@ module OpenAI
|
|
8
8
|
| OpenAI::Responses::ResponseInputAudio
|
9
9
|
| OpenAI::Responses::ResponseOutputText
|
10
10
|
| OpenAI::Responses::ResponseOutputRefusal
|
11
|
+
| OpenAI::Responses::ResponseContent::ReasoningTextContent
|
11
12
|
|
12
13
|
module ResponseContent
|
13
14
|
extend OpenAI::Internal::Type::Union
|
14
15
|
|
16
|
+
type reasoning_text_content = { text: String, type: :reasoning_text }
|
17
|
+
|
18
|
+
class ReasoningTextContent < OpenAI::Internal::Type::BaseModel
|
19
|
+
attr_accessor text: String
|
20
|
+
|
21
|
+
attr_accessor type: :reasoning_text
|
22
|
+
|
23
|
+
def initialize: (text: String, ?type: :reasoning_text) -> void
|
24
|
+
|
25
|
+
def to_hash: -> { text: String, type: :reasoning_text }
|
26
|
+
end
|
27
|
+
|
15
28
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::response_content]
|
16
29
|
end
|
17
30
|
end
|
@@ -45,10 +45,23 @@ module OpenAI
|
|
45
45
|
type part =
|
46
46
|
OpenAI::Responses::ResponseOutputText
|
47
47
|
| OpenAI::Responses::ResponseOutputRefusal
|
48
|
+
| OpenAI::Responses::ResponseContentPartAddedEvent::Part::ReasoningText
|
48
49
|
|
49
50
|
module Part
|
50
51
|
extend OpenAI::Internal::Type::Union
|
51
52
|
|
53
|
+
type reasoning_text = { text: String, type: :reasoning_text }
|
54
|
+
|
55
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
56
|
+
attr_accessor text: String
|
57
|
+
|
58
|
+
attr_accessor type: :reasoning_text
|
59
|
+
|
60
|
+
def initialize: (text: String, ?type: :reasoning_text) -> void
|
61
|
+
|
62
|
+
def to_hash: -> { text: String, type: :reasoning_text }
|
63
|
+
end
|
64
|
+
|
52
65
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseContentPartAddedEvent::part]
|
53
66
|
end
|
54
67
|
end
|
@@ -45,10 +45,23 @@ module OpenAI
|
|
45
45
|
type part =
|
46
46
|
OpenAI::Responses::ResponseOutputText
|
47
47
|
| OpenAI::Responses::ResponseOutputRefusal
|
48
|
+
| OpenAI::Responses::ResponseContentPartDoneEvent::Part::ReasoningText
|
48
49
|
|
49
50
|
module Part
|
50
51
|
extend OpenAI::Internal::Type::Union
|
51
52
|
|
53
|
+
type reasoning_text = { text: String, type: :reasoning_text }
|
54
|
+
|
55
|
+
class ReasoningText < OpenAI::Internal::Type::BaseModel
|
56
|
+
attr_accessor text: String
|
57
|
+
|
58
|
+
attr_accessor type: :reasoning_text
|
59
|
+
|
60
|
+
def initialize: (text: String, ?type: :reasoning_text) -> void
|
61
|
+
|
62
|
+
def to_hash: -> { text: String, type: :reasoning_text }
|
63
|
+
end
|
64
|
+
|
52
65
|
def self?.variants: -> ::Array[OpenAI::Models::Responses::ResponseContentPartDoneEvent::part]
|
53
66
|
end
|
54
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|