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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/decision_create_params.rb +798 -28
  5. data/lib/openai/models/decision_input_json.rb +45 -0
  6. data/lib/openai/models/decision_input_message.rb +304 -48
  7. data/lib/openai/models/decision_input_part.rb +4 -1
  8. data/lib/openai/models/decision_question_input_image.rb +54 -0
  9. data/lib/openai/models/decision_question_input_part.rb +23 -0
  10. data/lib/openai/models/decision_question_input_text.rb +21 -0
  11. data/lib/openai/models/live/decision_trigger.rb +82 -9
  12. data/lib/openai/models/live/decisions_delegation_config.rb +82 -9
  13. data/lib/openai/models/live/decisions_delegation_update_config.rb +82 -9
  14. data/lib/openai/models.rb +8 -0
  15. data/lib/openai/resources/decisions.rb +5 -6
  16. data/lib/openai/version.rb +1 -1
  17. data/lib/openai.rb +4 -0
  18. data/rbi/openai/models/decision_create_params.rbi +1273 -26
  19. data/rbi/openai/models/decision_input_json.rbi +75 -0
  20. data/rbi/openai/models/decision_input_message.rbi +455 -52
  21. data/rbi/openai/models/decision_input_part.rbi +2 -1
  22. data/rbi/openai/models/decision_question_input_image.rbi +82 -0
  23. data/rbi/openai/models/decision_question_input_part.rbi +25 -0
  24. data/rbi/openai/models/decision_question_input_text.rbi +49 -0
  25. data/rbi/openai/models/live/decision_trigger.rbi +72 -9
  26. data/rbi/openai/models/live/decisions_delegation_config.rbi +72 -9
  27. data/rbi/openai/models/live/decisions_delegation_update_config.rbi +72 -9
  28. data/rbi/openai/models.rbi +8 -0
  29. data/rbi/openai/resources/decisions.rbi +4 -5
  30. data/sig/openai/models/decision_create_params.rbs +610 -24
  31. data/sig/openai/models/decision_input_json.rbs +34 -0
  32. data/sig/openai/models/decision_input_message.rbs +264 -35
  33. data/sig/openai/models/decision_input_part.rbs +3 -1
  34. data/sig/openai/models/decision_question_input_image.rbs +51 -0
  35. data/sig/openai/models/decision_question_input_part.rbs +14 -0
  36. data/sig/openai/models/decision_question_input_text.rbs +15 -0
  37. data/sig/openai/models/live/decision_trigger.rbs +49 -12
  38. data/sig/openai/models/live/decisions_delegation_config.rbs +49 -12
  39. data/sig/openai/models/live/decisions_delegation_update_config.rbs +49 -12
  40. data/sig/openai/models.rbs +9 -1
  41. metadata +13 -1
@@ -16,16 +16,15 @@ module OpenAI
16
16
  extend OpenAI::Internal::Type::RequestParameters::Converter
17
17
  include OpenAI::Internal::Type::RequestParameters
18
18
 
19
- # The text or images to evaluate for every question. Provide a text string or user
20
- # messages containing text and images. Images can be base64 data URLs or publicly
21
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
22
- # one request. Files, audio, tools, and item references are not supported.
19
+ # The input to evaluate for every question. Provide a text string or an ordered
20
+ # array of messages, function calls and outputs, or custom tool calls and outputs.
21
+ # Each tool output must identify a matching call by call ID.
23
22
  attr_accessor input: OpenAI::Models::DecisionCreateParams::input
24
23
 
25
24
  # The model to use. Only `gpt-6-luna` is supported.
26
25
  attr_accessor model: String
27
26
 
28
- # Ask 1–200 questions about the input. Each question can be a predicate, choice,
27
+ # Ask 1–400 questions about the input. Each question can be a predicate, choice,
29
28
  # or score. Answers come back in the same order.
30
29
  attr_accessor questions: ::Array[OpenAI::Models::DecisionCreateParams::question]
31
30
 
@@ -49,14 +48,13 @@ module OpenAI
49
48
  attr_accessor safety_identifier: String?
50
49
 
51
50
  # @param input
52
- # The text or images to evaluate for every question. Provide a text string or user
53
- # messages containing text and images. Images can be base64 data URLs or publicly
54
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
55
- # one request. Files, audio, tools, and item references are not supported.
51
+ # The input to evaluate for every question. Provide a text string or an ordered
52
+ # array of messages, function calls and outputs, or custom tool calls and outputs.
53
+ # Each tool output must identify a matching call by call ID.
56
54
  # @param model
57
55
  # The model to use. Only `gpt-6-luna` is supported.
58
56
  # @param questions
59
- # Ask 1–200 questions about the input. Each question can be a predicate, choice,
57
+ # Ask 1–400 questions about the input. Each question can be a predicate, choice,
60
58
  # or score. Answers come back in the same order.
61
59
  # @param prompt_cache_key
62
60
  # Partition prompt cache reuse by caller-provided key.
@@ -95,14 +93,565 @@ module OpenAI
95
93
  ?request_options: OpenAI::RequestOptions
96
94
  }
97
95
 
98
- type input = String | ::Array[OpenAI::DecisionInputMessage]
96
+ type input =
97
+ String
98
+ | ::Array[OpenAI::Models::DecisionCreateParams::Input::union_member1]
99
99
 
100
100
  module Input
101
101
  extend OpenAI::Internal::Type::Union
102
102
 
103
+ type union_member1 =
104
+ OpenAI::Models::decision_input_message
105
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage
106
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage
107
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage
108
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall
109
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput
110
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall
111
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput
112
+
113
+ module UnionMember1
114
+ extend OpenAI::Internal::Type::Union
115
+
116
+ type decision_input_user_message =
117
+ {
118
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::content,
119
+ ?role: :user,
120
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::type_
121
+ }
122
+
123
+ class DecisionInputUserMessage < OpenAI::Internal::Type::BaseModel
124
+ # A text string or an ordered list of text, image, and JSON parts.
125
+ attr_accessor content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::content
126
+
127
+ attr_accessor role: :user
128
+
129
+ attr_reader type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::type_?
130
+
131
+ def type=: (
132
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::type_
133
+ ) -> OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::type_
134
+
135
+ # @param content
136
+ # A text string or an ordered list of text, image, and JSON parts.
137
+ def initialize: (
138
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::content,
139
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::type_,
140
+ ?role: :user
141
+ ) -> void
142
+
143
+ def to_hash: -> {
144
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::content,
145
+ ?role: :user,
146
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::type_
147
+ }
148
+
149
+ type content = String | ::Array[OpenAI::Models::decision_input_part]
150
+
151
+ module Content
152
+ extend OpenAI::Internal::Type::Union
153
+
154
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::content]
155
+
156
+ DecisionInputPartArray: OpenAI::Internal::Type::Converter
157
+ end
158
+
159
+ type type_ = :message
160
+
161
+ module Type
162
+ extend OpenAI::Internal::Type::Enum
163
+
164
+ MESSAGE: :message
165
+
166
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::type_]
167
+ end
168
+ end
169
+
170
+ type decision_input_developer_message =
171
+ {
172
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::content,
173
+ ?role: :developer,
174
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::type_
175
+ }
176
+
177
+ class DecisionInputDeveloperMessage < OpenAI::Internal::Type::BaseModel
178
+ # A text string or an ordered list of input text parts.
179
+ attr_accessor content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::content
180
+
181
+ attr_accessor role: :developer
182
+
183
+ attr_reader type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::type_?
184
+
185
+ def type=: (
186
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::type_
187
+ ) -> OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::type_
188
+
189
+ # @param content
190
+ # A text string or an ordered list of input text parts.
191
+ def initialize: (
192
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::content,
193
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::type_,
194
+ ?role: :developer
195
+ ) -> void
196
+
197
+ def to_hash: -> {
198
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::content,
199
+ ?role: :developer,
200
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::type_
201
+ }
202
+
203
+ type content = String | ::Array[OpenAI::DecisionInputText]
204
+
205
+ module Content
206
+ extend OpenAI::Internal::Type::Union
207
+
208
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::content]
209
+
210
+ DecisionInputTextArray: OpenAI::Internal::Type::Converter
211
+ end
212
+
213
+ type type_ = :message
214
+
215
+ module Type
216
+ extend OpenAI::Internal::Type::Enum
217
+
218
+ MESSAGE: :message
219
+
220
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::type_]
221
+ end
222
+ end
223
+
224
+ type decision_input_system_message =
225
+ {
226
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::content,
227
+ ?role: :system,
228
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::type_
229
+ }
230
+
231
+ class DecisionInputSystemMessage < OpenAI::Internal::Type::BaseModel
232
+ # A text string or an ordered list of input text parts.
233
+ attr_accessor content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::content
234
+
235
+ attr_accessor role: :system
236
+
237
+ attr_reader type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::type_?
238
+
239
+ def type=: (
240
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::type_
241
+ ) -> OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::type_
242
+
243
+ # @param content
244
+ # A text string or an ordered list of input text parts.
245
+ def initialize: (
246
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::content,
247
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::type_,
248
+ ?role: :system
249
+ ) -> void
250
+
251
+ def to_hash: -> {
252
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::content,
253
+ ?role: :system,
254
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::type_
255
+ }
256
+
257
+ type content = String | ::Array[OpenAI::DecisionInputText]
258
+
259
+ module Content
260
+ extend OpenAI::Internal::Type::Union
261
+
262
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::content]
263
+
264
+ DecisionInputTextArray: OpenAI::Internal::Type::Converter
265
+ end
266
+
267
+ type type_ = :message
268
+
269
+ module Type
270
+ extend OpenAI::Internal::Type::Enum
271
+
272
+ MESSAGE: :message
273
+
274
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::type_]
275
+ end
276
+ end
277
+
278
+ type decision_input_assistant_message =
279
+ {
280
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::content,
281
+ ?role: :assistant,
282
+ ?phase: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::phase?,
283
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::type_
284
+ }
285
+
286
+ class DecisionInputAssistantMessage < OpenAI::Internal::Type::BaseModel
287
+ # A text string or an ordered list of output text and refusal parts.
288
+ attr_accessor content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::content
289
+
290
+ attr_accessor role: :assistant
291
+
292
+ # The phase of an assistant message.
293
+ attr_accessor phase: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::phase?
294
+
295
+ attr_reader type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::type_?
296
+
297
+ def type=: (
298
+ OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::type_
299
+ ) -> OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::type_
300
+
301
+ # @param content
302
+ # A text string or an ordered list of output text and refusal parts.
303
+ # @param phase
304
+ # The phase of an assistant message.
305
+ def initialize: (
306
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::content,
307
+ ?phase: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::phase?,
308
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::type_,
309
+ ?role: :assistant
310
+ ) -> void
311
+
312
+ def to_hash: -> {
313
+ content: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::content,
314
+ ?role: :assistant,
315
+ ?phase: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::phase?,
316
+ ?type: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::type_
317
+ }
318
+
319
+ type content =
320
+ String
321
+ | ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::part]
322
+
323
+ module Content
324
+ extend OpenAI::Internal::Type::Union
325
+
326
+ type part =
327
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText
328
+ | OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal
329
+
330
+ module Part
331
+ extend OpenAI::Internal::Type::Union
332
+
333
+ type output_text = { text: String, ?type: :output_text }
334
+
335
+ class OutputText < OpenAI::Internal::Type::BaseModel
336
+ attr_accessor text: String
337
+
338
+ attr_accessor type: :output_text
339
+
340
+ def initialize: (text: String, ?type: :output_text) -> void
341
+
342
+ def to_hash: -> { text: String, ?type: :output_text }
343
+ end
344
+
345
+ type refusal = { refusal: String, ?type: :refusal }
346
+
347
+ class Refusal < OpenAI::Internal::Type::BaseModel
348
+ attr_accessor refusal: String
349
+
350
+ attr_accessor type: :refusal
351
+
352
+ def initialize: (refusal: String, ?type: :refusal) -> void
353
+
354
+ def to_hash: -> { refusal: String, ?type: :refusal }
355
+ end
356
+
357
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::part]
358
+ end
359
+
360
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::content]
361
+
362
+ PartsArray: OpenAI::Internal::Type::Converter
363
+ end
364
+
365
+ type phase = :commentary | :final_answer
366
+
367
+ module Phase
368
+ extend OpenAI::Internal::Type::Enum
369
+
370
+ COMMENTARY: :commentary
371
+ FINAL_ANSWER: :final_answer
372
+
373
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::phase]
374
+ end
375
+
376
+ type type_ = :message
377
+
378
+ module Type
379
+ extend OpenAI::Internal::Type::Enum
380
+
381
+ MESSAGE: :message
382
+
383
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::type_]
384
+ end
385
+ end
386
+
387
+ type function_call =
388
+ {
389
+ arguments: String,
390
+ call_id: String,
391
+ name: String,
392
+ ?type: :function_call,
393
+ ?id: String?,
394
+ ?namespace: String?,
395
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::status?
396
+ }
397
+
398
+ class FunctionCall < OpenAI::Internal::Type::BaseModel
399
+ attr_accessor arguments: String
400
+
401
+ attr_accessor call_id: String
402
+
403
+ attr_accessor name: String
404
+
405
+ attr_accessor type: :function_call
406
+
407
+ attr_accessor id: String?
408
+
409
+ attr_accessor namespace: String?
410
+
411
+ attr_accessor status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::status?
412
+
413
+ def initialize: (
414
+ arguments: String,
415
+ call_id: String,
416
+ name: String,
417
+ ?id: String?,
418
+ ?namespace: String?,
419
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::status?,
420
+ ?type: :function_call
421
+ ) -> void
422
+
423
+ def to_hash: -> {
424
+ arguments: String,
425
+ call_id: String,
426
+ name: String,
427
+ ?type: :function_call,
428
+ ?id: String?,
429
+ ?namespace: String?,
430
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::status?
431
+ }
432
+
433
+ type status = :in_progress | :completed | :incomplete
434
+
435
+ module Status
436
+ extend OpenAI::Internal::Type::Enum
437
+
438
+ IN_PROGRESS: :in_progress
439
+ COMPLETED: :completed
440
+ INCOMPLETE: :incomplete
441
+
442
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCall::status]
443
+ end
444
+ end
445
+
446
+ type function_call_output =
447
+ {
448
+ call_id: String,
449
+ output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::output,
450
+ ?type: :function_call_output,
451
+ ?id: String?,
452
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::status?
453
+ }
454
+
455
+ class FunctionCallOutput < OpenAI::Internal::Type::BaseModel
456
+ attr_accessor call_id: String
457
+
458
+ # Text evidence or an ordered list of text and image parts.
459
+ attr_accessor output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::output
460
+
461
+ attr_accessor type: :function_call_output
462
+
463
+ attr_accessor id: String?
464
+
465
+ attr_accessor status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::status?
466
+
467
+ # @param output
468
+ # Text evidence or an ordered list of text and image parts.
469
+ def initialize: (
470
+ call_id: String,
471
+ output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::output,
472
+ ?id: String?,
473
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::status?,
474
+ ?type: :function_call_output
475
+ ) -> void
476
+
477
+ def to_hash: -> {
478
+ call_id: String,
479
+ output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::output,
480
+ ?type: :function_call_output,
481
+ ?id: String?,
482
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::status?
483
+ }
484
+
485
+ type output =
486
+ String
487
+ | ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::part]
488
+
489
+ module Output
490
+ extend OpenAI::Internal::Type::Union
491
+
492
+ type part = OpenAI::DecisionInputText | OpenAI::DecisionInputImage
493
+
494
+ module Part
495
+ extend OpenAI::Internal::Type::Union
496
+
497
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::part]
498
+ end
499
+
500
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::output]
501
+
502
+ PartsArray: OpenAI::Internal::Type::Converter
503
+ end
504
+
505
+ type status = :in_progress | :completed | :incomplete
506
+
507
+ module Status
508
+ extend OpenAI::Internal::Type::Enum
509
+
510
+ IN_PROGRESS: :in_progress
511
+ COMPLETED: :completed
512
+ INCOMPLETE: :incomplete
513
+
514
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::status]
515
+ end
516
+ end
517
+
518
+ type custom_tool_call =
519
+ {
520
+ call_id: String,
521
+ input: String,
522
+ name: String,
523
+ ?type: :custom_tool_call,
524
+ ?id: String?,
525
+ ?namespace: String?,
526
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::status?
527
+ }
528
+
529
+ class CustomToolCall < OpenAI::Internal::Type::BaseModel
530
+ attr_accessor call_id: String
531
+
532
+ attr_accessor input: String
533
+
534
+ attr_accessor name: String
535
+
536
+ attr_accessor type: :custom_tool_call
537
+
538
+ attr_accessor id: String?
539
+
540
+ attr_accessor namespace: String?
541
+
542
+ attr_accessor status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::status?
543
+
544
+ def initialize: (
545
+ call_id: String,
546
+ input: String,
547
+ name: String,
548
+ ?id: String?,
549
+ ?namespace: String?,
550
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::status?,
551
+ ?type: :custom_tool_call
552
+ ) -> void
553
+
554
+ def to_hash: -> {
555
+ call_id: String,
556
+ input: String,
557
+ name: String,
558
+ ?type: :custom_tool_call,
559
+ ?id: String?,
560
+ ?namespace: String?,
561
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::status?
562
+ }
563
+
564
+ type status = :in_progress | :completed | :incomplete
565
+
566
+ module Status
567
+ extend OpenAI::Internal::Type::Enum
568
+
569
+ IN_PROGRESS: :in_progress
570
+ COMPLETED: :completed
571
+ INCOMPLETE: :incomplete
572
+
573
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCall::status]
574
+ end
575
+ end
576
+
577
+ type custom_tool_call_output =
578
+ {
579
+ call_id: String,
580
+ output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::output,
581
+ ?type: :custom_tool_call_output,
582
+ ?id: String?,
583
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::status?
584
+ }
585
+
586
+ class CustomToolCallOutput < OpenAI::Internal::Type::BaseModel
587
+ attr_accessor call_id: String
588
+
589
+ # Text evidence or an ordered list of text and image parts.
590
+ attr_accessor output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::output
591
+
592
+ attr_accessor type: :custom_tool_call_output
593
+
594
+ attr_accessor id: String?
595
+
596
+ attr_accessor status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::status?
597
+
598
+ # @param output
599
+ # Text evidence or an ordered list of text and image parts.
600
+ def initialize: (
601
+ call_id: String,
602
+ output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::output,
603
+ ?id: String?,
604
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::status?,
605
+ ?type: :custom_tool_call_output
606
+ ) -> void
607
+
608
+ def to_hash: -> {
609
+ call_id: String,
610
+ output: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::output,
611
+ ?type: :custom_tool_call_output,
612
+ ?id: String?,
613
+ ?status: OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::status?
614
+ }
615
+
616
+ type output =
617
+ String
618
+ | ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::part]
619
+
620
+ module Output
621
+ extend OpenAI::Internal::Type::Union
622
+
623
+ type part = OpenAI::DecisionInputText | OpenAI::DecisionInputImage
624
+
625
+ module Part
626
+ extend OpenAI::Internal::Type::Union
627
+
628
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::part]
629
+ end
630
+
631
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::output]
632
+
633
+ PartsArray: OpenAI::Internal::Type::Converter
634
+ end
635
+
636
+ type status = :in_progress | :completed | :incomplete
637
+
638
+ module Status
639
+ extend OpenAI::Internal::Type::Enum
640
+
641
+ IN_PROGRESS: :in_progress
642
+ COMPLETED: :completed
643
+ INCOMPLETE: :incomplete
644
+
645
+ def self?.values: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::status]
646
+ end
647
+ end
648
+
649
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Input::union_member1]
650
+ end
651
+
103
652
  def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::input]
104
653
 
105
- DecisionInputMessageArray: OpenAI::Internal::Type::Converter
654
+ UnionMember1Array: OpenAI::Internal::Type::Converter
106
655
  end
107
656
 
108
657
  type question =
@@ -114,10 +663,14 @@ module OpenAI
114
663
  extend OpenAI::Internal::Type::Union
115
664
 
116
665
  type predicate =
117
- { instructions: String, ?type: :predicate, ?name: String }
666
+ {
667
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Predicate::instructions,
668
+ ?type: :predicate,
669
+ ?name: String
670
+ }
118
671
 
119
672
  class Predicate < OpenAI::Internal::Type::BaseModel
120
- attr_accessor instructions: String
673
+ attr_accessor instructions: OpenAI::Models::DecisionCreateParams::Question::Predicate::instructions
121
674
 
122
675
  # The type of the object. Always `predicate`.
123
676
  attr_accessor type: :predicate
@@ -129,22 +682,33 @@ module OpenAI
129
682
  # @param type
130
683
  # The type of the object. Always `predicate`.
131
684
  def initialize: (
132
- instructions: String,
685
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Predicate::instructions,
133
686
  ?name: String,
134
687
  ?type: :predicate
135
688
  ) -> void
136
689
 
137
690
  def to_hash: -> {
138
- instructions: String,
691
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Predicate::instructions,
139
692
  ?type: :predicate,
140
693
  ?name: String
141
694
  }
695
+
696
+ type instructions =
697
+ String | ::Array[OpenAI::Models::decision_question_input_part]
698
+
699
+ module Instructions
700
+ extend OpenAI::Internal::Type::Union
701
+
702
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Question::Predicate::instructions]
703
+
704
+ DecisionQuestionInputPartArray: OpenAI::Internal::Type::Converter
705
+ end
142
706
  end
143
707
 
144
708
  type choice =
145
709
  {
146
710
  choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
147
- instructions: String,
711
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions,
148
712
  ?type: :choice,
149
713
  ?name: String
150
714
  }
@@ -153,7 +717,7 @@ module OpenAI
153
717
  # Provide between 2 and 255 choices. Each choice must be unique.
154
718
  attr_accessor choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice]
155
719
 
156
- attr_accessor instructions: String
720
+ attr_accessor instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions
157
721
 
158
722
  # The type of the object. Always `choice`.
159
723
  attr_accessor type: :choice
@@ -168,14 +732,14 @@ module OpenAI
168
732
  # The type of the object. Always `choice`.
169
733
  def initialize: (
170
734
  choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
171
- instructions: String,
735
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions,
172
736
  ?name: String,
173
737
  ?type: :choice
174
738
  ) -> void
175
739
 
176
740
  def to_hash: -> {
177
741
  choices: ::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
178
- instructions: String,
742
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Choice::instructions,
179
743
  ?type: :choice,
180
744
  ?name: String
181
745
  }
@@ -214,18 +778,29 @@ module OpenAI
214
778
  def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Question::Choice::Choice::value]
215
779
  end
216
780
  end
781
+
782
+ type instructions =
783
+ String | ::Array[OpenAI::Models::decision_question_input_part]
784
+
785
+ module Instructions
786
+ extend OpenAI::Internal::Type::Union
787
+
788
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Question::Choice::instructions]
789
+
790
+ DecisionQuestionInputPartArray: OpenAI::Internal::Type::Converter
791
+ end
217
792
  end
218
793
 
219
794
  type score =
220
795
  {
221
- instructions: String,
796
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Score::instructions,
222
797
  levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level],
223
798
  ?type: :score,
224
799
  ?name: String
225
800
  }
226
801
 
227
802
  class Score < OpenAI::Internal::Type::BaseModel
228
- attr_accessor instructions: String
803
+ attr_accessor instructions: OpenAI::Models::DecisionCreateParams::Question::Score::instructions
229
804
 
230
805
  attr_accessor levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level]
231
806
 
@@ -239,19 +814,30 @@ module OpenAI
239
814
  # @param type
240
815
  # The type of the object. Always `score`.
241
816
  def initialize: (
242
- instructions: String,
817
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Score::instructions,
243
818
  levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level],
244
819
  ?name: String,
245
820
  ?type: :score
246
821
  ) -> void
247
822
 
248
823
  def to_hash: -> {
249
- instructions: String,
824
+ instructions: OpenAI::Models::DecisionCreateParams::Question::Score::instructions,
250
825
  levels: ::Array[OpenAI::DecisionCreateParams::Question::Score::Level],
251
826
  ?type: :score,
252
827
  ?name: String
253
828
  }
254
829
 
830
+ type instructions =
831
+ String | ::Array[OpenAI::Models::decision_question_input_part]
832
+
833
+ module Instructions
834
+ extend OpenAI::Internal::Type::Union
835
+
836
+ def self?.variants: -> ::Array[OpenAI::Models::DecisionCreateParams::Question::Score::instructions]
837
+
838
+ DecisionQuestionInputPartArray: OpenAI::Internal::Type::Converter
839
+ end
840
+
255
841
  type level = { label: String, ?description: String }
256
842
 
257
843
  class Level < OpenAI::Internal::Type::BaseModel