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
@@ -15,10 +15,9 @@ module OpenAI
15
15
  )
16
16
  end
17
17
 
18
- # The text or images to evaluate for every question. Provide a text string or user
19
- # messages containing text and images. Images can be base64 data URLs or publicly
20
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
21
- # one request. Files, audio, tools, and item references are not supported.
18
+ # The input to evaluate for every question. Provide a text string or an ordered
19
+ # array of messages, function calls and outputs, or custom tool calls and outputs.
20
+ # Each tool output must identify a matching call by call ID.
22
21
  sig { returns(OpenAI::DecisionCreateParams::Input::Variants) }
23
22
  attr_accessor :input
24
23
 
@@ -26,7 +25,7 @@ module OpenAI
26
25
  sig { returns(String) }
27
26
  attr_accessor :model
28
27
 
29
- # Ask 1–200 questions about the input. Each question can be a predicate, choice,
28
+ # Ask 1–400 questions about the input. Each question can be a predicate, choice,
30
29
  # or score. Answers come back in the same order.
31
30
  sig {
32
31
  returns(
@@ -89,16 +88,15 @@ module OpenAI
89
88
  end
90
89
  def self.new(
91
90
 
92
- # The text or images to evaluate for every question. Provide a text string or user
93
- # messages containing text and images. Images can be base64 data URLs or publicly
94
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
95
- # 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.
96
94
  input:,
97
95
 
98
96
  # The model to use. Only `gpt-6-luna` is supported.
99
97
  model:,
100
98
 
101
- # Ask 1–200 questions about the input. Each question can be a predicate, choice,
99
+ # Ask 1–400 questions about the input. Each question can be a predicate, choice,
102
100
  # or score. Answers come back in the same order.
103
101
  questions:,
104
102
 
@@ -146,21 +144,1217 @@ module OpenAI
146
144
  def to_hash
147
145
  end
148
146
 
149
- # The text or images to evaluate for every question. Provide a text string or user
150
- # messages containing text and images. Images can be base64 data URLs or publicly
151
- # accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
152
- # one request. Files, audio, tools, and item references are not supported.
147
+ # The input to evaluate for every question. Provide a text string or an ordered
148
+ # array of messages, function calls and outputs, or custom tool calls and outputs.
149
+ # Each tool output must identify a matching call by call ID.
153
150
  module Input
154
151
  extend OpenAI::Internal::Type::Union
155
152
 
156
- Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionInputMessage]) }
153
+ Variants = T.type_alias {
154
+ T.any(String, T::Array[OpenAI::DecisionCreateParams::Input::UnionMember1::Variants])
155
+ }
156
+
157
+ # A user message containing input text, images, or JSON.
158
+ module UnionMember1
159
+ extend OpenAI::Internal::Type::Union
160
+
161
+ Variants = T.type_alias {
162
+ T.any(
163
+ OpenAI::DecisionInputMessage::Variants,
164
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage,
165
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage,
166
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage,
167
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall,
168
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput,
169
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall,
170
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput
171
+ )
172
+ }
173
+
174
+ class DecisionInputUserMessage < OpenAI::Internal::Type::BaseModel
175
+ OrHash = T.type_alias do
176
+ T.any(
177
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage,
178
+ OpenAI::Internal::AnyHash
179
+ )
180
+ end
181
+
182
+ # A text string or an ordered list of text, image, and JSON parts.
183
+ sig {
184
+ returns(OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content::Variants)
185
+ }
186
+ attr_accessor :content
187
+
188
+ sig { returns(Symbol) }
189
+ attr_accessor :role
190
+
191
+ sig {
192
+ returns(
193
+ T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type::OrSymbol)
194
+ )
195
+ }
196
+ attr_reader :type
197
+
198
+ sig {
199
+ params(type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type::OrSymbol)
200
+ .void
201
+ }
202
+ attr_writer :type
203
+
204
+ # A user message containing input text, images, or JSON.
205
+ sig do
206
+ params(
207
+
208
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content::Variants,
209
+
210
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type::OrSymbol,
211
+
212
+ role: Symbol
213
+ )
214
+ .returns(T.attached_class)
215
+ end
216
+ def self.new(
217
+
218
+ # A text string or an ordered list of text, image, and JSON parts.
219
+ content:,
220
+
221
+ type: nil,
222
+
223
+ role: :user
224
+ )
225
+ end
226
+
227
+ sig do
228
+ override.returns(
229
+ {
230
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content::Variants,
231
+ role: Symbol,
232
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type::OrSymbol
233
+ }
234
+ )
235
+ end
236
+ def to_hash
237
+ end
238
+
239
+ # A text string or an ordered list of text, image, and JSON parts.
240
+ module Content
241
+ extend OpenAI::Internal::Type::Union
242
+
243
+ Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionInputPart::Variants]) }
244
+
245
+ sig {
246
+ override.returns(
247
+ T::Array[
248
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Content::Variants
249
+ ]
250
+ )
251
+ }
252
+ def self.variants
253
+ end
254
+
255
+ DecisionInputPartArray = T.let(
256
+ OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionInputPart],
257
+ OpenAI::Internal::Type::Converter
258
+ )
259
+
260
+ end
261
+
262
+ module Type
263
+ extend OpenAI::Internal::Type::Enum
264
+
265
+ TaggedSymbol = T.type_alias {
266
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type)
267
+ }
268
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
269
+
270
+ MESSAGE = T.let(
271
+ :message,
272
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type::TaggedSymbol
273
+ )
274
+
275
+ sig {
276
+ override.returns(
277
+ T::Array[
278
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputUserMessage::Type::TaggedSymbol
279
+ ]
280
+ )
281
+ }
282
+ def self.values
283
+ end
284
+ end
285
+ end
286
+
287
+ class DecisionInputDeveloperMessage < OpenAI::Internal::Type::BaseModel
288
+ OrHash = T.type_alias do
289
+ T.any(
290
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage,
291
+ OpenAI::Internal::AnyHash
292
+ )
293
+ end
294
+
295
+ # A text string or an ordered list of input text parts.
296
+ sig {
297
+ returns(
298
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content::Variants
299
+ )
300
+ }
301
+ attr_accessor :content
302
+
303
+ sig { returns(Symbol) }
304
+ attr_accessor :role
305
+
306
+ sig {
307
+ returns(
308
+ T.nilable(
309
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type::OrSymbol
310
+ )
311
+ )
312
+ }
313
+ attr_reader :type
314
+
315
+ sig {
316
+ params(
317
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type::OrSymbol
318
+ )
319
+ .void
320
+ }
321
+ attr_writer :type
322
+
323
+ # A developer message containing input text.
324
+ sig do
325
+ params(
326
+
327
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content::Variants,
328
+
329
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type::OrSymbol,
330
+
331
+ role: Symbol
332
+ )
333
+ .returns(T.attached_class)
334
+ end
335
+ def self.new(
336
+
337
+ # A text string or an ordered list of input text parts.
338
+ content:,
339
+
340
+ type: nil,
341
+
342
+ role: :developer
343
+ )
344
+ end
345
+
346
+ sig do
347
+ override.returns(
348
+ {
349
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content::Variants,
350
+ role: Symbol,
351
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type::OrSymbol
352
+ }
353
+ )
354
+ end
355
+ def to_hash
356
+ end
357
+
358
+ # A text string or an ordered list of input text parts.
359
+ module Content
360
+ extend OpenAI::Internal::Type::Union
361
+
362
+ Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionInputText]) }
363
+
364
+ sig {
365
+ override.returns(
366
+ T::Array[
367
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Content::Variants
368
+ ]
369
+ )
370
+ }
371
+ def self.variants
372
+ end
373
+
374
+ DecisionInputTextArray = T.let(
375
+ OpenAI::Internal::Type::ArrayOf[OpenAI::DecisionInputText],
376
+ OpenAI::Internal::Type::Converter
377
+ )
378
+
379
+ end
380
+
381
+ module Type
382
+ extend OpenAI::Internal::Type::Enum
383
+
384
+ TaggedSymbol = T.type_alias {
385
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type)
386
+ }
387
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
388
+
389
+ MESSAGE = T.let(
390
+ :message,
391
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type::TaggedSymbol
392
+ )
393
+
394
+ sig {
395
+ override.returns(
396
+ T::Array[
397
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputDeveloperMessage::Type::TaggedSymbol
398
+ ]
399
+ )
400
+ }
401
+ def self.values
402
+ end
403
+ end
404
+ end
405
+
406
+ class DecisionInputSystemMessage < OpenAI::Internal::Type::BaseModel
407
+ OrHash = T.type_alias do
408
+ T.any(
409
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage,
410
+ OpenAI::Internal::AnyHash
411
+ )
412
+ end
413
+
414
+ # A text string or an ordered list of input text parts.
415
+ sig {
416
+ returns(OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content::Variants)
417
+ }
418
+ attr_accessor :content
419
+
420
+ sig { returns(Symbol) }
421
+ attr_accessor :role
422
+
423
+ sig {
424
+ returns(
425
+ T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type::OrSymbol)
426
+ )
427
+ }
428
+ attr_reader :type
429
+
430
+ sig {
431
+ params(
432
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type::OrSymbol
433
+ )
434
+ .void
435
+ }
436
+ attr_writer :type
437
+
438
+ # A system message containing input text.
439
+ sig do
440
+ params(
441
+
442
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content::Variants,
443
+
444
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type::OrSymbol,
445
+
446
+ role: Symbol
447
+ )
448
+ .returns(T.attached_class)
449
+ end
450
+ def self.new(
451
+
452
+ # A text string or an ordered list of input text parts.
453
+ content:,
454
+
455
+ type: nil,
456
+
457
+ role: :system
458
+ )
459
+ end
460
+
461
+ sig do
462
+ override.returns(
463
+ {
464
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content::Variants,
465
+ role: Symbol,
466
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type::OrSymbol
467
+ }
468
+ )
469
+ end
470
+ def to_hash
471
+ end
472
+
473
+ # A text string or an ordered list of input text parts.
474
+ module Content
475
+ extend OpenAI::Internal::Type::Union
476
+
477
+ Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionInputText]) }
478
+
479
+ sig {
480
+ override.returns(
481
+ T::Array[
482
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Content::Variants
483
+ ]
484
+ )
485
+ }
486
+ def self.variants
487
+ end
488
+
489
+ DecisionInputTextArray = T.let(
490
+ OpenAI::Internal::Type::ArrayOf[OpenAI::DecisionInputText],
491
+ OpenAI::Internal::Type::Converter
492
+ )
493
+
494
+ end
495
+
496
+ module Type
497
+ extend OpenAI::Internal::Type::Enum
498
+
499
+ TaggedSymbol = T.type_alias {
500
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type)
501
+ }
502
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
503
+
504
+ MESSAGE = T.let(
505
+ :message,
506
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type::TaggedSymbol
507
+ )
508
+
509
+ sig {
510
+ override.returns(
511
+ T::Array[
512
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputSystemMessage::Type::TaggedSymbol
513
+ ]
514
+ )
515
+ }
516
+ def self.values
517
+ end
518
+ end
519
+ end
520
+
521
+ class DecisionInputAssistantMessage < OpenAI::Internal::Type::BaseModel
522
+ OrHash = T.type_alias do
523
+ T.any(
524
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage,
525
+ OpenAI::Internal::AnyHash
526
+ )
527
+ end
528
+
529
+ # A text string or an ordered list of output text and refusal parts.
530
+ sig {
531
+ returns(
532
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Variants
533
+ )
534
+ }
535
+ attr_accessor :content
536
+
537
+ sig { returns(Symbol) }
538
+ attr_accessor :role
539
+
540
+ # The phase of an assistant message.
541
+ sig {
542
+ returns(
543
+ T.nilable(
544
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase::OrSymbol
545
+ )
546
+ )
547
+ }
548
+ attr_accessor :phase
549
+
550
+ sig {
551
+ returns(
552
+ T.nilable(
553
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type::OrSymbol
554
+ )
555
+ )
556
+ }
557
+ attr_reader :type
558
+
559
+ sig {
560
+ params(
561
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type::OrSymbol
562
+ )
563
+ .void
564
+ }
565
+ attr_writer :type
566
+
567
+ # An assistant message containing output text or refusals.
568
+ sig do
569
+ params(
570
+
571
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Variants,
572
+
573
+ phase: T.nilable(
574
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase::OrSymbol
575
+ ),
576
+
577
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type::OrSymbol,
578
+
579
+ role: Symbol
580
+ )
581
+ .returns(T.attached_class)
582
+ end
583
+ def self.new(
584
+
585
+ # A text string or an ordered list of output text and refusal parts.
586
+ content:,
587
+
588
+ # The phase of an assistant message.
589
+ phase: nil,
590
+
591
+ type: nil,
592
+
593
+ role: :assistant
594
+ )
595
+ end
596
+
597
+ sig do
598
+ override.returns(
599
+ {
600
+ content: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Variants,
601
+ role: Symbol,
602
+ phase: T.nilable(
603
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase::OrSymbol
604
+ ),
605
+ type: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type::OrSymbol
606
+ }
607
+ )
608
+ end
609
+ def to_hash
610
+ end
611
+
612
+ # A text string or an ordered list of output text and refusal parts.
613
+ module Content
614
+ extend OpenAI::Internal::Type::Union
615
+
616
+ Variants = T.type_alias {
617
+ T.any(
618
+ String,
619
+ T::Array[
620
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Variants
621
+ ]
622
+ )
623
+ }
624
+
625
+ module Part
626
+ extend OpenAI::Internal::Type::Union
627
+
628
+ Variants = T.type_alias {
629
+ T.any(
630
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText,
631
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal
632
+ )
633
+ }
634
+
635
+ class OutputText < OpenAI::Internal::Type::BaseModel
636
+ OrHash = T.type_alias do
637
+ T.any(
638
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::OutputText,
639
+ OpenAI::Internal::AnyHash
640
+ )
641
+ end
642
+
643
+ sig { returns(String) }
644
+ attr_accessor :text
645
+
646
+ sig { returns(Symbol) }
647
+ attr_accessor :type
648
+
649
+ sig do
650
+ params(
651
+
652
+ text: String,
653
+
654
+ type: Symbol
655
+ )
656
+ .returns(T.attached_class)
657
+ end
658
+ def self.new(
659
+
660
+ text:,
661
+
662
+ type: :output_text
663
+ )
664
+ end
665
+
666
+ sig do
667
+ override.returns(
668
+ {text: String, type: Symbol}
669
+ )
670
+ end
671
+ def to_hash
672
+ end
673
+
674
+ end
675
+
676
+ class Refusal < OpenAI::Internal::Type::BaseModel
677
+ OrHash = T.type_alias do
678
+ T.any(
679
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Refusal,
680
+ OpenAI::Internal::AnyHash
681
+ )
682
+ end
683
+
684
+ sig { returns(String) }
685
+ attr_accessor :refusal
686
+
687
+ sig { returns(Symbol) }
688
+ attr_accessor :type
689
+
690
+ sig do
691
+ params(
692
+
693
+ refusal: String,
694
+
695
+ type: Symbol
696
+ )
697
+ .returns(T.attached_class)
698
+ end
699
+ def self.new(
700
+
701
+ refusal:,
702
+
703
+ type: :refusal
704
+ )
705
+ end
706
+
707
+ sig do
708
+ override.returns(
709
+ {refusal: String, type: Symbol}
710
+ )
711
+ end
712
+ def to_hash
713
+ end
714
+
715
+ end
716
+
717
+ sig {
718
+ override.returns(
719
+ T::Array[
720
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part::Variants
721
+ ]
722
+ )
723
+ }
724
+ def self.variants
725
+ end
726
+
727
+ end
728
+
729
+ sig {
730
+ override.returns(
731
+ T::Array[
732
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Variants
733
+ ]
734
+ )
735
+ }
736
+ def self.variants
737
+ end
738
+
739
+ PartsArray = T.let(
740
+ OpenAI::Internal::Type::ArrayOf[
741
+ union: OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Content::Part
742
+ ],
743
+ OpenAI::Internal::Type::Converter
744
+ )
745
+
746
+ end
747
+
748
+ # The phase of an assistant message.
749
+ module Phase
750
+ extend OpenAI::Internal::Type::Enum
751
+
752
+ TaggedSymbol = T.type_alias {
753
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase)
754
+ }
755
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
756
+
757
+ COMMENTARY = T.let(
758
+ :commentary,
759
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase::TaggedSymbol
760
+ )
761
+ FINAL_ANSWER = T.let(
762
+ :final_answer,
763
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase::TaggedSymbol
764
+ )
765
+
766
+ sig {
767
+ override.returns(
768
+ T::Array[
769
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Phase::TaggedSymbol
770
+ ]
771
+ )
772
+ }
773
+ def self.values
774
+ end
775
+ end
776
+
777
+ module Type
778
+ extend OpenAI::Internal::Type::Enum
779
+
780
+ TaggedSymbol = T.type_alias {
781
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type)
782
+ }
783
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
784
+
785
+ MESSAGE = T.let(
786
+ :message,
787
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type::TaggedSymbol
788
+ )
789
+
790
+ sig {
791
+ override.returns(
792
+ T::Array[
793
+ OpenAI::DecisionCreateParams::Input::UnionMember1::DecisionInputAssistantMessage::Type::TaggedSymbol
794
+ ]
795
+ )
796
+ }
797
+ def self.values
798
+ end
799
+ end
800
+ end
801
+
802
+ class FunctionCall < OpenAI::Internal::Type::BaseModel
803
+ OrHash = T.type_alias do
804
+ T.any(
805
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall,
806
+ OpenAI::Internal::AnyHash
807
+ )
808
+ end
809
+
810
+ sig { returns(String) }
811
+ attr_accessor :arguments
812
+
813
+ sig { returns(String) }
814
+ attr_accessor :call_id
815
+
816
+ sig { returns(String) }
817
+ attr_accessor :name
818
+
819
+ sig { returns(Symbol) }
820
+ attr_accessor :type
821
+
822
+ sig { returns(T.nilable(String)) }
823
+ attr_accessor :id
824
+
825
+ sig { returns(T.nilable(String)) }
826
+ attr_accessor :namespace
827
+
828
+ sig {
829
+ returns(T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status::OrSymbol))
830
+ }
831
+ attr_accessor :status
832
+
833
+ sig do
834
+ params(
835
+
836
+ arguments: String,
837
+
838
+ call_id: String,
839
+
840
+ name: String,
841
+
842
+ id: T.nilable(String),
843
+
844
+ namespace: T.nilable(String),
845
+
846
+ status: T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status::OrSymbol),
847
+
848
+ type: Symbol
849
+ )
850
+ .returns(T.attached_class)
851
+ end
852
+ def self.new(
853
+
854
+ arguments:,
855
+
856
+ call_id:,
857
+
858
+ name:,
859
+
860
+ id: nil,
861
+
862
+ namespace: nil,
863
+
864
+ status: nil,
865
+
866
+ type: :function_call
867
+ )
868
+ end
869
+
870
+ sig do
871
+ override.returns(
872
+ {
873
+ arguments: String,
874
+ call_id: String,
875
+ name: String,
876
+ type: Symbol,
877
+ id: T.nilable(String),
878
+ namespace: T.nilable(String),
879
+ status: T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status::OrSymbol)
880
+ }
881
+ )
882
+ end
883
+ def to_hash
884
+ end
885
+
886
+ module Status
887
+ extend OpenAI::Internal::Type::Enum
888
+
889
+ TaggedSymbol = T.type_alias {
890
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status)
891
+ }
892
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
893
+
894
+ IN_PROGRESS = T.let(
895
+ :in_progress,
896
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status::TaggedSymbol
897
+ )
898
+ COMPLETED = T.let(
899
+ :completed,
900
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status::TaggedSymbol
901
+ )
902
+ INCOMPLETE = T.let(
903
+ :incomplete,
904
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status::TaggedSymbol
905
+ )
906
+
907
+ sig {
908
+ override.returns(
909
+ T::Array[OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCall::Status::TaggedSymbol]
910
+ )
911
+ }
912
+ def self.values
913
+ end
914
+ end
915
+ end
916
+
917
+ class FunctionCallOutput < OpenAI::Internal::Type::BaseModel
918
+ OrHash = T.type_alias do
919
+ T.any(
920
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput,
921
+ OpenAI::Internal::AnyHash
922
+ )
923
+ end
924
+
925
+ sig { returns(String) }
926
+ attr_accessor :call_id
927
+
928
+ # Text evidence or an ordered list of text and image parts.
929
+ sig { returns(OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Variants) }
930
+ attr_accessor :output
931
+
932
+ sig { returns(Symbol) }
933
+ attr_accessor :type
934
+
935
+ sig { returns(T.nilable(String)) }
936
+ attr_accessor :id
937
+
938
+ sig {
939
+ returns(
940
+ T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status::OrSymbol)
941
+ )
942
+ }
943
+ attr_accessor :status
944
+
945
+ sig do
946
+ params(
947
+
948
+ call_id: String,
949
+
950
+ output: OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Variants,
951
+
952
+ id: T.nilable(String),
953
+
954
+ status: T.nilable(
955
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status::OrSymbol
956
+ ),
957
+
958
+ type: Symbol
959
+ )
960
+ .returns(T.attached_class)
961
+ end
962
+ def self.new(
963
+
964
+ call_id:,
965
+
966
+ # Text evidence or an ordered list of text and image parts.
967
+ output:,
968
+
969
+ id: nil,
970
+
971
+ status: nil,
972
+
973
+ type: :function_call_output
974
+ )
975
+ end
976
+
977
+ sig do
978
+ override.returns(
979
+ {
980
+ call_id: String,
981
+ output: OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Variants,
982
+ type: Symbol,
983
+ id: T.nilable(String),
984
+ status: T.nilable(
985
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status::OrSymbol
986
+ )
987
+ }
988
+ )
989
+ end
990
+ def to_hash
991
+ end
992
+
993
+ # Text evidence or an ordered list of text and image parts.
994
+ module Output
995
+ extend OpenAI::Internal::Type::Union
996
+
997
+ Variants = T.type_alias {
998
+ T.any(
999
+ String,
1000
+ T::Array[
1001
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Part::Variants
1002
+ ]
1003
+ )
1004
+ }
1005
+
1006
+ # An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
1007
+ # File IDs are not supported.
1008
+ module Part
1009
+ extend OpenAI::Internal::Type::Union
1010
+
1011
+ Variants = T.type_alias { T.any(OpenAI::DecisionInputText, OpenAI::DecisionInputImage) }
1012
+
1013
+ sig {
1014
+ override.returns(
1015
+ T::Array[
1016
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Part::Variants
1017
+ ]
1018
+ )
1019
+ }
1020
+ def self.variants
1021
+ end
1022
+
1023
+ end
1024
+
1025
+ sig {
1026
+ override.returns(
1027
+ T::Array[OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Variants]
1028
+ )
1029
+ }
1030
+ def self.variants
1031
+ end
1032
+
1033
+ PartsArray = T.let(
1034
+ OpenAI::Internal::Type::ArrayOf[
1035
+ union: OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Output::Part
1036
+ ],
1037
+ OpenAI::Internal::Type::Converter
1038
+ )
1039
+
1040
+ end
1041
+
1042
+ module Status
1043
+ extend OpenAI::Internal::Type::Enum
1044
+
1045
+ TaggedSymbol = T.type_alias {
1046
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status)
1047
+ }
1048
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1049
+
1050
+ IN_PROGRESS = T.let(
1051
+ :in_progress,
1052
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status::TaggedSymbol
1053
+ )
1054
+ COMPLETED = T.let(
1055
+ :completed,
1056
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status::TaggedSymbol
1057
+ )
1058
+ INCOMPLETE = T.let(
1059
+ :incomplete,
1060
+ OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status::TaggedSymbol
1061
+ )
1062
+
1063
+ sig {
1064
+ override.returns(
1065
+ T::Array[OpenAI::DecisionCreateParams::Input::UnionMember1::FunctionCallOutput::Status::TaggedSymbol]
1066
+ )
1067
+ }
1068
+ def self.values
1069
+ end
1070
+ end
1071
+ end
1072
+
1073
+ class CustomToolCall < OpenAI::Internal::Type::BaseModel
1074
+ OrHash = T.type_alias do
1075
+ T.any(
1076
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall,
1077
+ OpenAI::Internal::AnyHash
1078
+ )
1079
+ end
1080
+
1081
+ sig { returns(String) }
1082
+ attr_accessor :call_id
1083
+
1084
+ sig { returns(String) }
1085
+ attr_accessor :input
1086
+
1087
+ sig { returns(String) }
1088
+ attr_accessor :name
1089
+
1090
+ sig { returns(Symbol) }
1091
+ attr_accessor :type
1092
+
1093
+ sig { returns(T.nilable(String)) }
1094
+ attr_accessor :id
1095
+
1096
+ sig { returns(T.nilable(String)) }
1097
+ attr_accessor :namespace
1098
+
1099
+ sig {
1100
+ returns(T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status::OrSymbol))
1101
+ }
1102
+ attr_accessor :status
1103
+
1104
+ sig do
1105
+ params(
1106
+
1107
+ call_id: String,
1108
+
1109
+ input: String,
1110
+
1111
+ name: String,
1112
+
1113
+ id: T.nilable(String),
1114
+
1115
+ namespace: T.nilable(String),
1116
+
1117
+ status: T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status::OrSymbol),
1118
+
1119
+ type: Symbol
1120
+ )
1121
+ .returns(T.attached_class)
1122
+ end
1123
+ def self.new(
1124
+
1125
+ call_id:,
1126
+
1127
+ input:,
1128
+
1129
+ name:,
1130
+
1131
+ id: nil,
1132
+
1133
+ namespace: nil,
1134
+
1135
+ status: nil,
1136
+
1137
+ type: :custom_tool_call
1138
+ )
1139
+ end
1140
+
1141
+ sig do
1142
+ override.returns(
1143
+ {
1144
+ call_id: String,
1145
+ input: String,
1146
+ name: String,
1147
+ type: Symbol,
1148
+ id: T.nilable(String),
1149
+ namespace: T.nilable(String),
1150
+ status: T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status::OrSymbol)
1151
+ }
1152
+ )
1153
+ end
1154
+ def to_hash
1155
+ end
1156
+
1157
+ module Status
1158
+ extend OpenAI::Internal::Type::Enum
1159
+
1160
+ TaggedSymbol = T.type_alias {
1161
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status)
1162
+ }
1163
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1164
+
1165
+ IN_PROGRESS = T.let(
1166
+ :in_progress,
1167
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status::TaggedSymbol
1168
+ )
1169
+ COMPLETED = T.let(
1170
+ :completed,
1171
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status::TaggedSymbol
1172
+ )
1173
+ INCOMPLETE = T.let(
1174
+ :incomplete,
1175
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status::TaggedSymbol
1176
+ )
1177
+
1178
+ sig {
1179
+ override.returns(
1180
+ T::Array[OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCall::Status::TaggedSymbol]
1181
+ )
1182
+ }
1183
+ def self.values
1184
+ end
1185
+ end
1186
+ end
1187
+
1188
+ class CustomToolCallOutput < OpenAI::Internal::Type::BaseModel
1189
+ OrHash = T.type_alias do
1190
+ T.any(
1191
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput,
1192
+ OpenAI::Internal::AnyHash
1193
+ )
1194
+ end
1195
+
1196
+ sig { returns(String) }
1197
+ attr_accessor :call_id
1198
+
1199
+ # Text evidence or an ordered list of text and image parts.
1200
+ sig { returns(OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Variants) }
1201
+ attr_accessor :output
1202
+
1203
+ sig { returns(Symbol) }
1204
+ attr_accessor :type
1205
+
1206
+ sig { returns(T.nilable(String)) }
1207
+ attr_accessor :id
1208
+
1209
+ sig {
1210
+ returns(
1211
+ T.nilable(OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status::OrSymbol)
1212
+ )
1213
+ }
1214
+ attr_accessor :status
1215
+
1216
+ sig do
1217
+ params(
1218
+
1219
+ call_id: String,
1220
+
1221
+ output: OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Variants,
1222
+
1223
+ id: T.nilable(String),
1224
+
1225
+ status: T.nilable(
1226
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status::OrSymbol
1227
+ ),
1228
+
1229
+ type: Symbol
1230
+ )
1231
+ .returns(T.attached_class)
1232
+ end
1233
+ def self.new(
1234
+
1235
+ call_id:,
1236
+
1237
+ # Text evidence or an ordered list of text and image parts.
1238
+ output:,
1239
+
1240
+ id: nil,
1241
+
1242
+ status: nil,
1243
+
1244
+ type: :custom_tool_call_output
1245
+ )
1246
+ end
1247
+
1248
+ sig do
1249
+ override.returns(
1250
+ {
1251
+ call_id: String,
1252
+ output: OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Variants,
1253
+ type: Symbol,
1254
+ id: T.nilable(String),
1255
+ status: T.nilable(
1256
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status::OrSymbol
1257
+ )
1258
+ }
1259
+ )
1260
+ end
1261
+ def to_hash
1262
+ end
1263
+
1264
+ # Text evidence or an ordered list of text and image parts.
1265
+ module Output
1266
+ extend OpenAI::Internal::Type::Union
1267
+
1268
+ Variants = T.type_alias {
1269
+ T.any(
1270
+ String,
1271
+ T::Array[
1272
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Part::Variants
1273
+ ]
1274
+ )
1275
+ }
1276
+
1277
+ # An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
1278
+ # File IDs are not supported.
1279
+ module Part
1280
+ extend OpenAI::Internal::Type::Union
1281
+
1282
+ Variants = T.type_alias { T.any(OpenAI::DecisionInputText, OpenAI::DecisionInputImage) }
1283
+
1284
+ sig {
1285
+ override.returns(
1286
+ T::Array[
1287
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Part::Variants
1288
+ ]
1289
+ )
1290
+ }
1291
+ def self.variants
1292
+ end
1293
+
1294
+ end
1295
+
1296
+ sig {
1297
+ override.returns(
1298
+ T::Array[OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Variants]
1299
+ )
1300
+ }
1301
+ def self.variants
1302
+ end
1303
+
1304
+ PartsArray = T.let(
1305
+ OpenAI::Internal::Type::ArrayOf[
1306
+ union: OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Output::Part
1307
+ ],
1308
+ OpenAI::Internal::Type::Converter
1309
+ )
1310
+
1311
+ end
1312
+
1313
+ module Status
1314
+ extend OpenAI::Internal::Type::Enum
1315
+
1316
+ TaggedSymbol = T.type_alias {
1317
+ T.all(Symbol, OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status)
1318
+ }
1319
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1320
+
1321
+ IN_PROGRESS = T.let(
1322
+ :in_progress,
1323
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status::TaggedSymbol
1324
+ )
1325
+ COMPLETED = T.let(
1326
+ :completed,
1327
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status::TaggedSymbol
1328
+ )
1329
+ INCOMPLETE = T.let(
1330
+ :incomplete,
1331
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status::TaggedSymbol
1332
+ )
1333
+
1334
+ sig {
1335
+ override.returns(
1336
+ T::Array[
1337
+ OpenAI::DecisionCreateParams::Input::UnionMember1::CustomToolCallOutput::Status::TaggedSymbol
1338
+ ]
1339
+ )
1340
+ }
1341
+ def self.values
1342
+ end
1343
+ end
1344
+ end
1345
+
1346
+ sig { override.returns(T::Array[OpenAI::DecisionCreateParams::Input::UnionMember1::Variants]) }
1347
+ def self.variants
1348
+ end
1349
+
1350
+ end
157
1351
 
158
1352
  sig { override.returns(T::Array[OpenAI::DecisionCreateParams::Input::Variants]) }
159
1353
  def self.variants
160
1354
  end
161
1355
 
162
- DecisionInputMessageArray = T.let(
163
- OpenAI::Internal::Type::ArrayOf[OpenAI::DecisionInputMessage],
1356
+ UnionMember1Array = T.let(
1357
+ OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionCreateParams::Input::UnionMember1],
164
1358
  OpenAI::Internal::Type::Converter
165
1359
  )
166
1360
 
@@ -186,7 +1380,7 @@ module OpenAI
186
1380
  )
187
1381
  end
188
1382
 
189
- sig { returns(String) }
1383
+ sig { returns(OpenAI::DecisionCreateParams::Question::Predicate::Instructions::Variants) }
190
1384
  attr_accessor :instructions
191
1385
 
192
1386
  # The type of the object. Always `predicate`.
@@ -203,7 +1397,7 @@ module OpenAI
203
1397
  sig do
204
1398
  params(
205
1399
 
206
- instructions: String,
1400
+ instructions: OpenAI::DecisionCreateParams::Question::Predicate::Instructions::Variants,
207
1401
 
208
1402
  name: String,
209
1403
 
@@ -225,12 +1419,33 @@ module OpenAI
225
1419
 
226
1420
  sig do
227
1421
  override.returns(
228
- {instructions: String, type: Symbol, name: String}
1422
+ {
1423
+ instructions: OpenAI::DecisionCreateParams::Question::Predicate::Instructions::Variants,
1424
+ type: Symbol,
1425
+ name: String
1426
+ }
229
1427
  )
230
1428
  end
231
1429
  def to_hash
232
1430
  end
233
1431
 
1432
+ module Instructions
1433
+ extend OpenAI::Internal::Type::Union
1434
+
1435
+ Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionQuestionInputPart::Variants]) }
1436
+
1437
+ sig {
1438
+ override.returns(T::Array[OpenAI::DecisionCreateParams::Question::Predicate::Instructions::Variants])
1439
+ }
1440
+ def self.variants
1441
+ end
1442
+
1443
+ DecisionQuestionInputPartArray = T.let(
1444
+ OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionQuestionInputPart],
1445
+ OpenAI::Internal::Type::Converter
1446
+ )
1447
+
1448
+ end
234
1449
  end
235
1450
 
236
1451
  class Choice < OpenAI::Internal::Type::BaseModel
@@ -245,7 +1460,7 @@ module OpenAI
245
1460
  sig { returns(T::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice]) }
246
1461
  attr_accessor :choices
247
1462
 
248
- sig { returns(String) }
1463
+ sig { returns(OpenAI::DecisionCreateParams::Question::Choice::Instructions::Variants) }
249
1464
  attr_accessor :instructions
250
1465
 
251
1466
  # The type of the object. Always `choice`.
@@ -264,7 +1479,7 @@ module OpenAI
264
1479
 
265
1480
  choices: T::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice::OrHash],
266
1481
 
267
- instructions: String,
1482
+ instructions: OpenAI::DecisionCreateParams::Question::Choice::Instructions::Variants,
268
1483
 
269
1484
  name: String,
270
1485
 
@@ -291,7 +1506,7 @@ module OpenAI
291
1506
  override.returns(
292
1507
  {
293
1508
  choices: T::Array[OpenAI::DecisionCreateParams::Question::Choice::Choice],
294
- instructions: String,
1509
+ instructions: OpenAI::DecisionCreateParams::Question::Choice::Instructions::Variants,
295
1510
  type: Symbol,
296
1511
  name: String
297
1512
  }
@@ -358,6 +1573,22 @@ module OpenAI
358
1573
 
359
1574
  end
360
1575
  end
1576
+
1577
+ module Instructions
1578
+ extend OpenAI::Internal::Type::Union
1579
+
1580
+ Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionQuestionInputPart::Variants]) }
1581
+
1582
+ sig { override.returns(T::Array[OpenAI::DecisionCreateParams::Question::Choice::Instructions::Variants]) }
1583
+ def self.variants
1584
+ end
1585
+
1586
+ DecisionQuestionInputPartArray = T.let(
1587
+ OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionQuestionInputPart],
1588
+ OpenAI::Internal::Type::Converter
1589
+ )
1590
+
1591
+ end
361
1592
  end
362
1593
 
363
1594
  class Score < OpenAI::Internal::Type::BaseModel
@@ -368,7 +1599,7 @@ module OpenAI
368
1599
  )
369
1600
  end
370
1601
 
371
- sig { returns(String) }
1602
+ sig { returns(OpenAI::DecisionCreateParams::Question::Score::Instructions::Variants) }
372
1603
  attr_accessor :instructions
373
1604
 
374
1605
  sig { returns(T::Array[OpenAI::DecisionCreateParams::Question::Score::Level]) }
@@ -388,7 +1619,7 @@ module OpenAI
388
1619
  sig do
389
1620
  params(
390
1621
 
391
- instructions: String,
1622
+ instructions: OpenAI::DecisionCreateParams::Question::Score::Instructions::Variants,
392
1623
 
393
1624
  levels: T::Array[OpenAI::DecisionCreateParams::Question::Score::Level::OrHash],
394
1625
 
@@ -415,7 +1646,7 @@ module OpenAI
415
1646
  sig do
416
1647
  override.returns(
417
1648
  {
418
- instructions: String,
1649
+ instructions: OpenAI::DecisionCreateParams::Question::Score::Instructions::Variants,
419
1650
  levels: T::Array[OpenAI::DecisionCreateParams::Question::Score::Level],
420
1651
  type: Symbol,
421
1652
  name: String
@@ -425,6 +1656,22 @@ module OpenAI
425
1656
  def to_hash
426
1657
  end
427
1658
 
1659
+ module Instructions
1660
+ extend OpenAI::Internal::Type::Union
1661
+
1662
+ Variants = T.type_alias { T.any(String, T::Array[OpenAI::DecisionQuestionInputPart::Variants]) }
1663
+
1664
+ sig { override.returns(T::Array[OpenAI::DecisionCreateParams::Question::Score::Instructions::Variants]) }
1665
+ def self.variants
1666
+ end
1667
+
1668
+ DecisionQuestionInputPartArray = T.let(
1669
+ OpenAI::Internal::Type::ArrayOf[union: OpenAI::DecisionQuestionInputPart],
1670
+ OpenAI::Internal::Type::Converter
1671
+ )
1672
+
1673
+ end
1674
+
428
1675
  class Level < OpenAI::Internal::Type::BaseModel
429
1676
  OrHash = T.type_alias do
430
1677
  T.any(