openai 0.110.0 → 0.111.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 +12 -0
- data/README.md +1 -1
- data/lib/openai/models/decision_create_params.rb +798 -28
- data/lib/openai/models/decision_input_json.rb +45 -0
- data/lib/openai/models/decision_input_message.rb +304 -48
- data/lib/openai/models/decision_input_part.rb +4 -1
- data/lib/openai/models/decision_question_input_image.rb +54 -0
- data/lib/openai/models/decision_question_input_part.rb +23 -0
- data/lib/openai/models/decision_question_input_text.rb +21 -0
- data/lib/openai/models/live/decision_trigger.rb +82 -9
- data/lib/openai/models/live/decisions_delegation_config.rb +82 -9
- data/lib/openai/models/live/decisions_delegation_update_config.rb +82 -9
- data/lib/openai/models.rb +8 -0
- data/lib/openai/resources/decisions.rb +5 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -0
- data/rbi/openai/models/decision_create_params.rbi +1273 -26
- data/rbi/openai/models/decision_input_json.rbi +75 -0
- data/rbi/openai/models/decision_input_message.rbi +455 -52
- data/rbi/openai/models/decision_input_part.rbi +2 -1
- data/rbi/openai/models/decision_question_input_image.rbi +82 -0
- data/rbi/openai/models/decision_question_input_part.rbi +25 -0
- data/rbi/openai/models/decision_question_input_text.rbi +49 -0
- data/rbi/openai/models/live/decision_trigger.rbi +72 -9
- data/rbi/openai/models/live/decisions_delegation_config.rbi +72 -9
- data/rbi/openai/models/live/decisions_delegation_update_config.rbi +72 -9
- data/rbi/openai/models.rbi +8 -0
- data/rbi/openai/resources/decisions.rbi +4 -5
- data/sig/openai/models/decision_create_params.rbs +610 -24
- data/sig/openai/models/decision_input_json.rbs +34 -0
- data/sig/openai/models/decision_input_message.rbs +264 -35
- data/sig/openai/models/decision_input_part.rbs +3 -1
- data/sig/openai/models/decision_question_input_image.rbs +51 -0
- data/sig/openai/models/decision_question_input_part.rbs +14 -0
- data/sig/openai/models/decision_question_input_text.rbs +15 -0
- data/sig/openai/models/live/decision_trigger.rbs +49 -12
- data/sig/openai/models/live/decisions_delegation_config.rbs +49 -12
- data/sig/openai/models/live/decisions_delegation_update_config.rbs +49 -12
- data/sig/openai/models.rbs +9 -1
- metadata +13 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class DecisionInputJSON < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute data
|
|
7
|
+
#
|
|
8
|
+
# @return [Hash{Symbol=>Object}, Array<Hash{Symbol=>Object}>]
|
|
9
|
+
required :data, union: -> { OpenAI::DecisionInputJSON::Data }
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, :input_json]
|
|
14
|
+
required :type, const: :input_json
|
|
15
|
+
|
|
16
|
+
# @!method initialize(data:, type: :input_json)
|
|
17
|
+
# A JSON object or an array of objects rendered as text. Nested values may be any
|
|
18
|
+
# JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of
|
|
19
|
+
# compact UTF-8 JSON.
|
|
20
|
+
#
|
|
21
|
+
# @param data [Hash{Symbol=>Object}, Array<Hash{Symbol=>Object}>]
|
|
22
|
+
# @param type [Symbol, :input_json]
|
|
23
|
+
|
|
24
|
+
# @see OpenAI::Models::DecisionInputJSON#data
|
|
25
|
+
module Data
|
|
26
|
+
extend OpenAI::Internal::Type::Union
|
|
27
|
+
|
|
28
|
+
variant -> { OpenAI::Models::DecisionInputJSON::Data::UnionMember0Map }
|
|
29
|
+
|
|
30
|
+
variant -> { OpenAI::Models::DecisionInputJSON::Data::UnionMember1Array }
|
|
31
|
+
|
|
32
|
+
# @!method self.variants
|
|
33
|
+
# @return [Array(Hash{Symbol=>Object}, Array<Hash{Symbol=>Object, nil}>)]
|
|
34
|
+
|
|
35
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
36
|
+
UnionMember0Map = OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown]
|
|
37
|
+
|
|
38
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
39
|
+
UnionMember1Array = OpenAI::Internal::Type::ArrayOf[
|
|
40
|
+
OpenAI::Internal::Type::HashOf[OpenAI::Internal::Type::Unknown, nil?: true]
|
|
41
|
+
]
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -2,59 +2,315 @@
|
|
|
2
2
|
|
|
3
3
|
module OpenAI
|
|
4
4
|
module Models
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
#
|
|
43
|
-
# @
|
|
44
|
-
|
|
45
|
-
#
|
|
46
|
-
|
|
5
|
+
# A user message containing input text, images, or JSON.
|
|
6
|
+
module DecisionInputMessage
|
|
7
|
+
extend OpenAI::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
discriminator :role
|
|
10
|
+
|
|
11
|
+
# A user message containing input text, images, or JSON.
|
|
12
|
+
variant :user, -> { OpenAI::DecisionInputMessage::User }
|
|
13
|
+
|
|
14
|
+
# A developer message containing input text.
|
|
15
|
+
variant :developer, -> { OpenAI::DecisionInputMessage::Developer }
|
|
16
|
+
|
|
17
|
+
# A system message containing input text.
|
|
18
|
+
variant :system, -> { OpenAI::DecisionInputMessage::System }
|
|
19
|
+
|
|
20
|
+
# An assistant message containing output text or refusals.
|
|
21
|
+
variant :assistant, -> { OpenAI::DecisionInputMessage::Assistant }
|
|
22
|
+
|
|
23
|
+
class User < OpenAI::Internal::Type::BaseModel
|
|
24
|
+
# @!attribute content
|
|
25
|
+
# A text string or an ordered list of text, image, and JSON parts.
|
|
26
|
+
#
|
|
27
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
28
|
+
required :content, union: -> { OpenAI::DecisionInputMessage::User::Content }
|
|
29
|
+
|
|
30
|
+
# @!attribute role
|
|
31
|
+
#
|
|
32
|
+
# @return [Symbol, :user]
|
|
33
|
+
required :role, const: :user
|
|
34
|
+
|
|
35
|
+
# @!attribute type
|
|
36
|
+
#
|
|
37
|
+
# @return [Symbol, OpenAI::Models::DecisionInputMessage::User::Type, nil]
|
|
38
|
+
optional :type, enum: -> { OpenAI::DecisionInputMessage::User::Type }
|
|
39
|
+
|
|
40
|
+
# @!method initialize(content:, type: nil, role: :user)
|
|
41
|
+
# A user message containing input text, images, or JSON.
|
|
42
|
+
#
|
|
43
|
+
# @param content [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
44
|
+
# A text string or an ordered list of text, image, and JSON parts.
|
|
45
|
+
#
|
|
46
|
+
# @param type [Symbol, OpenAI::Models::DecisionInputMessage::User::Type]
|
|
47
|
+
#
|
|
48
|
+
# @param role [Symbol, :user]
|
|
49
|
+
|
|
50
|
+
# A text string or an ordered list of text, image, and JSON parts.
|
|
51
|
+
#
|
|
52
|
+
# @see OpenAI::Models::DecisionInputMessage::User#content
|
|
53
|
+
module Content
|
|
54
|
+
extend OpenAI::Internal::Type::Union
|
|
55
|
+
|
|
56
|
+
variant String
|
|
57
|
+
|
|
58
|
+
variant -> { OpenAI::Models::DecisionInputMessage::User::Content::DecisionInputPartArray }
|
|
59
|
+
|
|
60
|
+
# @!method self.variants
|
|
61
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
62
|
+
|
|
63
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
64
|
+
DecisionInputPartArray = OpenAI::Internal::Type::ArrayOf[union: -> { OpenAI::DecisionInputPart }]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @see OpenAI::Models::DecisionInputMessage::User#type
|
|
68
|
+
module Type
|
|
69
|
+
extend OpenAI::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
MESSAGE = :message
|
|
72
|
+
|
|
73
|
+
# @!method self.values
|
|
74
|
+
# @return [Array<Symbol>]
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
class Developer < OpenAI::Internal::Type::BaseModel
|
|
79
|
+
# @!attribute content
|
|
80
|
+
# A text string or an ordered list of input text parts.
|
|
81
|
+
#
|
|
82
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText>]
|
|
83
|
+
required :content, union: -> { OpenAI::DecisionInputMessage::Developer::Content }
|
|
84
|
+
|
|
85
|
+
# @!attribute role
|
|
86
|
+
#
|
|
87
|
+
# @return [Symbol, :developer]
|
|
88
|
+
required :role, const: :developer
|
|
89
|
+
|
|
90
|
+
# @!attribute type
|
|
91
|
+
#
|
|
92
|
+
# @return [Symbol, OpenAI::Models::DecisionInputMessage::Developer::Type, nil]
|
|
93
|
+
optional :type, enum: -> { OpenAI::DecisionInputMessage::Developer::Type }
|
|
94
|
+
|
|
95
|
+
# @!method initialize(content:, type: nil, role: :developer)
|
|
96
|
+
# A developer message containing input text.
|
|
97
|
+
#
|
|
98
|
+
# @param content [String, Array<OpenAI::Models::DecisionInputText>]
|
|
99
|
+
# A text string or an ordered list of input text parts.
|
|
100
|
+
#
|
|
101
|
+
# @param type [Symbol, OpenAI::Models::DecisionInputMessage::Developer::Type]
|
|
102
|
+
#
|
|
103
|
+
# @param role [Symbol, :developer]
|
|
104
|
+
|
|
105
|
+
# A text string or an ordered list of input text parts.
|
|
106
|
+
#
|
|
107
|
+
# @see OpenAI::Models::DecisionInputMessage::Developer#content
|
|
108
|
+
module Content
|
|
109
|
+
extend OpenAI::Internal::Type::Union
|
|
110
|
+
|
|
111
|
+
variant String
|
|
112
|
+
|
|
113
|
+
variant -> { OpenAI::Models::DecisionInputMessage::Developer::Content::DecisionInputTextArray }
|
|
114
|
+
|
|
115
|
+
# @!method self.variants
|
|
116
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText>)]
|
|
117
|
+
|
|
118
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
119
|
+
DecisionInputTextArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::DecisionInputText }]
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see OpenAI::Models::DecisionInputMessage::Developer#type
|
|
123
|
+
module Type
|
|
124
|
+
extend OpenAI::Internal::Type::Enum
|
|
125
|
+
|
|
126
|
+
MESSAGE = :message
|
|
127
|
+
|
|
128
|
+
# @!method self.values
|
|
129
|
+
# @return [Array<Symbol>]
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
class System < OpenAI::Internal::Type::BaseModel
|
|
134
|
+
# @!attribute content
|
|
135
|
+
# A text string or an ordered list of input text parts.
|
|
136
|
+
#
|
|
137
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText>]
|
|
138
|
+
required :content, union: -> { OpenAI::DecisionInputMessage::System::Content }
|
|
139
|
+
|
|
140
|
+
# @!attribute role
|
|
141
|
+
#
|
|
142
|
+
# @return [Symbol, :system]
|
|
143
|
+
required :role, const: :system
|
|
144
|
+
|
|
145
|
+
# @!attribute type
|
|
146
|
+
#
|
|
147
|
+
# @return [Symbol, OpenAI::Models::DecisionInputMessage::System::Type, nil]
|
|
148
|
+
optional :type, enum: -> { OpenAI::DecisionInputMessage::System::Type }
|
|
149
|
+
|
|
150
|
+
# @!method initialize(content:, type: nil, role: :system)
|
|
151
|
+
# A system message containing input text.
|
|
152
|
+
#
|
|
153
|
+
# @param content [String, Array<OpenAI::Models::DecisionInputText>]
|
|
154
|
+
# A text string or an ordered list of input text parts.
|
|
155
|
+
#
|
|
156
|
+
# @param type [Symbol, OpenAI::Models::DecisionInputMessage::System::Type]
|
|
157
|
+
#
|
|
158
|
+
# @param role [Symbol, :system]
|
|
159
|
+
|
|
160
|
+
# A text string or an ordered list of input text parts.
|
|
161
|
+
#
|
|
162
|
+
# @see OpenAI::Models::DecisionInputMessage::System#content
|
|
163
|
+
module Content
|
|
164
|
+
extend OpenAI::Internal::Type::Union
|
|
165
|
+
|
|
166
|
+
variant String
|
|
167
|
+
|
|
168
|
+
variant -> { OpenAI::Models::DecisionInputMessage::System::Content::DecisionInputTextArray }
|
|
169
|
+
|
|
170
|
+
# @!method self.variants
|
|
171
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText>)]
|
|
172
|
+
|
|
173
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
174
|
+
DecisionInputTextArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::DecisionInputText }]
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# @see OpenAI::Models::DecisionInputMessage::System#type
|
|
178
|
+
module Type
|
|
179
|
+
extend OpenAI::Internal::Type::Enum
|
|
180
|
+
|
|
181
|
+
MESSAGE = :message
|
|
182
|
+
|
|
183
|
+
# @!method self.values
|
|
184
|
+
# @return [Array<Symbol>]
|
|
185
|
+
end
|
|
47
186
|
end
|
|
48
187
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
188
|
+
class Assistant < OpenAI::Internal::Type::BaseModel
|
|
189
|
+
# @!attribute content
|
|
190
|
+
# A text string or an ordered list of output text and refusal parts.
|
|
191
|
+
#
|
|
192
|
+
# @return [String, Array<OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::OutputText, OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::Refusal>]
|
|
193
|
+
required :content, union: -> { OpenAI::DecisionInputMessage::Assistant::Content }
|
|
194
|
+
|
|
195
|
+
# @!attribute role
|
|
196
|
+
#
|
|
197
|
+
# @return [Symbol, :assistant]
|
|
198
|
+
required :role, const: :assistant
|
|
199
|
+
|
|
200
|
+
# @!attribute phase
|
|
201
|
+
# The phase of an assistant message.
|
|
202
|
+
#
|
|
203
|
+
# @return [Symbol, OpenAI::Models::DecisionInputMessage::Assistant::Phase, nil]
|
|
204
|
+
optional :phase, enum: -> { OpenAI::DecisionInputMessage::Assistant::Phase }, nil?: true
|
|
205
|
+
|
|
206
|
+
# @!attribute type
|
|
207
|
+
#
|
|
208
|
+
# @return [Symbol, OpenAI::Models::DecisionInputMessage::Assistant::Type, nil]
|
|
209
|
+
optional :type, enum: -> { OpenAI::DecisionInputMessage::Assistant::Type }
|
|
210
|
+
|
|
211
|
+
# @!method initialize(content:, phase: nil, type: nil, role: :assistant)
|
|
212
|
+
# An assistant message containing output text or refusals.
|
|
213
|
+
#
|
|
214
|
+
# @param content [String, Array<OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::OutputText, OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::Refusal>]
|
|
215
|
+
# A text string or an ordered list of output text and refusal parts.
|
|
216
|
+
#
|
|
217
|
+
# @param phase [Symbol, OpenAI::Models::DecisionInputMessage::Assistant::Phase, nil]
|
|
218
|
+
# The phase of an assistant message.
|
|
219
|
+
#
|
|
220
|
+
# @param type [Symbol, OpenAI::Models::DecisionInputMessage::Assistant::Type]
|
|
221
|
+
#
|
|
222
|
+
# @param role [Symbol, :assistant]
|
|
223
|
+
|
|
224
|
+
# A text string or an ordered list of output text and refusal parts.
|
|
225
|
+
#
|
|
226
|
+
# @see OpenAI::Models::DecisionInputMessage::Assistant#content
|
|
227
|
+
module Content
|
|
228
|
+
extend OpenAI::Internal::Type::Union
|
|
229
|
+
|
|
230
|
+
variant String
|
|
231
|
+
|
|
232
|
+
variant -> { OpenAI::Models::DecisionInputMessage::Assistant::Content::PartsArray }
|
|
233
|
+
|
|
234
|
+
module Part
|
|
235
|
+
extend OpenAI::Internal::Type::Union
|
|
52
236
|
|
|
53
|
-
|
|
237
|
+
discriminator :type
|
|
54
238
|
|
|
55
|
-
|
|
56
|
-
|
|
239
|
+
variant :output_text, -> { OpenAI::DecisionInputMessage::Assistant::Content::Part::OutputText }
|
|
240
|
+
|
|
241
|
+
variant :refusal, -> { OpenAI::DecisionInputMessage::Assistant::Content::Part::Refusal }
|
|
242
|
+
|
|
243
|
+
class OutputText < OpenAI::Internal::Type::BaseModel
|
|
244
|
+
# @!attribute text
|
|
245
|
+
#
|
|
246
|
+
# @return [String]
|
|
247
|
+
required :text, String
|
|
248
|
+
|
|
249
|
+
# @!attribute type
|
|
250
|
+
#
|
|
251
|
+
# @return [Symbol, :output_text]
|
|
252
|
+
required :type, const: :output_text
|
|
253
|
+
|
|
254
|
+
# @!method initialize(text:, type: :output_text)
|
|
255
|
+
# @param text [String]
|
|
256
|
+
# @param type [Symbol, :output_text]
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
class Refusal < OpenAI::Internal::Type::BaseModel
|
|
260
|
+
# @!attribute refusal
|
|
261
|
+
#
|
|
262
|
+
# @return [String]
|
|
263
|
+
required :refusal, String
|
|
264
|
+
|
|
265
|
+
# @!attribute type
|
|
266
|
+
#
|
|
267
|
+
# @return [Symbol, :refusal]
|
|
268
|
+
required :type, const: :refusal
|
|
269
|
+
|
|
270
|
+
# @!method initialize(refusal:, type: :refusal)
|
|
271
|
+
# @param refusal [String]
|
|
272
|
+
# @param type [Symbol, :refusal]
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# @!method self.variants
|
|
276
|
+
# @return [Array(OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::OutputText, OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::Refusal)]
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# @!method self.variants
|
|
280
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::OutputText, OpenAI::Models::DecisionInputMessage::Assistant::Content::Part::Refusal>)]
|
|
281
|
+
|
|
282
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
283
|
+
PartsArray = OpenAI::Internal::Type::ArrayOf[
|
|
284
|
+
union: -> { OpenAI::DecisionInputMessage::Assistant::Content::Part }
|
|
285
|
+
]
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# The phase of an assistant message.
|
|
289
|
+
#
|
|
290
|
+
# @see OpenAI::Models::DecisionInputMessage::Assistant#phase
|
|
291
|
+
module Phase
|
|
292
|
+
extend OpenAI::Internal::Type::Enum
|
|
293
|
+
|
|
294
|
+
COMMENTARY = :commentary
|
|
295
|
+
FINAL_ANSWER = :final_answer
|
|
296
|
+
|
|
297
|
+
# @!method self.values
|
|
298
|
+
# @return [Array<Symbol>]
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# @see OpenAI::Models::DecisionInputMessage::Assistant#type
|
|
302
|
+
module Type
|
|
303
|
+
extend OpenAI::Internal::Type::Enum
|
|
304
|
+
|
|
305
|
+
MESSAGE = :message
|
|
306
|
+
|
|
307
|
+
# @!method self.values
|
|
308
|
+
# @return [Array<Symbol>]
|
|
309
|
+
end
|
|
57
310
|
end
|
|
311
|
+
|
|
312
|
+
# @!method self.variants
|
|
313
|
+
# @return [Array(OpenAI::Models::DecisionInputMessage::User, OpenAI::Models::DecisionInputMessage::Developer, OpenAI::Models::DecisionInputMessage::System, OpenAI::Models::DecisionInputMessage::Assistant)]
|
|
58
314
|
end
|
|
59
315
|
end
|
|
60
316
|
end
|
|
@@ -14,8 +14,11 @@ module OpenAI
|
|
|
14
14
|
# An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
|
|
15
15
|
variant :input_image, -> { OpenAI::DecisionInputImage }
|
|
16
16
|
|
|
17
|
+
# A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.
|
|
18
|
+
variant :input_json, -> { OpenAI::DecisionInputJSON }
|
|
19
|
+
|
|
17
20
|
# @!method self.variants
|
|
18
|
-
# @return [Array(OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage)]
|
|
21
|
+
# @return [Array(OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON)]
|
|
19
22
|
end
|
|
20
23
|
end
|
|
21
24
|
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class DecisionQuestionInputImage < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute image_url
|
|
7
|
+
# A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :image_url, String
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, :input_image]
|
|
15
|
+
required :type, const: :input_image
|
|
16
|
+
|
|
17
|
+
# @!attribute detail
|
|
18
|
+
# The image detail level, using the selected model's image profile. Defaults to
|
|
19
|
+
# auto.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, OpenAI::Models::DecisionQuestionInputImage::Detail, nil]
|
|
22
|
+
optional :detail, enum: -> { OpenAI::DecisionQuestionInputImage::Detail }, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!method initialize(image_url:, detail: nil, type: :input_image)
|
|
25
|
+
# An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
|
|
26
|
+
# File IDs are not supported.
|
|
27
|
+
#
|
|
28
|
+
# @param image_url [String]
|
|
29
|
+
# A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.
|
|
30
|
+
#
|
|
31
|
+
# @param detail [Symbol, OpenAI::Models::DecisionQuestionInputImage::Detail, nil]
|
|
32
|
+
# The image detail level, using the selected model's image profile. Defaults to
|
|
33
|
+
# auto.
|
|
34
|
+
#
|
|
35
|
+
# @param type [Symbol, :input_image]
|
|
36
|
+
|
|
37
|
+
# The image detail level, using the selected model's image profile. Defaults to
|
|
38
|
+
# auto.
|
|
39
|
+
#
|
|
40
|
+
# @see OpenAI::Models::DecisionQuestionInputImage#detail
|
|
41
|
+
module Detail
|
|
42
|
+
extend OpenAI::Internal::Type::Enum
|
|
43
|
+
|
|
44
|
+
LOW = :low
|
|
45
|
+
HIGH = :high
|
|
46
|
+
AUTO = :auto
|
|
47
|
+
ORIGINAL = :original
|
|
48
|
+
|
|
49
|
+
# @!method self.values
|
|
50
|
+
# @return [Array<Symbol>]
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
# A text, image, or JSON content part in a question instruction.
|
|
6
|
+
module DecisionQuestionInputPart
|
|
7
|
+
extend OpenAI::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
discriminator :type
|
|
10
|
+
|
|
11
|
+
variant :input_text, -> { OpenAI::DecisionQuestionInputText }
|
|
12
|
+
|
|
13
|
+
# An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
|
|
14
|
+
variant :input_image, -> { OpenAI::DecisionQuestionInputImage }
|
|
15
|
+
|
|
16
|
+
# A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.
|
|
17
|
+
variant :input_json, -> { OpenAI::DecisionInputJSON }
|
|
18
|
+
|
|
19
|
+
# @!method self.variants
|
|
20
|
+
# @return [Array(OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON)]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
class DecisionQuestionInputText < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute text
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :text, String
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, :input_text]
|
|
14
|
+
required :type, const: :input_text
|
|
15
|
+
|
|
16
|
+
# @!method initialize(text:, type: :input_text)
|
|
17
|
+
# @param text [String]
|
|
18
|
+
# @param type [Symbol, :input_text]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -66,8 +66,11 @@ module OpenAI
|
|
|
66
66
|
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
67
67
|
# @!attribute instructions
|
|
68
68
|
#
|
|
69
|
-
# @return [String]
|
|
70
|
-
required
|
|
69
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
70
|
+
required(
|
|
71
|
+
:instructions,
|
|
72
|
+
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Predicate::Instructions }
|
|
73
|
+
)
|
|
71
74
|
|
|
72
75
|
# @!attribute type
|
|
73
76
|
# The type of the object. Always `predicate`.
|
|
@@ -83,12 +86,33 @@ module OpenAI
|
|
|
83
86
|
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
84
87
|
# Estimate how likely it is that a statement about the input is true.
|
|
85
88
|
#
|
|
86
|
-
# @param instructions [String]
|
|
89
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
87
90
|
#
|
|
88
91
|
# @param name [String]
|
|
89
92
|
#
|
|
90
93
|
# @param type [Symbol, :predicate]
|
|
91
94
|
# The type of the object. Always `predicate`.
|
|
95
|
+
|
|
96
|
+
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate#instructions
|
|
97
|
+
module Instructions
|
|
98
|
+
extend OpenAI::Internal::Type::Union
|
|
99
|
+
|
|
100
|
+
variant String
|
|
101
|
+
|
|
102
|
+
variant(
|
|
103
|
+
-> {
|
|
104
|
+
OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Predicate::Instructions::DecisionQuestionInputPartArray
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# @!method self.variants
|
|
109
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
110
|
+
|
|
111
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
112
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
113
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
114
|
+
]
|
|
115
|
+
end
|
|
92
116
|
end
|
|
93
117
|
|
|
94
118
|
class Choice < OpenAI::Internal::Type::BaseModel
|
|
@@ -105,8 +129,11 @@ module OpenAI
|
|
|
105
129
|
|
|
106
130
|
# @!attribute instructions
|
|
107
131
|
#
|
|
108
|
-
# @return [String]
|
|
109
|
-
required
|
|
132
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
133
|
+
required(
|
|
134
|
+
:instructions,
|
|
135
|
+
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Choice::Instructions }
|
|
136
|
+
)
|
|
110
137
|
|
|
111
138
|
# @!attribute type
|
|
112
139
|
# The type of the object. Always `choice`.
|
|
@@ -125,7 +152,7 @@ module OpenAI
|
|
|
125
152
|
# @param choices [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Choice>]
|
|
126
153
|
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
127
154
|
#
|
|
128
|
-
# @param instructions [String]
|
|
155
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
129
156
|
#
|
|
130
157
|
# @param name [String]
|
|
131
158
|
#
|
|
@@ -166,13 +193,37 @@ module OpenAI
|
|
|
166
193
|
# @return [Array(String, Boolean)]
|
|
167
194
|
end
|
|
168
195
|
end
|
|
196
|
+
|
|
197
|
+
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice#instructions
|
|
198
|
+
module Instructions
|
|
199
|
+
extend OpenAI::Internal::Type::Union
|
|
200
|
+
|
|
201
|
+
variant String
|
|
202
|
+
|
|
203
|
+
variant(
|
|
204
|
+
-> {
|
|
205
|
+
OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Choice::Instructions::DecisionQuestionInputPartArray
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
# @!method self.variants
|
|
210
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
211
|
+
|
|
212
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
213
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
214
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
215
|
+
]
|
|
216
|
+
end
|
|
169
217
|
end
|
|
170
218
|
|
|
171
219
|
class Score < OpenAI::Internal::Type::BaseModel
|
|
172
220
|
# @!attribute instructions
|
|
173
221
|
#
|
|
174
|
-
# @return [String]
|
|
175
|
-
required
|
|
222
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
223
|
+
required(
|
|
224
|
+
:instructions,
|
|
225
|
+
union: -> { OpenAI::Live::DecisionTrigger::Decisions::Question::Score::Instructions }
|
|
226
|
+
)
|
|
176
227
|
|
|
177
228
|
# @!attribute levels
|
|
178
229
|
#
|
|
@@ -198,7 +249,7 @@ module OpenAI
|
|
|
198
249
|
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
199
250
|
# Rate the input against the supplied ordered levels.
|
|
200
251
|
#
|
|
201
|
-
# @param instructions [String]
|
|
252
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
202
253
|
#
|
|
203
254
|
# @param levels [Array<OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score::Level>]
|
|
204
255
|
#
|
|
@@ -206,6 +257,28 @@ module OpenAI
|
|
|
206
257
|
#
|
|
207
258
|
# @param type [Symbol, :score]
|
|
208
259
|
# The type of the object. Always `score`.
|
|
260
|
+
|
|
261
|
+
# @see OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score#instructions
|
|
262
|
+
module Instructions
|
|
263
|
+
extend OpenAI::Internal::Type::Union
|
|
264
|
+
|
|
265
|
+
variant String
|
|
266
|
+
|
|
267
|
+
variant(
|
|
268
|
+
-> {
|
|
269
|
+
OpenAI::Models::Live::DecisionTrigger::Decisions::Question::Score::Instructions::DecisionQuestionInputPartArray
|
|
270
|
+
}
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
# @!method self.variants
|
|
274
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
275
|
+
|
|
276
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
277
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
278
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
279
|
+
]
|
|
280
|
+
end
|
|
281
|
+
|
|
209
282
|
class Level < OpenAI::Internal::Type::BaseModel
|
|
210
283
|
# @!attribute label
|
|
211
284
|
#
|