openai 0.56.0 → 0.58.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 +60 -0
- data/README.md +98 -1
- data/lib/openai/auth/subject_token_provider.rb +15 -0
- data/lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb +88 -0
- data/lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb +66 -0
- data/lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb +37 -0
- data/lib/openai/auth/token_type.rb +10 -0
- data/lib/openai/auth/workload_identity.rb +23 -0
- data/lib/openai/auth/workload_identity_auth.rb +176 -0
- data/lib/openai/client.rb +59 -4
- data/lib/openai/errors.rb +39 -0
- data/lib/openai/internal/util.rb +22 -7
- 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/conversations/message.rb +28 -1
- data/lib/openai/models/oauth_error_code.rb +29 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +4 -3
- data/lib/openai/models/realtime/realtime_session_create_response.rb +7 -5
- data/lib/openai/models/realtime/realtime_tracing_config.rb +3 -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/response.rb +2 -2
- 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/models/vector_stores/file_batch_create_params.rb +9 -5
- data/lib/openai/models/vector_stores/file_create_params.rb +3 -1
- data/lib/openai/models.rb +2 -0
- data/lib/openai/resources/conversations/items.rb +2 -2
- data/lib/openai/resources/realtime/calls.rb +1 -1
- data/lib/openai/resources/responses/input_items.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +12 -2
- data/rbi/openai/auth.rbi +55 -0
- data/rbi/openai/internal/util.rbi +8 -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/conversations/message.rbi +53 -1
- data/rbi/openai/models/oauth_error_code.rbi +24 -0
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +6 -4
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +9 -6
- data/rbi/openai/models/realtime/realtime_tracing_config.rbi +3 -2
- 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/response.rbi +6 -1
- 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/models/vector_stores/file_batch_create_params.rbi +18 -10
- data/rbi/openai/models/vector_stores/file_create_params.rbi +6 -2
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/realtime/calls.rbi +3 -2
- data/rbi/openai/resources/vector_stores/file_batches.rbi +6 -4
- data/rbi/openai/resources/vector_stores/files.rbi +3 -1
- data/sig/openai/internal/util.rbs +4 -0
- data/sig/openai/models/conversations/conversation_item.rbs +1 -0
- data/sig/openai/models/conversations/message.rbs +18 -2
- data/sig/openai/models/oauth_error_code.rbs +14 -0
- data/sig/openai/models/responses/computer_action.rbs +53 -11
- 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
- data/sig/openai/models.rbs +2 -0
- metadata +19 -2
|
@@ -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
|
|
@@ -16,19 +16,97 @@ module OpenAI
|
|
|
16
16
|
sig { returns(String) }
|
|
17
17
|
attr_accessor :id
|
|
18
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::ResponseFunctionToolCallItem::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
|
+
|
|
19
35
|
# A tool call to run a function. See the
|
|
20
36
|
# [function calling guide](https://platform.openai.com/docs/guides/function-calling)
|
|
21
37
|
# for more information.
|
|
22
|
-
sig
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
id: String,
|
|
41
|
+
status:
|
|
42
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::OrSymbol,
|
|
43
|
+
created_by: String
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
23
46
|
def self.new(
|
|
24
47
|
# The unique ID of the function tool call.
|
|
25
|
-
id
|
|
48
|
+
id:,
|
|
49
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
50
|
+
# Populated when items are returned via API.
|
|
51
|
+
status:,
|
|
52
|
+
# The identifier of the actor that created the item.
|
|
53
|
+
created_by: nil
|
|
26
54
|
)
|
|
27
55
|
end
|
|
28
56
|
|
|
29
|
-
sig
|
|
57
|
+
sig do
|
|
58
|
+
override.returns(
|
|
59
|
+
{
|
|
60
|
+
id: String,
|
|
61
|
+
status:
|
|
62
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol,
|
|
63
|
+
created_by: String
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
end
|
|
30
67
|
def to_hash
|
|
31
68
|
end
|
|
69
|
+
|
|
70
|
+
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
71
|
+
# Populated when items are returned via API.
|
|
72
|
+
module Status
|
|
73
|
+
extend OpenAI::Internal::Type::Enum
|
|
74
|
+
|
|
75
|
+
TaggedSymbol =
|
|
76
|
+
T.type_alias do
|
|
77
|
+
T.all(
|
|
78
|
+
Symbol,
|
|
79
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
83
|
+
|
|
84
|
+
IN_PROGRESS =
|
|
85
|
+
T.let(
|
|
86
|
+
:in_progress,
|
|
87
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
88
|
+
)
|
|
89
|
+
COMPLETED =
|
|
90
|
+
T.let(
|
|
91
|
+
:completed,
|
|
92
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
93
|
+
)
|
|
94
|
+
INCOMPLETE =
|
|
95
|
+
T.let(
|
|
96
|
+
:incomplete,
|
|
97
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
override.returns(
|
|
102
|
+
T::Array[
|
|
103
|
+
OpenAI::Responses::ResponseFunctionToolCallItem::Status::TaggedSymbol
|
|
104
|
+
]
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
def self.values
|
|
108
|
+
end
|
|
109
|
+
end
|
|
32
110
|
end
|
|
33
111
|
end
|
|
34
112
|
end
|
|
@@ -29,28 +29,25 @@ module OpenAI
|
|
|
29
29
|
end
|
|
30
30
|
attr_accessor :output
|
|
31
31
|
|
|
32
|
-
# The type of the function tool call output. Always `function_call_output`.
|
|
33
|
-
sig { returns(Symbol) }
|
|
34
|
-
attr_accessor :type
|
|
35
|
-
|
|
36
32
|
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
37
33
|
# Populated when items are returned via API.
|
|
38
34
|
sig do
|
|
39
35
|
returns(
|
|
40
|
-
|
|
41
|
-
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol
|
|
42
|
-
)
|
|
36
|
+
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol
|
|
43
37
|
)
|
|
44
38
|
end
|
|
45
|
-
|
|
39
|
+
attr_accessor :status
|
|
46
40
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
# The type of the function tool call output. Always `function_call_output`.
|
|
42
|
+
sig { returns(Symbol) }
|
|
43
|
+
attr_accessor :type
|
|
44
|
+
|
|
45
|
+
# The identifier of the actor that created the item.
|
|
46
|
+
sig { returns(T.nilable(String)) }
|
|
47
|
+
attr_reader :created_by
|
|
48
|
+
|
|
49
|
+
sig { params(created_by: String).void }
|
|
50
|
+
attr_writer :created_by
|
|
54
51
|
|
|
55
52
|
sig do
|
|
56
53
|
params(
|
|
@@ -60,6 +57,7 @@ module OpenAI
|
|
|
60
57
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Output::Variants,
|
|
61
58
|
status:
|
|
62
59
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::OrSymbol,
|
|
60
|
+
created_by: String,
|
|
63
61
|
type: Symbol
|
|
64
62
|
).returns(T.attached_class)
|
|
65
63
|
end
|
|
@@ -73,7 +71,9 @@ module OpenAI
|
|
|
73
71
|
output:,
|
|
74
72
|
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
75
73
|
# Populated when items are returned via API.
|
|
76
|
-
status
|
|
74
|
+
status:,
|
|
75
|
+
# The identifier of the actor that created the item.
|
|
76
|
+
created_by: nil,
|
|
77
77
|
# The type of the function tool call output. Always `function_call_output`.
|
|
78
78
|
type: :function_call_output
|
|
79
79
|
)
|
|
@@ -86,9 +86,10 @@ module OpenAI
|
|
|
86
86
|
call_id: String,
|
|
87
87
|
output:
|
|
88
88
|
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Output::Variants,
|
|
89
|
-
type: Symbol,
|
|
90
89
|
status:
|
|
91
|
-
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol
|
|
90
|
+
OpenAI::Responses::ResponseFunctionToolCallOutputItem::Status::TaggedSymbol,
|
|
91
|
+
type: Symbol,
|
|
92
|
+
created_by: String
|
|
92
93
|
}
|
|
93
94
|
)
|
|
94
95
|
end
|
|
@@ -31,6 +31,10 @@ module OpenAI
|
|
|
31
31
|
end
|
|
32
32
|
attr_accessor :role
|
|
33
33
|
|
|
34
|
+
# The type of the message input. Always set to `message`.
|
|
35
|
+
sig { returns(Symbol) }
|
|
36
|
+
attr_accessor :type
|
|
37
|
+
|
|
34
38
|
# The status of item. One of `in_progress`, `completed`, or `incomplete`.
|
|
35
39
|
# Populated when items are returned via API.
|
|
36
40
|
sig do
|
|
@@ -50,23 +54,6 @@ module OpenAI
|
|
|
50
54
|
end
|
|
51
55
|
attr_writer :status
|
|
52
56
|
|
|
53
|
-
# The type of the message input. Always set to `message`.
|
|
54
|
-
sig do
|
|
55
|
-
returns(
|
|
56
|
-
T.nilable(
|
|
57
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
58
|
-
)
|
|
59
|
-
)
|
|
60
|
-
end
|
|
61
|
-
attr_reader :type
|
|
62
|
-
|
|
63
|
-
sig do
|
|
64
|
-
params(
|
|
65
|
-
type: OpenAI::Responses::ResponseInputMessageItem::Type::OrSymbol
|
|
66
|
-
).void
|
|
67
|
-
end
|
|
68
|
-
attr_writer :type
|
|
69
|
-
|
|
70
57
|
sig do
|
|
71
58
|
params(
|
|
72
59
|
id: String,
|
|
@@ -81,7 +68,7 @@ module OpenAI
|
|
|
81
68
|
role: OpenAI::Responses::ResponseInputMessageItem::Role::OrSymbol,
|
|
82
69
|
status:
|
|
83
70
|
OpenAI::Responses::ResponseInputMessageItem::Status::OrSymbol,
|
|
84
|
-
type:
|
|
71
|
+
type: Symbol
|
|
85
72
|
).returns(T.attached_class)
|
|
86
73
|
end
|
|
87
74
|
def self.new(
|
|
@@ -96,7 +83,7 @@ module OpenAI
|
|
|
96
83
|
# Populated when items are returned via API.
|
|
97
84
|
status: nil,
|
|
98
85
|
# The type of the message input. Always set to `message`.
|
|
99
|
-
type:
|
|
86
|
+
type: :message
|
|
100
87
|
)
|
|
101
88
|
end
|
|
102
89
|
|
|
@@ -108,10 +95,9 @@ module OpenAI
|
|
|
108
95
|
T::Array[OpenAI::Responses::ResponseInputContent::Variants],
|
|
109
96
|
role:
|
|
110
97
|
OpenAI::Responses::ResponseInputMessageItem::Role::TaggedSymbol,
|
|
98
|
+
type: Symbol,
|
|
111
99
|
status:
|
|
112
|
-
OpenAI::Responses::ResponseInputMessageItem::Status::TaggedSymbol
|
|
113
|
-
type:
|
|
114
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
100
|
+
OpenAI::Responses::ResponseInputMessageItem::Status::TaggedSymbol
|
|
115
101
|
}
|
|
116
102
|
)
|
|
117
103
|
end
|
|
@@ -192,33 +178,6 @@ module OpenAI
|
|
|
192
178
|
def self.values
|
|
193
179
|
end
|
|
194
180
|
end
|
|
195
|
-
|
|
196
|
-
# The type of the message input. Always set to `message`.
|
|
197
|
-
module Type
|
|
198
|
-
extend OpenAI::Internal::Type::Enum
|
|
199
|
-
|
|
200
|
-
TaggedSymbol =
|
|
201
|
-
T.type_alias do
|
|
202
|
-
T.all(Symbol, OpenAI::Responses::ResponseInputMessageItem::Type)
|
|
203
|
-
end
|
|
204
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
205
|
-
|
|
206
|
-
MESSAGE =
|
|
207
|
-
T.let(
|
|
208
|
-
:message,
|
|
209
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
sig do
|
|
213
|
-
override.returns(
|
|
214
|
-
T::Array[
|
|
215
|
-
OpenAI::Responses::ResponseInputMessageItem::Type::TaggedSymbol
|
|
216
|
-
]
|
|
217
|
-
)
|
|
218
|
-
end
|
|
219
|
-
def self.values
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
181
|
end
|
|
223
182
|
end
|
|
224
183
|
end
|