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
|
@@ -8,12 +8,11 @@ module OpenAI
|
|
|
8
8
|
include OpenAI::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute input
|
|
11
|
-
# The
|
|
12
|
-
# messages
|
|
13
|
-
#
|
|
14
|
-
# one request. Files, audio, tools, and item references are not supported.
|
|
11
|
+
# The input to evaluate for every question. Provide a text string or an ordered
|
|
12
|
+
# array of messages, function calls and outputs, or custom tool calls and outputs.
|
|
13
|
+
# Each tool output must identify a matching call by call ID.
|
|
15
14
|
#
|
|
16
|
-
# @return [String, Array<OpenAI::Models::
|
|
15
|
+
# @return [String, Array<OpenAI::Models::decision_input_message, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput>]
|
|
17
16
|
required :input, union: -> { OpenAI::DecisionCreateParams::Input }
|
|
18
17
|
|
|
19
18
|
# @!attribute model
|
|
@@ -23,7 +22,7 @@ module OpenAI
|
|
|
23
22
|
required :model, String
|
|
24
23
|
|
|
25
24
|
# @!attribute questions
|
|
26
|
-
# Ask 1–
|
|
25
|
+
# Ask 1–400 questions about the input. Each question can be a predicate, choice,
|
|
27
26
|
# or score. Answers come back in the same order.
|
|
28
27
|
#
|
|
29
28
|
# @return [Array<OpenAI::Models::DecisionCreateParams::Question::Predicate, OpenAI::Models::DecisionCreateParams::Question::Choice, OpenAI::Models::DecisionCreateParams::Question::Score>]
|
|
@@ -57,17 +56,16 @@ module OpenAI
|
|
|
57
56
|
optional :safety_identifier, String, nil?: true
|
|
58
57
|
|
|
59
58
|
# @!method initialize(input:, model:, questions:, prompt_cache_key: nil, prompt_cache_options: nil, safety_identifier: nil, request_options: {})
|
|
60
|
-
# @param input [String, Array<OpenAI::Models::
|
|
61
|
-
# The
|
|
62
|
-
# messages
|
|
63
|
-
#
|
|
64
|
-
# one request. Files, audio, tools, and item references are not supported.
|
|
59
|
+
# @param input [String, Array<OpenAI::Models::decision_input_message, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput>]
|
|
60
|
+
# The input to evaluate for every question. Provide a text string or an ordered
|
|
61
|
+
# array of messages, function calls and outputs, or custom tool calls and outputs.
|
|
62
|
+
# Each tool output must identify a matching call by call ID.
|
|
65
63
|
#
|
|
66
64
|
# @param model [String]
|
|
67
65
|
# The model to use. Only `gpt-6-luna` is supported.
|
|
68
66
|
#
|
|
69
67
|
# @param questions [Array<OpenAI::Models::DecisionCreateParams::Question::Predicate, OpenAI::Models::DecisionCreateParams::Question::Choice, OpenAI::Models::DecisionCreateParams::Question::Score>]
|
|
70
|
-
# Ask 1–
|
|
68
|
+
# Ask 1–400 questions about the input. Each question can be a predicate, choice,
|
|
71
69
|
# or score. Answers come back in the same order.
|
|
72
70
|
#
|
|
73
71
|
# @param prompt_cache_key [String, nil]
|
|
@@ -90,22 +88,730 @@ module OpenAI
|
|
|
90
88
|
#
|
|
91
89
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
92
90
|
|
|
93
|
-
# The
|
|
94
|
-
# messages
|
|
95
|
-
#
|
|
96
|
-
# one request. Files, audio, tools, and item references are not supported.
|
|
91
|
+
# The input to evaluate for every question. Provide a text string or an ordered
|
|
92
|
+
# array of messages, function calls and outputs, or custom tool calls and outputs.
|
|
93
|
+
# Each tool output must identify a matching call by call ID.
|
|
97
94
|
module Input
|
|
98
95
|
extend OpenAI::Internal::Type::Union
|
|
99
96
|
|
|
100
97
|
variant String
|
|
101
98
|
|
|
102
|
-
variant -> { OpenAI::Models::DecisionCreateParams::Input::
|
|
99
|
+
variant -> { OpenAI::Models::DecisionCreateParams::Input::UnionMember1Array }
|
|
100
|
+
|
|
101
|
+
# A user message containing input text, images, or JSON.
|
|
102
|
+
module UnionMember1
|
|
103
|
+
extend OpenAI::Internal::Type::Union
|
|
104
|
+
|
|
105
|
+
discriminator :type
|
|
106
|
+
|
|
107
|
+
# A user message containing input text, images, or JSON.
|
|
108
|
+
variant :message, -> { OpenAI::DecisionInputMessage }
|
|
109
|
+
|
|
110
|
+
# A developer message containing input text.
|
|
111
|
+
variant :message, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage }
|
|
112
|
+
|
|
113
|
+
# A system message containing input text.
|
|
114
|
+
variant :message, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage }
|
|
115
|
+
|
|
116
|
+
# An assistant message containing output text or refusals.
|
|
117
|
+
variant :message, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage }
|
|
118
|
+
|
|
119
|
+
variant :function_call, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall }
|
|
120
|
+
|
|
121
|
+
variant(
|
|
122
|
+
:function_call_output,
|
|
123
|
+
-> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput }
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
variant :custom_tool_call, -> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall }
|
|
127
|
+
|
|
128
|
+
variant(
|
|
129
|
+
:custom_tool_call_output,
|
|
130
|
+
-> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput }
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
class DecisionInputUserMessage < OpenAI::Internal::Type::BaseModel
|
|
134
|
+
# @!attribute content
|
|
135
|
+
# A text string or an ordered list of text, image, and JSON parts.
|
|
136
|
+
#
|
|
137
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
138
|
+
required(
|
|
139
|
+
:content,
|
|
140
|
+
union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content }
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
# @!attribute role
|
|
144
|
+
#
|
|
145
|
+
# @return [Symbol, :user]
|
|
146
|
+
required :role, const: :user
|
|
147
|
+
|
|
148
|
+
# @!attribute type
|
|
149
|
+
#
|
|
150
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type, nil]
|
|
151
|
+
optional(
|
|
152
|
+
:type,
|
|
153
|
+
enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type }
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
# @!method initialize(content:, type: nil, role: :user)
|
|
157
|
+
# A user message containing input text, images, or JSON.
|
|
158
|
+
#
|
|
159
|
+
# @param content [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
160
|
+
# A text string or an ordered list of text, image, and JSON parts.
|
|
161
|
+
#
|
|
162
|
+
# @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type]
|
|
163
|
+
#
|
|
164
|
+
# @param role [Symbol, :user]
|
|
165
|
+
|
|
166
|
+
# A text string or an ordered list of text, image, and JSON parts.
|
|
167
|
+
#
|
|
168
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage#content
|
|
169
|
+
module Content
|
|
170
|
+
extend OpenAI::Internal::Type::Union
|
|
171
|
+
|
|
172
|
+
variant String
|
|
173
|
+
|
|
174
|
+
variant(
|
|
175
|
+
-> {
|
|
176
|
+
OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content::DecisionInputPartArray
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# @!method self.variants
|
|
181
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
182
|
+
|
|
183
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
184
|
+
DecisionInputPartArray = OpenAI::Internal::Type::ArrayOf[union: -> { OpenAI::DecisionInputPart }]
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage#type
|
|
188
|
+
module Type
|
|
189
|
+
extend OpenAI::Internal::Type::Enum
|
|
190
|
+
|
|
191
|
+
MESSAGE = :message
|
|
192
|
+
|
|
193
|
+
# @!method self.values
|
|
194
|
+
# @return [Array<Symbol>]
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
class DecisionInputDeveloperMessage < OpenAI::Internal::Type::BaseModel
|
|
199
|
+
# @!attribute content
|
|
200
|
+
# A text string or an ordered list of input text parts.
|
|
201
|
+
#
|
|
202
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText>]
|
|
203
|
+
required(
|
|
204
|
+
:content,
|
|
205
|
+
union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content }
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
# @!attribute role
|
|
209
|
+
#
|
|
210
|
+
# @return [Symbol, :developer]
|
|
211
|
+
required :role, const: :developer
|
|
212
|
+
|
|
213
|
+
# @!attribute type
|
|
214
|
+
#
|
|
215
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type, nil]
|
|
216
|
+
optional(
|
|
217
|
+
:type,
|
|
218
|
+
enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type }
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
# @!method initialize(content:, type: nil, role: :developer)
|
|
222
|
+
# A developer message containing input text.
|
|
223
|
+
#
|
|
224
|
+
# @param content [String, Array<OpenAI::Models::DecisionInputText>]
|
|
225
|
+
# A text string or an ordered list of input text parts.
|
|
226
|
+
#
|
|
227
|
+
# @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type]
|
|
228
|
+
#
|
|
229
|
+
# @param role [Symbol, :developer]
|
|
230
|
+
|
|
231
|
+
# A text string or an ordered list of input text parts.
|
|
232
|
+
#
|
|
233
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage#content
|
|
234
|
+
module Content
|
|
235
|
+
extend OpenAI::Internal::Type::Union
|
|
236
|
+
|
|
237
|
+
variant String
|
|
238
|
+
|
|
239
|
+
variant(
|
|
240
|
+
-> {
|
|
241
|
+
OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content::DecisionInputTextArray
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
|
|
245
|
+
# @!method self.variants
|
|
246
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText>)]
|
|
247
|
+
|
|
248
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
249
|
+
DecisionInputTextArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::DecisionInputText }]
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage#type
|
|
253
|
+
module Type
|
|
254
|
+
extend OpenAI::Internal::Type::Enum
|
|
255
|
+
|
|
256
|
+
MESSAGE = :message
|
|
257
|
+
|
|
258
|
+
# @!method self.values
|
|
259
|
+
# @return [Array<Symbol>]
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
class DecisionInputSystemMessage < OpenAI::Internal::Type::BaseModel
|
|
264
|
+
# @!attribute content
|
|
265
|
+
# A text string or an ordered list of input text parts.
|
|
266
|
+
#
|
|
267
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText>]
|
|
268
|
+
required(
|
|
269
|
+
:content,
|
|
270
|
+
union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content }
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
# @!attribute role
|
|
274
|
+
#
|
|
275
|
+
# @return [Symbol, :system]
|
|
276
|
+
required :role, const: :system
|
|
277
|
+
|
|
278
|
+
# @!attribute type
|
|
279
|
+
#
|
|
280
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type, nil]
|
|
281
|
+
optional(
|
|
282
|
+
:type,
|
|
283
|
+
enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type }
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
# @!method initialize(content:, type: nil, role: :system)
|
|
287
|
+
# A system message containing input text.
|
|
288
|
+
#
|
|
289
|
+
# @param content [String, Array<OpenAI::Models::DecisionInputText>]
|
|
290
|
+
# A text string or an ordered list of input text parts.
|
|
291
|
+
#
|
|
292
|
+
# @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type]
|
|
293
|
+
#
|
|
294
|
+
# @param role [Symbol, :system]
|
|
295
|
+
|
|
296
|
+
# A text string or an ordered list of input text parts.
|
|
297
|
+
#
|
|
298
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage#content
|
|
299
|
+
module Content
|
|
300
|
+
extend OpenAI::Internal::Type::Union
|
|
301
|
+
|
|
302
|
+
variant String
|
|
303
|
+
|
|
304
|
+
variant(
|
|
305
|
+
-> {
|
|
306
|
+
OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content::DecisionInputTextArray
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
# @!method self.variants
|
|
311
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText>)]
|
|
312
|
+
|
|
313
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
314
|
+
DecisionInputTextArray = OpenAI::Internal::Type::ArrayOf[-> { OpenAI::DecisionInputText }]
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage#type
|
|
318
|
+
module Type
|
|
319
|
+
extend OpenAI::Internal::Type::Enum
|
|
320
|
+
|
|
321
|
+
MESSAGE = :message
|
|
322
|
+
|
|
323
|
+
# @!method self.values
|
|
324
|
+
# @return [Array<Symbol>]
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
class DecisionInputAssistantMessage < OpenAI::Internal::Type::BaseModel
|
|
329
|
+
# @!attribute content
|
|
330
|
+
# A text string or an ordered list of output text and refusal parts.
|
|
331
|
+
#
|
|
332
|
+
# @return [String, Array<OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal>]
|
|
333
|
+
required(
|
|
334
|
+
:content,
|
|
335
|
+
union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content }
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
# @!attribute role
|
|
339
|
+
#
|
|
340
|
+
# @return [Symbol, :assistant]
|
|
341
|
+
required :role, const: :assistant
|
|
342
|
+
|
|
343
|
+
# @!attribute phase
|
|
344
|
+
# The phase of an assistant message.
|
|
345
|
+
#
|
|
346
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase, nil]
|
|
347
|
+
optional(
|
|
348
|
+
:phase,
|
|
349
|
+
enum: -> {
|
|
350
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase
|
|
351
|
+
},
|
|
352
|
+
nil?: true
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
# @!attribute type
|
|
356
|
+
#
|
|
357
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type, nil]
|
|
358
|
+
optional(
|
|
359
|
+
:type,
|
|
360
|
+
enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type }
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
# @!method initialize(content:, phase: nil, type: nil, role: :assistant)
|
|
364
|
+
# An assistant message containing output text or refusals.
|
|
365
|
+
#
|
|
366
|
+
# @param content [String, Array<OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal>]
|
|
367
|
+
# A text string or an ordered list of output text and refusal parts.
|
|
368
|
+
#
|
|
369
|
+
# @param phase [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase, nil]
|
|
370
|
+
# The phase of an assistant message.
|
|
371
|
+
#
|
|
372
|
+
# @param type [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type]
|
|
373
|
+
#
|
|
374
|
+
# @param role [Symbol, :assistant]
|
|
375
|
+
|
|
376
|
+
# A text string or an ordered list of output text and refusal parts.
|
|
377
|
+
#
|
|
378
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage#content
|
|
379
|
+
module Content
|
|
380
|
+
extend OpenAI::Internal::Type::Union
|
|
381
|
+
|
|
382
|
+
variant String
|
|
383
|
+
|
|
384
|
+
variant(
|
|
385
|
+
-> {
|
|
386
|
+
OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::PartsArray
|
|
387
|
+
}
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
module Part
|
|
391
|
+
extend OpenAI::Internal::Type::Union
|
|
392
|
+
|
|
393
|
+
discriminator :type
|
|
394
|
+
|
|
395
|
+
variant(
|
|
396
|
+
:output_text,
|
|
397
|
+
-> {
|
|
398
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText
|
|
399
|
+
}
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
variant(
|
|
403
|
+
:refusal,
|
|
404
|
+
-> {
|
|
405
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
class OutputText < OpenAI::Internal::Type::BaseModel
|
|
410
|
+
# @!attribute text
|
|
411
|
+
#
|
|
412
|
+
# @return [String]
|
|
413
|
+
required :text, String
|
|
414
|
+
|
|
415
|
+
# @!attribute type
|
|
416
|
+
#
|
|
417
|
+
# @return [Symbol, :output_text]
|
|
418
|
+
required :type, const: :output_text
|
|
419
|
+
|
|
420
|
+
# @!method initialize(text:, type: :output_text)
|
|
421
|
+
# @param text [String]
|
|
422
|
+
# @param type [Symbol, :output_text]
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
class Refusal < OpenAI::Internal::Type::BaseModel
|
|
426
|
+
# @!attribute refusal
|
|
427
|
+
#
|
|
428
|
+
# @return [String]
|
|
429
|
+
required :refusal, String
|
|
430
|
+
|
|
431
|
+
# @!attribute type
|
|
432
|
+
#
|
|
433
|
+
# @return [Symbol, :refusal]
|
|
434
|
+
required :type, const: :refusal
|
|
435
|
+
|
|
436
|
+
# @!method initialize(refusal:, type: :refusal)
|
|
437
|
+
# @param refusal [String]
|
|
438
|
+
# @param type [Symbol, :refusal]
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# @!method self.variants
|
|
442
|
+
# @return [Array(OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal)]
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# @!method self.variants
|
|
446
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal>)]
|
|
447
|
+
|
|
448
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
449
|
+
PartsArray = OpenAI::Internal::Type::ArrayOf[
|
|
450
|
+
union: -> {
|
|
451
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# The phase of an assistant message.
|
|
457
|
+
#
|
|
458
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage#phase
|
|
459
|
+
module Phase
|
|
460
|
+
extend OpenAI::Internal::Type::Enum
|
|
461
|
+
|
|
462
|
+
COMMENTARY = :commentary
|
|
463
|
+
FINAL_ANSWER = :final_answer
|
|
464
|
+
|
|
465
|
+
# @!method self.values
|
|
466
|
+
# @return [Array<Symbol>]
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage#type
|
|
470
|
+
module Type
|
|
471
|
+
extend OpenAI::Internal::Type::Enum
|
|
472
|
+
|
|
473
|
+
MESSAGE = :message
|
|
474
|
+
|
|
475
|
+
# @!method self.values
|
|
476
|
+
# @return [Array<Symbol>]
|
|
477
|
+
end
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
class FunctionCall < OpenAI::Internal::Type::BaseModel
|
|
481
|
+
# @!attribute arguments
|
|
482
|
+
#
|
|
483
|
+
# @return [String]
|
|
484
|
+
required :arguments, String
|
|
485
|
+
|
|
486
|
+
# @!attribute call_id
|
|
487
|
+
#
|
|
488
|
+
# @return [String]
|
|
489
|
+
required :call_id, String
|
|
490
|
+
|
|
491
|
+
# @!attribute name
|
|
492
|
+
#
|
|
493
|
+
# @return [String]
|
|
494
|
+
required :name, String
|
|
495
|
+
|
|
496
|
+
# @!attribute type
|
|
497
|
+
#
|
|
498
|
+
# @return [Symbol, :function_call]
|
|
499
|
+
required :type, const: :function_call
|
|
500
|
+
|
|
501
|
+
# @!attribute id
|
|
502
|
+
#
|
|
503
|
+
# @return [String, nil]
|
|
504
|
+
optional :id, String, nil?: true
|
|
505
|
+
|
|
506
|
+
# @!attribute namespace
|
|
507
|
+
#
|
|
508
|
+
# @return [String, nil]
|
|
509
|
+
optional :namespace, String, nil?: true
|
|
510
|
+
|
|
511
|
+
# @!attribute status
|
|
512
|
+
#
|
|
513
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status, nil]
|
|
514
|
+
optional(
|
|
515
|
+
:status,
|
|
516
|
+
enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status },
|
|
517
|
+
nil?: true
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
# @!method initialize(arguments:, call_id:, name:, id: nil, namespace: nil, status: nil, type: :function_call)
|
|
521
|
+
# @param arguments [String]
|
|
522
|
+
# @param call_id [String]
|
|
523
|
+
# @param name [String]
|
|
524
|
+
# @param id [String, nil]
|
|
525
|
+
# @param namespace [String, nil]
|
|
526
|
+
# @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status, nil]
|
|
527
|
+
# @param type [Symbol, :function_call]
|
|
528
|
+
|
|
529
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall#status
|
|
530
|
+
module Status
|
|
531
|
+
extend OpenAI::Internal::Type::Enum
|
|
532
|
+
|
|
533
|
+
IN_PROGRESS = :in_progress
|
|
534
|
+
COMPLETED = :completed
|
|
535
|
+
INCOMPLETE = :incomplete
|
|
536
|
+
|
|
537
|
+
# @!method self.values
|
|
538
|
+
# @return [Array<Symbol>]
|
|
539
|
+
end
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
class FunctionCallOutput < OpenAI::Internal::Type::BaseModel
|
|
543
|
+
# @!attribute call_id
|
|
544
|
+
#
|
|
545
|
+
# @return [String]
|
|
546
|
+
required :call_id, String
|
|
547
|
+
|
|
548
|
+
# @!attribute output
|
|
549
|
+
# Text evidence or an ordered list of text and image parts.
|
|
550
|
+
#
|
|
551
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
|
|
552
|
+
required(
|
|
553
|
+
:output,
|
|
554
|
+
union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output }
|
|
555
|
+
)
|
|
556
|
+
|
|
557
|
+
# @!attribute type
|
|
558
|
+
#
|
|
559
|
+
# @return [Symbol, :function_call_output]
|
|
560
|
+
required :type, const: :function_call_output
|
|
561
|
+
|
|
562
|
+
# @!attribute id
|
|
563
|
+
#
|
|
564
|
+
# @return [String, nil]
|
|
565
|
+
optional :id, String, nil?: true
|
|
566
|
+
|
|
567
|
+
# @!attribute status
|
|
568
|
+
#
|
|
569
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status, nil]
|
|
570
|
+
optional(
|
|
571
|
+
:status,
|
|
572
|
+
enum: -> {
|
|
573
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status
|
|
574
|
+
},
|
|
575
|
+
nil?: true
|
|
576
|
+
)
|
|
577
|
+
|
|
578
|
+
# @!method initialize(call_id:, output:, id: nil, status: nil, type: :function_call_output)
|
|
579
|
+
# @param call_id [String]
|
|
580
|
+
#
|
|
581
|
+
# @param output [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
|
|
582
|
+
# Text evidence or an ordered list of text and image parts.
|
|
583
|
+
#
|
|
584
|
+
# @param id [String, nil]
|
|
585
|
+
#
|
|
586
|
+
# @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status, nil]
|
|
587
|
+
#
|
|
588
|
+
# @param type [Symbol, :function_call_output]
|
|
589
|
+
|
|
590
|
+
# Text evidence or an ordered list of text and image parts.
|
|
591
|
+
#
|
|
592
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput#output
|
|
593
|
+
module Output
|
|
594
|
+
extend OpenAI::Internal::Type::Union
|
|
595
|
+
|
|
596
|
+
variant String
|
|
597
|
+
|
|
598
|
+
variant(
|
|
599
|
+
-> {
|
|
600
|
+
OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::PartsArray
|
|
601
|
+
}
|
|
602
|
+
)
|
|
603
|
+
|
|
604
|
+
# An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
|
|
605
|
+
# File IDs are not supported.
|
|
606
|
+
module Part
|
|
607
|
+
extend OpenAI::Internal::Type::Union
|
|
608
|
+
|
|
609
|
+
variant -> { OpenAI::DecisionInputText }
|
|
610
|
+
|
|
611
|
+
# An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
|
|
612
|
+
variant -> { OpenAI::DecisionInputImage }
|
|
613
|
+
|
|
614
|
+
# @!method self.variants
|
|
615
|
+
# @return [Array(OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage)]
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
# @!method self.variants
|
|
619
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>)]
|
|
620
|
+
|
|
621
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
622
|
+
PartsArray = OpenAI::Internal::Type::ArrayOf[
|
|
623
|
+
union: -> {
|
|
624
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Part
|
|
625
|
+
}
|
|
626
|
+
]
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput#status
|
|
630
|
+
module Status
|
|
631
|
+
extend OpenAI::Internal::Type::Enum
|
|
632
|
+
|
|
633
|
+
IN_PROGRESS = :in_progress
|
|
634
|
+
COMPLETED = :completed
|
|
635
|
+
INCOMPLETE = :incomplete
|
|
636
|
+
|
|
637
|
+
# @!method self.values
|
|
638
|
+
# @return [Array<Symbol>]
|
|
639
|
+
end
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
class CustomToolCall < OpenAI::Internal::Type::BaseModel
|
|
643
|
+
# @!attribute call_id
|
|
644
|
+
#
|
|
645
|
+
# @return [String]
|
|
646
|
+
required :call_id, String
|
|
647
|
+
|
|
648
|
+
# @!attribute input
|
|
649
|
+
#
|
|
650
|
+
# @return [String]
|
|
651
|
+
required :input, String
|
|
652
|
+
|
|
653
|
+
# @!attribute name
|
|
654
|
+
#
|
|
655
|
+
# @return [String]
|
|
656
|
+
required :name, String
|
|
657
|
+
|
|
658
|
+
# @!attribute type
|
|
659
|
+
#
|
|
660
|
+
# @return [Symbol, :custom_tool_call]
|
|
661
|
+
required :type, const: :custom_tool_call
|
|
662
|
+
|
|
663
|
+
# @!attribute id
|
|
664
|
+
#
|
|
665
|
+
# @return [String, nil]
|
|
666
|
+
optional :id, String, nil?: true
|
|
667
|
+
|
|
668
|
+
# @!attribute namespace
|
|
669
|
+
#
|
|
670
|
+
# @return [String, nil]
|
|
671
|
+
optional :namespace, String, nil?: true
|
|
672
|
+
|
|
673
|
+
# @!attribute status
|
|
674
|
+
#
|
|
675
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status, nil]
|
|
676
|
+
optional(
|
|
677
|
+
:status,
|
|
678
|
+
enum: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status },
|
|
679
|
+
nil?: true
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
# @!method initialize(call_id:, input:, name:, id: nil, namespace: nil, status: nil, type: :custom_tool_call)
|
|
683
|
+
# @param call_id [String]
|
|
684
|
+
# @param input [String]
|
|
685
|
+
# @param name [String]
|
|
686
|
+
# @param id [String, nil]
|
|
687
|
+
# @param namespace [String, nil]
|
|
688
|
+
# @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status, nil]
|
|
689
|
+
# @param type [Symbol, :custom_tool_call]
|
|
690
|
+
|
|
691
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall#status
|
|
692
|
+
module Status
|
|
693
|
+
extend OpenAI::Internal::Type::Enum
|
|
694
|
+
|
|
695
|
+
IN_PROGRESS = :in_progress
|
|
696
|
+
COMPLETED = :completed
|
|
697
|
+
INCOMPLETE = :incomplete
|
|
698
|
+
|
|
699
|
+
# @!method self.values
|
|
700
|
+
# @return [Array<Symbol>]
|
|
701
|
+
end
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
class CustomToolCallOutput < OpenAI::Internal::Type::BaseModel
|
|
705
|
+
# @!attribute call_id
|
|
706
|
+
#
|
|
707
|
+
# @return [String]
|
|
708
|
+
required :call_id, String
|
|
709
|
+
|
|
710
|
+
# @!attribute output
|
|
711
|
+
# Text evidence or an ordered list of text and image parts.
|
|
712
|
+
#
|
|
713
|
+
# @return [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
|
|
714
|
+
required(
|
|
715
|
+
:output,
|
|
716
|
+
union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output }
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
# @!attribute type
|
|
720
|
+
#
|
|
721
|
+
# @return [Symbol, :custom_tool_call_output]
|
|
722
|
+
required :type, const: :custom_tool_call_output
|
|
723
|
+
|
|
724
|
+
# @!attribute id
|
|
725
|
+
#
|
|
726
|
+
# @return [String, nil]
|
|
727
|
+
optional :id, String, nil?: true
|
|
728
|
+
|
|
729
|
+
# @!attribute status
|
|
730
|
+
#
|
|
731
|
+
# @return [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status, nil]
|
|
732
|
+
optional(
|
|
733
|
+
:status,
|
|
734
|
+
enum: -> {
|
|
735
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status
|
|
736
|
+
},
|
|
737
|
+
nil?: true
|
|
738
|
+
)
|
|
739
|
+
|
|
740
|
+
# @!method initialize(call_id:, output:, id: nil, status: nil, type: :custom_tool_call_output)
|
|
741
|
+
# @param call_id [String]
|
|
742
|
+
#
|
|
743
|
+
# @param output [String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>]
|
|
744
|
+
# Text evidence or an ordered list of text and image parts.
|
|
745
|
+
#
|
|
746
|
+
# @param id [String, nil]
|
|
747
|
+
#
|
|
748
|
+
# @param status [Symbol, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status, nil]
|
|
749
|
+
#
|
|
750
|
+
# @param type [Symbol, :custom_tool_call_output]
|
|
751
|
+
|
|
752
|
+
# Text evidence or an ordered list of text and image parts.
|
|
753
|
+
#
|
|
754
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput#output
|
|
755
|
+
module Output
|
|
756
|
+
extend OpenAI::Internal::Type::Union
|
|
757
|
+
|
|
758
|
+
variant String
|
|
759
|
+
|
|
760
|
+
variant(
|
|
761
|
+
-> {
|
|
762
|
+
OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::PartsArray
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
|
|
766
|
+
# An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
|
|
767
|
+
# File IDs are not supported.
|
|
768
|
+
module Part
|
|
769
|
+
extend OpenAI::Internal::Type::Union
|
|
770
|
+
|
|
771
|
+
variant -> { OpenAI::DecisionInputText }
|
|
772
|
+
|
|
773
|
+
# An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
|
|
774
|
+
variant -> { OpenAI::DecisionInputImage }
|
|
775
|
+
|
|
776
|
+
# @!method self.variants
|
|
777
|
+
# @return [Array(OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage)]
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
# @!method self.variants
|
|
781
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionInputText, OpenAI::Models::DecisionInputImage>)]
|
|
782
|
+
|
|
783
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
784
|
+
PartsArray = OpenAI::Internal::Type::ArrayOf[
|
|
785
|
+
union: -> {
|
|
786
|
+
OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Part
|
|
787
|
+
}
|
|
788
|
+
]
|
|
789
|
+
end
|
|
790
|
+
|
|
791
|
+
# @see OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput#status
|
|
792
|
+
module Status
|
|
793
|
+
extend OpenAI::Internal::Type::Enum
|
|
794
|
+
|
|
795
|
+
IN_PROGRESS = :in_progress
|
|
796
|
+
COMPLETED = :completed
|
|
797
|
+
INCOMPLETE = :incomplete
|
|
798
|
+
|
|
799
|
+
# @!method self.values
|
|
800
|
+
# @return [Array<Symbol>]
|
|
801
|
+
end
|
|
802
|
+
end
|
|
803
|
+
|
|
804
|
+
# @!method self.variants
|
|
805
|
+
# @return [Array(OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput)]
|
|
806
|
+
end
|
|
103
807
|
|
|
104
808
|
# @!method self.variants
|
|
105
|
-
# @return [Array(String, Array<OpenAI::Models::
|
|
809
|
+
# @return [Array(String, Array<OpenAI::Models::decision_input_message, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall, OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput>)]
|
|
106
810
|
|
|
107
811
|
# @type [OpenAI::Internal::Type::Converter]
|
|
108
|
-
|
|
812
|
+
UnionMember1Array = OpenAI::Internal::Type::ArrayOf[
|
|
813
|
+
union: -> { OpenAI::DecisionCreateParams::Input::UnionMember1 }
|
|
814
|
+
]
|
|
109
815
|
end
|
|
110
816
|
|
|
111
817
|
# A question about the request's input, with an optional correlation name.
|
|
@@ -126,8 +832,8 @@ module OpenAI
|
|
|
126
832
|
class Predicate < OpenAI::Internal::Type::BaseModel
|
|
127
833
|
# @!attribute instructions
|
|
128
834
|
#
|
|
129
|
-
# @return [String]
|
|
130
|
-
required :instructions,
|
|
835
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
836
|
+
required :instructions, union: -> { OpenAI::DecisionCreateParams::Question::Predicate::Instructions }
|
|
131
837
|
|
|
132
838
|
# @!attribute type
|
|
133
839
|
# The type of the object. Always `predicate`.
|
|
@@ -143,12 +849,33 @@ module OpenAI
|
|
|
143
849
|
# @!method initialize(instructions:, name: nil, type: :predicate)
|
|
144
850
|
# Estimate how likely it is that a statement about the input is true.
|
|
145
851
|
#
|
|
146
|
-
# @param instructions [String]
|
|
852
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
147
853
|
#
|
|
148
854
|
# @param name [String]
|
|
149
855
|
#
|
|
150
856
|
# @param type [Symbol, :predicate]
|
|
151
857
|
# The type of the object. Always `predicate`.
|
|
858
|
+
|
|
859
|
+
# @see OpenAI::Models::DecisionCreateParams::Question::Predicate#instructions
|
|
860
|
+
module Instructions
|
|
861
|
+
extend OpenAI::Internal::Type::Union
|
|
862
|
+
|
|
863
|
+
variant String
|
|
864
|
+
|
|
865
|
+
variant(
|
|
866
|
+
-> {
|
|
867
|
+
OpenAI::Models::DecisionCreateParams::Question::Predicate::Instructions::DecisionQuestionInputPartArray
|
|
868
|
+
}
|
|
869
|
+
)
|
|
870
|
+
|
|
871
|
+
# @!method self.variants
|
|
872
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
873
|
+
|
|
874
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
875
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
876
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
877
|
+
]
|
|
878
|
+
end
|
|
152
879
|
end
|
|
153
880
|
|
|
154
881
|
class Choice < OpenAI::Internal::Type::BaseModel
|
|
@@ -163,8 +890,8 @@ module OpenAI
|
|
|
163
890
|
|
|
164
891
|
# @!attribute instructions
|
|
165
892
|
#
|
|
166
|
-
# @return [String]
|
|
167
|
-
required :instructions,
|
|
893
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
894
|
+
required :instructions, union: -> { OpenAI::DecisionCreateParams::Question::Choice::Instructions }
|
|
168
895
|
|
|
169
896
|
# @!attribute type
|
|
170
897
|
# The type of the object. Always `choice`.
|
|
@@ -183,7 +910,7 @@ module OpenAI
|
|
|
183
910
|
# @param choices [Array<OpenAI::Models::DecisionCreateParams::Question::Choice::Choice>]
|
|
184
911
|
# Provide between 2 and 255 choices. Each choice must be unique.
|
|
185
912
|
#
|
|
186
|
-
# @param instructions [String]
|
|
913
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
187
914
|
#
|
|
188
915
|
# @param name [String]
|
|
189
916
|
#
|
|
@@ -221,13 +948,34 @@ module OpenAI
|
|
|
221
948
|
# @return [Array(String, Boolean)]
|
|
222
949
|
end
|
|
223
950
|
end
|
|
951
|
+
|
|
952
|
+
# @see OpenAI::Models::DecisionCreateParams::Question::Choice#instructions
|
|
953
|
+
module Instructions
|
|
954
|
+
extend OpenAI::Internal::Type::Union
|
|
955
|
+
|
|
956
|
+
variant String
|
|
957
|
+
|
|
958
|
+
variant(
|
|
959
|
+
-> {
|
|
960
|
+
OpenAI::Models::DecisionCreateParams::Question::Choice::Instructions::DecisionQuestionInputPartArray
|
|
961
|
+
}
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
# @!method self.variants
|
|
965
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
966
|
+
|
|
967
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
968
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
969
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
970
|
+
]
|
|
971
|
+
end
|
|
224
972
|
end
|
|
225
973
|
|
|
226
974
|
class Score < OpenAI::Internal::Type::BaseModel
|
|
227
975
|
# @!attribute instructions
|
|
228
976
|
#
|
|
229
|
-
# @return [String]
|
|
230
|
-
required :instructions,
|
|
977
|
+
# @return [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
978
|
+
required :instructions, union: -> { OpenAI::DecisionCreateParams::Question::Score::Instructions }
|
|
231
979
|
|
|
232
980
|
# @!attribute levels
|
|
233
981
|
#
|
|
@@ -251,7 +999,7 @@ module OpenAI
|
|
|
251
999
|
# @!method initialize(instructions:, levels:, name: nil, type: :score)
|
|
252
1000
|
# Rate the input against the supplied ordered levels.
|
|
253
1001
|
#
|
|
254
|
-
# @param instructions [String]
|
|
1002
|
+
# @param instructions [String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>]
|
|
255
1003
|
#
|
|
256
1004
|
# @param levels [Array<OpenAI::Models::DecisionCreateParams::Question::Score::Level>]
|
|
257
1005
|
#
|
|
@@ -259,6 +1007,28 @@ module OpenAI
|
|
|
259
1007
|
#
|
|
260
1008
|
# @param type [Symbol, :score]
|
|
261
1009
|
# The type of the object. Always `score`.
|
|
1010
|
+
|
|
1011
|
+
# @see OpenAI::Models::DecisionCreateParams::Question::Score#instructions
|
|
1012
|
+
module Instructions
|
|
1013
|
+
extend OpenAI::Internal::Type::Union
|
|
1014
|
+
|
|
1015
|
+
variant String
|
|
1016
|
+
|
|
1017
|
+
variant(
|
|
1018
|
+
-> {
|
|
1019
|
+
OpenAI::Models::DecisionCreateParams::Question::Score::Instructions::DecisionQuestionInputPartArray
|
|
1020
|
+
}
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
# @!method self.variants
|
|
1024
|
+
# @return [Array(String, Array<OpenAI::Models::DecisionQuestionInputText, OpenAI::Models::DecisionQuestionInputImage, OpenAI::Models::DecisionInputJSON>)]
|
|
1025
|
+
|
|
1026
|
+
# @type [OpenAI::Internal::Type::Converter]
|
|
1027
|
+
DecisionQuestionInputPartArray = OpenAI::Internal::Type::ArrayOf[
|
|
1028
|
+
union: -> { OpenAI::DecisionQuestionInputPart }
|
|
1029
|
+
]
|
|
1030
|
+
end
|
|
1031
|
+
|
|
262
1032
|
class Level < OpenAI::Internal::Type::BaseModel
|
|
263
1033
|
# @!attribute label
|
|
264
1034
|
#
|