openai 0.55.0 → 0.57.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 +45 -0
- data/README.md +1 -1
- data/lib/openai/internal/type/enum.rb +4 -4
- data/lib/openai/models/batch_create_params.rb +9 -6
- data/lib/openai/models/chat_model.rb +4 -0
- data/lib/openai/models/comparison_filter.rb +2 -0
- data/lib/openai/models/conversations/conversation_item.rb +4 -1
- data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
- data/lib/openai/models/responses/compacted_response.rb +2 -2
- data/lib/openai/models/responses/computer_action.rb +45 -5
- data/lib/openai/models/responses/namespace_tool.rb +13 -1
- data/lib/openai/models/responses/response.rb +2 -2
- data/lib/openai/models/responses/response_compact_params.rb +12 -0
- data/lib/openai/models/responses/response_computer_tool_call.rb +45 -5
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +31 -22
- data/lib/openai/models/responses/response_custom_tool_call_item.rb +53 -0
- data/lib/openai/models/responses/response_custom_tool_call_output_item.rb +53 -0
- data/lib/openai/models/responses/response_function_tool_call_item.rb +31 -1
- data/lib/openai/models/responses/response_function_tool_call_output_item.rb +14 -6
- data/lib/openai/models/responses/response_input_message_item.rb +8 -20
- data/lib/openai/models/responses/response_item.rb +16 -1
- data/lib/openai/models/responses/response_item_list.rb +2 -2
- data/lib/openai/models/responses/response_output_item.rb +120 -1
- data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
- data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
- data/lib/openai/resources/conversations/items.rb +2 -2
- data/lib/openai/resources/responses/input_items.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -2
- data/rbi/openai/models/batch_create_params.rbi +17 -9
- data/rbi/openai/models/chat_model.rbi +6 -0
- data/rbi/openai/models/comparison_filter.rbi +2 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +1 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +1 -0
- data/rbi/openai/models/responses/compacted_response.rbi +6 -1
- data/rbi/openai/models/responses/computer_action.rbi +71 -11
- data/rbi/openai/models/responses/namespace_tool.rbi +11 -0
- data/rbi/openai/models/responses/response.rbi +6 -1
- data/rbi/openai/models/responses/response_compact_params.rbi +20 -0
- data/rbi/openai/models/responses/response_computer_tool_call.rbi +71 -11
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +71 -65
- data/rbi/openai/models/responses/response_custom_tool_call_item.rbi +111 -0
- data/rbi/openai/models/responses/response_custom_tool_call_output_item.rbi +111 -0
- data/rbi/openai/models/responses/response_function_tool_call_item.rbi +81 -3
- data/rbi/openai/models/responses/response_function_tool_call_output_item.rbi +19 -18
- data/rbi/openai/models/responses/response_input_message_item.rbi +8 -49
- data/rbi/openai/models/responses/response_item.rbi +5 -1
- data/rbi/openai/models/responses/response_item_list.rbi +5 -1
- data/rbi/openai/models/responses/response_output_item.rbi +186 -1
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +6 -1
- data/rbi/openai/models/responses/response_output_item_done_event.rbi +6 -1
- data/rbi/openai/resources/batches.rbi +4 -3
- data/sig/openai/models/batch_create_params.rbs +2 -0
- data/sig/openai/models/chat_model.rbs +8 -0
- data/sig/openai/models/comparison_filter.rbs +3 -1
- data/sig/openai/models/conversations/conversation_item.rbs +1 -0
- data/sig/openai/models/responses/computer_action.rbs +53 -11
- data/sig/openai/models/responses/namespace_tool.rbs +7 -0
- data/sig/openai/models/responses/response_compact_params.rbs +8 -0
- data/sig/openai/models/responses/response_computer_tool_call.rbs +53 -11
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +23 -19
- data/sig/openai/models/responses/response_custom_tool_call_item.rbs +52 -0
- data/sig/openai/models/responses/response_custom_tool_call_output_item.rbs +52 -0
- data/sig/openai/models/responses/response_function_tool_call_item.rbs +38 -3
- data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +10 -7
- data/sig/openai/models/responses/response_input_message_item.rbs +7 -21
- data/sig/openai/models/responses/response_item.rbs +4 -0
- data/sig/openai/models/responses/response_output_item.rbs +86 -0
- metadata +8 -2
|
@@ -396,6 +396,10 @@ module OpenAI
|
|
|
396
396
|
sig { returns(Integer) }
|
|
397
397
|
attr_accessor :y_
|
|
398
398
|
|
|
399
|
+
# The keys being held while clicking.
|
|
400
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
401
|
+
attr_accessor :keys
|
|
402
|
+
|
|
399
403
|
# A click action.
|
|
400
404
|
sig do
|
|
401
405
|
params(
|
|
@@ -403,6 +407,7 @@ module OpenAI
|
|
|
403
407
|
OpenAI::Responses::ResponseComputerToolCall::Action::Click::Button::OrSymbol,
|
|
404
408
|
x: Integer,
|
|
405
409
|
y_: Integer,
|
|
410
|
+
keys: T.nilable(T::Array[String]),
|
|
406
411
|
type: Symbol
|
|
407
412
|
).returns(T.attached_class)
|
|
408
413
|
end
|
|
@@ -414,6 +419,8 @@ module OpenAI
|
|
|
414
419
|
x:,
|
|
415
420
|
# The y-coordinate where the click occurred.
|
|
416
421
|
y_:,
|
|
422
|
+
# The keys being held while clicking.
|
|
423
|
+
keys: nil,
|
|
417
424
|
# Specifies the event type. For a click action, this property is always `click`.
|
|
418
425
|
type: :click
|
|
419
426
|
)
|
|
@@ -426,7 +433,8 @@ module OpenAI
|
|
|
426
433
|
OpenAI::Responses::ResponseComputerToolCall::Action::Click::Button::OrSymbol,
|
|
427
434
|
type: Symbol,
|
|
428
435
|
x: Integer,
|
|
429
|
-
y_: Integer
|
|
436
|
+
y_: Integer,
|
|
437
|
+
keys: T.nilable(T::Array[String])
|
|
430
438
|
}
|
|
431
439
|
)
|
|
432
440
|
end
|
|
@@ -494,6 +502,10 @@ module OpenAI
|
|
|
494
502
|
)
|
|
495
503
|
end
|
|
496
504
|
|
|
505
|
+
# The keys being held while double-clicking.
|
|
506
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
507
|
+
attr_accessor :keys
|
|
508
|
+
|
|
497
509
|
# Specifies the event type. For a double click action, this property is always set
|
|
498
510
|
# to `double_click`.
|
|
499
511
|
sig { returns(Symbol) }
|
|
@@ -509,11 +521,16 @@ module OpenAI
|
|
|
509
521
|
|
|
510
522
|
# A double click action.
|
|
511
523
|
sig do
|
|
512
|
-
params(
|
|
513
|
-
T.
|
|
514
|
-
|
|
524
|
+
params(
|
|
525
|
+
keys: T.nilable(T::Array[String]),
|
|
526
|
+
x: Integer,
|
|
527
|
+
y_: Integer,
|
|
528
|
+
type: Symbol
|
|
529
|
+
).returns(T.attached_class)
|
|
515
530
|
end
|
|
516
531
|
def self.new(
|
|
532
|
+
# The keys being held while double-clicking.
|
|
533
|
+
keys:,
|
|
517
534
|
# The x-coordinate where the double click occurred.
|
|
518
535
|
x:,
|
|
519
536
|
# The y-coordinate where the double click occurred.
|
|
@@ -524,7 +541,16 @@ module OpenAI
|
|
|
524
541
|
)
|
|
525
542
|
end
|
|
526
543
|
|
|
527
|
-
sig
|
|
544
|
+
sig do
|
|
545
|
+
override.returns(
|
|
546
|
+
{
|
|
547
|
+
keys: T.nilable(T::Array[String]),
|
|
548
|
+
type: Symbol,
|
|
549
|
+
x: Integer,
|
|
550
|
+
y_: Integer
|
|
551
|
+
}
|
|
552
|
+
)
|
|
553
|
+
end
|
|
528
554
|
def to_hash
|
|
529
555
|
end
|
|
530
556
|
end
|
|
@@ -561,6 +587,10 @@ module OpenAI
|
|
|
561
587
|
sig { returns(Symbol) }
|
|
562
588
|
attr_accessor :type
|
|
563
589
|
|
|
590
|
+
# The keys being held while dragging the mouse.
|
|
591
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
592
|
+
attr_accessor :keys
|
|
593
|
+
|
|
564
594
|
# A drag action.
|
|
565
595
|
sig do
|
|
566
596
|
params(
|
|
@@ -568,6 +598,7 @@ module OpenAI
|
|
|
568
598
|
T::Array[
|
|
569
599
|
OpenAI::Responses::ResponseComputerToolCall::Action::Drag::Path::OrHash
|
|
570
600
|
],
|
|
601
|
+
keys: T.nilable(T::Array[String]),
|
|
571
602
|
type: Symbol
|
|
572
603
|
).returns(T.attached_class)
|
|
573
604
|
end
|
|
@@ -582,6 +613,8 @@ module OpenAI
|
|
|
582
613
|
# ]
|
|
583
614
|
# ```
|
|
584
615
|
path:,
|
|
616
|
+
# The keys being held while dragging the mouse.
|
|
617
|
+
keys: nil,
|
|
585
618
|
# Specifies the event type. For a drag action, this property is always set to
|
|
586
619
|
# `drag`.
|
|
587
620
|
type: :drag
|
|
@@ -595,7 +628,8 @@ module OpenAI
|
|
|
595
628
|
T::Array[
|
|
596
629
|
OpenAI::Responses::ResponseComputerToolCall::Action::Drag::Path
|
|
597
630
|
],
|
|
598
|
-
type: Symbol
|
|
631
|
+
type: Symbol,
|
|
632
|
+
keys: T.nilable(T::Array[String])
|
|
599
633
|
}
|
|
600
634
|
)
|
|
601
635
|
end
|
|
@@ -697,24 +731,42 @@ module OpenAI
|
|
|
697
731
|
sig { returns(Integer) }
|
|
698
732
|
attr_accessor :y_
|
|
699
733
|
|
|
734
|
+
# The keys being held while moving the mouse.
|
|
735
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
736
|
+
attr_accessor :keys
|
|
737
|
+
|
|
700
738
|
# A mouse move action.
|
|
701
739
|
sig do
|
|
702
|
-
params(
|
|
703
|
-
|
|
704
|
-
|
|
740
|
+
params(
|
|
741
|
+
x: Integer,
|
|
742
|
+
y_: Integer,
|
|
743
|
+
keys: T.nilable(T::Array[String]),
|
|
744
|
+
type: Symbol
|
|
745
|
+
).returns(T.attached_class)
|
|
705
746
|
end
|
|
706
747
|
def self.new(
|
|
707
748
|
# The x-coordinate to move to.
|
|
708
749
|
x:,
|
|
709
750
|
# The y-coordinate to move to.
|
|
710
751
|
y_:,
|
|
752
|
+
# The keys being held while moving the mouse.
|
|
753
|
+
keys: nil,
|
|
711
754
|
# Specifies the event type. For a move action, this property is always set to
|
|
712
755
|
# `move`.
|
|
713
756
|
type: :move
|
|
714
757
|
)
|
|
715
758
|
end
|
|
716
759
|
|
|
717
|
-
sig
|
|
760
|
+
sig do
|
|
761
|
+
override.returns(
|
|
762
|
+
{
|
|
763
|
+
type: Symbol,
|
|
764
|
+
x: Integer,
|
|
765
|
+
y_: Integer,
|
|
766
|
+
keys: T.nilable(T::Array[String])
|
|
767
|
+
}
|
|
768
|
+
)
|
|
769
|
+
end
|
|
718
770
|
def to_hash
|
|
719
771
|
end
|
|
720
772
|
end
|
|
@@ -777,6 +829,10 @@ module OpenAI
|
|
|
777
829
|
sig { returns(Integer) }
|
|
778
830
|
attr_accessor :y_
|
|
779
831
|
|
|
832
|
+
# The keys being held while scrolling.
|
|
833
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
834
|
+
attr_accessor :keys
|
|
835
|
+
|
|
780
836
|
# A scroll action.
|
|
781
837
|
sig do
|
|
782
838
|
params(
|
|
@@ -784,6 +840,7 @@ module OpenAI
|
|
|
784
840
|
scroll_y: Integer,
|
|
785
841
|
x: Integer,
|
|
786
842
|
y_: Integer,
|
|
843
|
+
keys: T.nilable(T::Array[String]),
|
|
787
844
|
type: Symbol
|
|
788
845
|
).returns(T.attached_class)
|
|
789
846
|
end
|
|
@@ -796,6 +853,8 @@ module OpenAI
|
|
|
796
853
|
x:,
|
|
797
854
|
# The y-coordinate where the scroll occurred.
|
|
798
855
|
y_:,
|
|
856
|
+
# The keys being held while scrolling.
|
|
857
|
+
keys: nil,
|
|
799
858
|
# Specifies the event type. For a scroll action, this property is always set to
|
|
800
859
|
# `scroll`.
|
|
801
860
|
type: :scroll
|
|
@@ -809,7 +868,8 @@ module OpenAI
|
|
|
809
868
|
scroll_y: Integer,
|
|
810
869
|
type: Symbol,
|
|
811
870
|
x: Integer,
|
|
812
|
-
y_: Integer
|
|
871
|
+
y_: Integer,
|
|
872
|
+
keys: T.nilable(T::Array[String])
|
|
813
873
|
}
|
|
814
874
|
)
|
|
815
875
|
end
|
|
@@ -34,6 +34,15 @@ module OpenAI
|
|
|
34
34
|
end
|
|
35
35
|
attr_writer :output
|
|
36
36
|
|
|
37
|
+
# The status of the message input. One of `in_progress`, `completed`, or
|
|
38
|
+
# `incomplete`. Populated when input items are returned via API.
|
|
39
|
+
sig do
|
|
40
|
+
returns(
|
|
41
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
attr_accessor :status
|
|
45
|
+
|
|
37
46
|
# The type of the computer tool call output. Always `computer_call_output`.
|
|
38
47
|
sig { returns(Symbol) }
|
|
39
48
|
attr_accessor :type
|
|
@@ -61,24 +70,12 @@ module OpenAI
|
|
|
61
70
|
end
|
|
62
71
|
attr_writer :acknowledged_safety_checks
|
|
63
72
|
|
|
64
|
-
# The
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
returns(
|
|
68
|
-
T.nilable(
|
|
69
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
70
|
-
)
|
|
71
|
-
)
|
|
72
|
-
end
|
|
73
|
-
attr_reader :status
|
|
73
|
+
# The identifier of the actor that created the item.
|
|
74
|
+
sig { returns(T.nilable(String)) }
|
|
75
|
+
attr_reader :created_by
|
|
74
76
|
|
|
75
|
-
sig
|
|
76
|
-
|
|
77
|
-
status:
|
|
78
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::OrSymbol
|
|
79
|
-
).void
|
|
80
|
-
end
|
|
81
|
-
attr_writer :status
|
|
77
|
+
sig { params(created_by: String).void }
|
|
78
|
+
attr_writer :created_by
|
|
82
79
|
|
|
83
80
|
sig do
|
|
84
81
|
params(
|
|
@@ -86,12 +83,13 @@ module OpenAI
|
|
|
86
83
|
call_id: String,
|
|
87
84
|
output:
|
|
88
85
|
OpenAI::Responses::ResponseComputerToolCallOutputScreenshot::OrHash,
|
|
86
|
+
status:
|
|
87
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::OrSymbol,
|
|
89
88
|
acknowledged_safety_checks:
|
|
90
89
|
T::Array[
|
|
91
90
|
OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck::OrHash
|
|
92
91
|
],
|
|
93
|
-
|
|
94
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::OrSymbol,
|
|
92
|
+
created_by: String,
|
|
95
93
|
type: Symbol
|
|
96
94
|
).returns(T.attached_class)
|
|
97
95
|
end
|
|
@@ -102,12 +100,14 @@ module OpenAI
|
|
|
102
100
|
call_id:,
|
|
103
101
|
# A computer screenshot image used with the computer use tool.
|
|
104
102
|
output:,
|
|
103
|
+
# The status of the message input. One of `in_progress`, `completed`, or
|
|
104
|
+
# `incomplete`. Populated when input items are returned via API.
|
|
105
|
+
status:,
|
|
105
106
|
# The safety checks reported by the API that have been acknowledged by the
|
|
106
107
|
# developer.
|
|
107
108
|
acknowledged_safety_checks: nil,
|
|
108
|
-
# The
|
|
109
|
-
|
|
110
|
-
status: nil,
|
|
109
|
+
# The identifier of the actor that created the item.
|
|
110
|
+
created_by: nil,
|
|
111
111
|
# The type of the computer tool call output. Always `computer_call_output`.
|
|
112
112
|
type: :computer_call_output
|
|
113
113
|
)
|
|
@@ -120,19 +120,66 @@ module OpenAI
|
|
|
120
120
|
call_id: String,
|
|
121
121
|
output:
|
|
122
122
|
OpenAI::Responses::ResponseComputerToolCallOutputScreenshot,
|
|
123
|
+
status:
|
|
124
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol,
|
|
123
125
|
type: Symbol,
|
|
124
126
|
acknowledged_safety_checks:
|
|
125
127
|
T::Array[
|
|
126
128
|
OpenAI::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck
|
|
127
129
|
],
|
|
128
|
-
|
|
129
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
130
|
+
created_by: String
|
|
130
131
|
}
|
|
131
132
|
)
|
|
132
133
|
end
|
|
133
134
|
def to_hash
|
|
134
135
|
end
|
|
135
136
|
|
|
137
|
+
# The status of the message input. One of `in_progress`, `completed`, or
|
|
138
|
+
# `incomplete`. Populated when input items are returned via API.
|
|
139
|
+
module Status
|
|
140
|
+
extend OpenAI::Internal::Type::Enum
|
|
141
|
+
|
|
142
|
+
TaggedSymbol =
|
|
143
|
+
T.type_alias do
|
|
144
|
+
T.all(
|
|
145
|
+
Symbol,
|
|
146
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
150
|
+
|
|
151
|
+
COMPLETED =
|
|
152
|
+
T.let(
|
|
153
|
+
:completed,
|
|
154
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
155
|
+
)
|
|
156
|
+
INCOMPLETE =
|
|
157
|
+
T.let(
|
|
158
|
+
:incomplete,
|
|
159
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
160
|
+
)
|
|
161
|
+
FAILED =
|
|
162
|
+
T.let(
|
|
163
|
+
:failed,
|
|
164
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
165
|
+
)
|
|
166
|
+
IN_PROGRESS =
|
|
167
|
+
T.let(
|
|
168
|
+
:in_progress,
|
|
169
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
sig do
|
|
173
|
+
override.returns(
|
|
174
|
+
T::Array[
|
|
175
|
+
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
176
|
+
]
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
def self.values
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
136
183
|
class AcknowledgedSafetyCheck < OpenAI::Internal::Type::BaseModel
|
|
137
184
|
OrHash =
|
|
138
185
|
T.type_alias do
|
|
@@ -184,47 +231,6 @@ module OpenAI
|
|
|
184
231
|
def to_hash
|
|
185
232
|
end
|
|
186
233
|
end
|
|
187
|
-
|
|
188
|
-
# The status of the message input. One of `in_progress`, `completed`, or
|
|
189
|
-
# `incomplete`. Populated when input items are returned via API.
|
|
190
|
-
module Status
|
|
191
|
-
extend OpenAI::Internal::Type::Enum
|
|
192
|
-
|
|
193
|
-
TaggedSymbol =
|
|
194
|
-
T.type_alias do
|
|
195
|
-
T.all(
|
|
196
|
-
Symbol,
|
|
197
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status
|
|
198
|
-
)
|
|
199
|
-
end
|
|
200
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
201
|
-
|
|
202
|
-
IN_PROGRESS =
|
|
203
|
-
T.let(
|
|
204
|
-
:in_progress,
|
|
205
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
206
|
-
)
|
|
207
|
-
COMPLETED =
|
|
208
|
-
T.let(
|
|
209
|
-
:completed,
|
|
210
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
211
|
-
)
|
|
212
|
-
INCOMPLETE =
|
|
213
|
-
T.let(
|
|
214
|
-
:incomplete,
|
|
215
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
216
|
-
)
|
|
217
|
-
|
|
218
|
-
sig do
|
|
219
|
-
override.returns(
|
|
220
|
-
T::Array[
|
|
221
|
-
OpenAI::Responses::ResponseComputerToolCallOutputItem::Status::TaggedSymbol
|
|
222
|
-
]
|
|
223
|
-
)
|
|
224
|
-
end
|
|
225
|
-
def self.values
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
234
|
end
|
|
229
235
|
end
|
|
230
236
|
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Responses
|
|
6
|
+
class ResponseCustomToolCallItem < OpenAI::Models::Responses::ResponseCustomToolCall
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
OpenAI::Responses::ResponseCustomToolCallItem,
|
|
11
|
+
OpenAI::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The unique ID of the custom tool call item.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
20
|
+
# Populated when items are returned via API.
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# The identifier of the actor that created the item.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :created_by
|
|
31
|
+
|
|
32
|
+
sig { params(created_by: String).void }
|
|
33
|
+
attr_writer :created_by
|
|
34
|
+
|
|
35
|
+
# A call to a custom tool created by the model.
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
id: String,
|
|
39
|
+
status:
|
|
40
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::OrSymbol,
|
|
41
|
+
created_by: String
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# The unique ID of the custom tool call item.
|
|
46
|
+
id:,
|
|
47
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
48
|
+
# Populated when items are returned via API.
|
|
49
|
+
status:,
|
|
50
|
+
# The identifier of the actor that created the item.
|
|
51
|
+
created_by: nil
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
id: String,
|
|
59
|
+
status:
|
|
60
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol,
|
|
61
|
+
created_by: String
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
69
|
+
# Populated when items are returned via API.
|
|
70
|
+
module Status
|
|
71
|
+
extend OpenAI::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
TaggedSymbol =
|
|
74
|
+
T.type_alias do
|
|
75
|
+
T.all(
|
|
76
|
+
Symbol,
|
|
77
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
81
|
+
|
|
82
|
+
IN_PROGRESS =
|
|
83
|
+
T.let(
|
|
84
|
+
:in_progress,
|
|
85
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
86
|
+
)
|
|
87
|
+
COMPLETED =
|
|
88
|
+
T.let(
|
|
89
|
+
:completed,
|
|
90
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
91
|
+
)
|
|
92
|
+
INCOMPLETE =
|
|
93
|
+
T.let(
|
|
94
|
+
:incomplete,
|
|
95
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
sig do
|
|
99
|
+
override.returns(
|
|
100
|
+
T::Array[
|
|
101
|
+
OpenAI::Responses::ResponseCustomToolCallItem::Status::TaggedSymbol
|
|
102
|
+
]
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
def self.values
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Responses
|
|
6
|
+
class ResponseCustomToolCallOutputItem < OpenAI::Models::Responses::ResponseCustomToolCallOutput
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem,
|
|
11
|
+
OpenAI::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# The unique ID of the custom tool call output item.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
20
|
+
# Populated when items are returned via API.
|
|
21
|
+
sig do
|
|
22
|
+
returns(
|
|
23
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :status
|
|
27
|
+
|
|
28
|
+
# The identifier of the actor that created the item.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_reader :created_by
|
|
31
|
+
|
|
32
|
+
sig { params(created_by: String).void }
|
|
33
|
+
attr_writer :created_by
|
|
34
|
+
|
|
35
|
+
# The output of a custom tool call from your code, being sent back to the model.
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
id: String,
|
|
39
|
+
status:
|
|
40
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::OrSymbol,
|
|
41
|
+
created_by: String
|
|
42
|
+
).returns(T.attached_class)
|
|
43
|
+
end
|
|
44
|
+
def self.new(
|
|
45
|
+
# The unique ID of the custom tool call output item.
|
|
46
|
+
id:,
|
|
47
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
48
|
+
# Populated when items are returned via API.
|
|
49
|
+
status:,
|
|
50
|
+
# The identifier of the actor that created the item.
|
|
51
|
+
created_by: nil
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig do
|
|
56
|
+
override.returns(
|
|
57
|
+
{
|
|
58
|
+
id: String,
|
|
59
|
+
status:
|
|
60
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol,
|
|
61
|
+
created_by: String
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
def to_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
69
|
+
# Populated when items are returned via API.
|
|
70
|
+
module Status
|
|
71
|
+
extend OpenAI::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
TaggedSymbol =
|
|
74
|
+
T.type_alias do
|
|
75
|
+
T.all(
|
|
76
|
+
Symbol,
|
|
77
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
81
|
+
|
|
82
|
+
IN_PROGRESS =
|
|
83
|
+
T.let(
|
|
84
|
+
:in_progress,
|
|
85
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
86
|
+
)
|
|
87
|
+
COMPLETED =
|
|
88
|
+
T.let(
|
|
89
|
+
:completed,
|
|
90
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
91
|
+
)
|
|
92
|
+
INCOMPLETE =
|
|
93
|
+
T.let(
|
|
94
|
+
:incomplete,
|
|
95
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
sig do
|
|
99
|
+
override.returns(
|
|
100
|
+
T::Array[
|
|
101
|
+
OpenAI::Responses::ResponseCustomToolCallOutputItem::Status::TaggedSymbol
|
|
102
|
+
]
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
def self.values
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|