openai 0.96.0 → 0.97.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 +7 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agent.rb +2 -2
- data/lib/openai/models/beta/agent_browser_authentication_cancel_param.rb +23 -0
- data/lib/openai/models/beta/agent_browser_authentication_submit_param.rb +70 -0
- data/lib/openai/models/beta/agent_browser_origin_access_param.rb +45 -0
- data/lib/openai/models/beta/agent_create_params.rb +2 -2
- data/lib/openai/models/beta/agent_output_item.rb +276 -1
- data/lib/openai/models/beta/agent_session.rb +251 -5
- data/lib/openai/models/beta/agent_session_input_param.rb +64 -1
- data/lib/openai/models/beta/agent_session_item.rb +391 -1
- data/lib/openai/models/beta/agent_session_turn_item_added_event.rb +2 -2
- data/lib/openai/models/beta/agent_session_turn_item_done_event.rb +2 -2
- data/lib/openai/models/beta/agent_tool.rb +27 -1
- data/lib/openai/models/beta/agent_tool_param.rb +27 -1
- data/lib/openai/models/beta/agent_update_params.rb +2 -2
- data/lib/openai/models/beta/agents/environments/environment_template.rb +26 -2
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +48 -3
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +45 -3
- data/lib/openai/models/beta/agents/session_create_params.rb +2 -2
- data/lib/openai/models/beta/agents/sessions/event_create_params.rb +2 -2
- data/lib/openai/models/beta/environment.rb +26 -2
- data/lib/openai/models/beta/environment_param.rb +43 -3
- data/lib/openai/models/beta/persisted_agent_tool.rb +27 -1
- data/lib/openai/models/beta/persisted_agent_tool_param.rb +27 -1
- data/lib/openai/resources/beta/agents/environments/templates.rb +9 -2
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/items.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/items.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/turns/items.rb +1 -1
- data/lib/openai/resources/beta/agents.rb +2 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +3 -0
- data/rbi/openai/models/beta/agent.rbi +2 -1
- data/rbi/openai/models/beta/agent_browser_authentication_cancel_param.rbi +53 -0
- data/rbi/openai/models/beta/agent_browser_authentication_submit_param.rbi +125 -0
- data/rbi/openai/models/beta/agent_browser_origin_access_param.rbi +76 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +6 -3
- data/rbi/openai/models/beta/agent_output_item.rbi +422 -0
- data/rbi/openai/models/beta/agent_session.rbi +373 -1
- data/rbi/openai/models/beta/agent_session_input_param.rbi +102 -0
- data/rbi/openai/models/beta/agent_session_item.rbi +614 -0
- data/rbi/openai/models/beta/agent_session_turn_item_added_event.rbi +3 -0
- data/rbi/openai/models/beta/agent_session_turn_item_done_event.rbi +2 -0
- data/rbi/openai/models/beta/agent_tool.rbi +49 -1
- data/rbi/openai/models/beta/agent_tool_param.rbi +52 -1
- data/rbi/openai/models/beta/agent_update_params.rbi +6 -3
- data/rbi/openai/models/beta/agents/environments/environment_template.rbi +53 -2
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +74 -4
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +71 -4
- data/rbi/openai/models/beta/agents/session_create_params.rbi +6 -3
- data/rbi/openai/models/beta/agents/sessions/event_create_params.rbi +3 -0
- data/rbi/openai/models/beta/environment.rbi +53 -2
- data/rbi/openai/models/beta/environment_param.rbi +72 -4
- data/rbi/openai/models/beta/persisted_agent_tool.rbi +49 -1
- data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +52 -1
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +7 -0
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +1 -0
- data/rbi/openai/resources/beta/agents.rbi +4 -2
- data/sig/openai/models/beta/agent_browser_authentication_cancel_param.rbs +21 -0
- data/sig/openai/models/beta/agent_browser_authentication_submit_param.rbs +63 -0
- data/sig/openai/models/beta/agent_browser_origin_access_param.rbs +47 -0
- data/sig/openai/models/beta/agent_output_item.rbs +254 -0
- data/sig/openai/models/beta/agent_session.rbs +215 -1
- data/sig/openai/models/beta/agent_session_input_param.rbs +51 -1
- data/sig/openai/models/beta/agent_session_item.rbs +362 -0
- data/sig/openai/models/beta/agent_tool.rbs +22 -0
- data/sig/openai/models/beta/agent_tool_param.rbs +25 -0
- data/sig/openai/models/beta/agents/environments/environment_template.rbs +29 -3
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +39 -4
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +37 -4
- data/sig/openai/models/beta/environment.rbs +29 -3
- data/sig/openai/models/beta/environment_param.rbs +39 -4
- data/sig/openai/models/beta/persisted_agent_tool.rbs +22 -0
- data/sig/openai/models/beta/persisted_agent_tool_param.rbs +25 -0
- data/sig/openai/resources/beta/agents/environments/templates.rbs +2 -0
- metadata +10 -1
|
@@ -6,6 +6,8 @@ module OpenAI
|
|
|
6
6
|
| OpenAI::Beta::AgentReasoningItem
|
|
7
7
|
| OpenAI::Beta::AgentFunctionCallItem
|
|
8
8
|
| OpenAI::Beta::AgentMcpCallItem
|
|
9
|
+
| OpenAI::Beta::AgentOutputItem::ComputerUseCall
|
|
10
|
+
| OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest
|
|
9
11
|
| OpenAI::Beta::AgentWebSearchCallItem
|
|
10
12
|
| OpenAI::Beta::AgentCommandExecutionItem
|
|
11
13
|
| OpenAI::Beta::AgentCreateSubagentCallItem
|
|
@@ -18,6 +20,258 @@ module OpenAI
|
|
|
18
20
|
module AgentOutputItem
|
|
19
21
|
extend OpenAI::Internal::Type::Union
|
|
20
22
|
|
|
23
|
+
type computer_use_call =
|
|
24
|
+
{
|
|
25
|
+
id: String,
|
|
26
|
+
output: OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output?,
|
|
27
|
+
status: OpenAI::Models::Beta::agent_function_call_status,
|
|
28
|
+
title: String?,
|
|
29
|
+
turn_id: String,
|
|
30
|
+
?type: :computer_use_call
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
class ComputerUseCall < OpenAI::Internal::Type::BaseModel
|
|
34
|
+
# The ID of the activity item.
|
|
35
|
+
attr_accessor id: String
|
|
36
|
+
|
|
37
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
38
|
+
# disabled or the call emitted no screenshot.
|
|
39
|
+
attr_accessor output: OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output?
|
|
40
|
+
|
|
41
|
+
# The execution status of the activity.
|
|
42
|
+
attr_accessor status: OpenAI::Models::Beta::agent_function_call_status
|
|
43
|
+
|
|
44
|
+
# A model-generated description of the activity, when available.
|
|
45
|
+
attr_accessor title: String?
|
|
46
|
+
|
|
47
|
+
# The ID of the turn that contains this item.
|
|
48
|
+
attr_accessor turn_id: String
|
|
49
|
+
|
|
50
|
+
# The item type. Always `computer_use_call`.
|
|
51
|
+
attr_accessor type: :computer_use_call
|
|
52
|
+
|
|
53
|
+
# @param id
|
|
54
|
+
# The ID of the activity item.
|
|
55
|
+
# @param output
|
|
56
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
57
|
+
# disabled or the call emitted no screenshot.
|
|
58
|
+
# @param status
|
|
59
|
+
# The execution status of the activity.
|
|
60
|
+
# @param title
|
|
61
|
+
# A model-generated description of the activity, when available.
|
|
62
|
+
# @param turn_id
|
|
63
|
+
# The ID of the turn that contains this item.
|
|
64
|
+
# @param type
|
|
65
|
+
# The item type. Always `computer_use_call`.
|
|
66
|
+
def initialize: (
|
|
67
|
+
id: String,
|
|
68
|
+
output: OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output?,
|
|
69
|
+
status: OpenAI::Models::Beta::agent_function_call_status,
|
|
70
|
+
title: String?,
|
|
71
|
+
turn_id: String,
|
|
72
|
+
?type: :computer_use_call
|
|
73
|
+
) -> void
|
|
74
|
+
|
|
75
|
+
def to_hash: -> {
|
|
76
|
+
id: String,
|
|
77
|
+
output: OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output?,
|
|
78
|
+
status: OpenAI::Models::Beta::agent_function_call_status,
|
|
79
|
+
title: String?,
|
|
80
|
+
turn_id: String,
|
|
81
|
+
?type: :computer_use_call
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
type output = { image_url: String, ?type: :computer_screenshot }
|
|
85
|
+
|
|
86
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
87
|
+
# The complete JPEG image as a base64 data URL.
|
|
88
|
+
attr_accessor image_url: String
|
|
89
|
+
|
|
90
|
+
# The content type. Always `computer_screenshot`.
|
|
91
|
+
attr_accessor type: :computer_screenshot
|
|
92
|
+
|
|
93
|
+
# @param image_url
|
|
94
|
+
# The complete JPEG image as a base64 data URL.
|
|
95
|
+
# @param type
|
|
96
|
+
# The content type. Always `computer_screenshot`.
|
|
97
|
+
def initialize: (
|
|
98
|
+
image_url: String,
|
|
99
|
+
?type: :computer_screenshot
|
|
100
|
+
) -> void
|
|
101
|
+
|
|
102
|
+
def to_hash: -> { image_url: String, ?type: :computer_screenshot }
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
type computer_use_approval_request =
|
|
107
|
+
{
|
|
108
|
+
id: String,
|
|
109
|
+
request: OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request,
|
|
110
|
+
request_id: String,
|
|
111
|
+
turn_id: String,
|
|
112
|
+
?type: :computer_use_approval_request
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
class ComputerUseApprovalRequest < OpenAI::Internal::Type::BaseModel
|
|
116
|
+
# The stable history item ID.
|
|
117
|
+
attr_accessor id: String
|
|
118
|
+
|
|
119
|
+
# A registered form awaiting the application's response.
|
|
120
|
+
attr_accessor request: OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request
|
|
121
|
+
|
|
122
|
+
attr_accessor request_id: String
|
|
123
|
+
|
|
124
|
+
attr_accessor turn_id: String
|
|
125
|
+
|
|
126
|
+
# The item type. Always computer_use_approval_request.
|
|
127
|
+
attr_accessor type: :computer_use_approval_request
|
|
128
|
+
|
|
129
|
+
# @param id
|
|
130
|
+
# The stable history item ID.
|
|
131
|
+
# @param request
|
|
132
|
+
# A registered form awaiting the application's response.
|
|
133
|
+
# @param type
|
|
134
|
+
# The item type. Always computer_use_approval_request.
|
|
135
|
+
def initialize: (
|
|
136
|
+
id: String,
|
|
137
|
+
request: OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request,
|
|
138
|
+
request_id: String,
|
|
139
|
+
turn_id: String,
|
|
140
|
+
?type: :computer_use_approval_request
|
|
141
|
+
) -> void
|
|
142
|
+
|
|
143
|
+
def to_hash: -> {
|
|
144
|
+
id: String,
|
|
145
|
+
request: OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request,
|
|
146
|
+
request_id: String,
|
|
147
|
+
turn_id: String,
|
|
148
|
+
?type: :computer_use_approval_request
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
type request =
|
|
152
|
+
{
|
|
153
|
+
credential_origin: String?,
|
|
154
|
+
fields: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field],
|
|
155
|
+
options: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option],
|
|
156
|
+
reason: String?,
|
|
157
|
+
?type: :browser_authentication
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
class Request < OpenAI::Internal::Type::BaseModel
|
|
161
|
+
# The registered form or frame origin where values will be entered.
|
|
162
|
+
attr_accessor credential_origin: String?
|
|
163
|
+
|
|
164
|
+
# Controls to render. All submitted values are sensitive.
|
|
165
|
+
attr_accessor fields: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field]
|
|
166
|
+
|
|
167
|
+
# Sign-in methods. Empty for a plain form.
|
|
168
|
+
attr_accessor options: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option]
|
|
169
|
+
|
|
170
|
+
# Why the agent needs the user to sign in.
|
|
171
|
+
attr_accessor reason: String?
|
|
172
|
+
|
|
173
|
+
# The type of the object. Always `browser_authentication`.
|
|
174
|
+
attr_accessor type: :browser_authentication
|
|
175
|
+
|
|
176
|
+
# @param credential_origin
|
|
177
|
+
# The registered form or frame origin where values will be entered.
|
|
178
|
+
# @param fields
|
|
179
|
+
# Controls to render. All submitted values are sensitive.
|
|
180
|
+
# @param options
|
|
181
|
+
# Sign-in methods. Empty for a plain form.
|
|
182
|
+
# @param reason
|
|
183
|
+
# Why the agent needs the user to sign in.
|
|
184
|
+
# @param type
|
|
185
|
+
# The type of the object. Always `browser_authentication`.
|
|
186
|
+
def initialize: (
|
|
187
|
+
credential_origin: String?,
|
|
188
|
+
fields: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field],
|
|
189
|
+
options: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option],
|
|
190
|
+
reason: String?,
|
|
191
|
+
?type: :browser_authentication
|
|
192
|
+
) -> void
|
|
193
|
+
|
|
194
|
+
def to_hash: -> {
|
|
195
|
+
credential_origin: String?,
|
|
196
|
+
fields: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field],
|
|
197
|
+
options: ::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option],
|
|
198
|
+
reason: String?,
|
|
199
|
+
?type: :browser_authentication
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
type field =
|
|
203
|
+
{ id: String, label: String, required: bool, type: String }
|
|
204
|
+
|
|
205
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
206
|
+
# The field ID to submit as field_id in a fields entry.
|
|
207
|
+
attr_accessor id: String
|
|
208
|
+
|
|
209
|
+
# The label to display beside the control.
|
|
210
|
+
attr_accessor label: String
|
|
211
|
+
|
|
212
|
+
# Whether this control requires a nonempty value.
|
|
213
|
+
attr_accessor required: bool
|
|
214
|
+
|
|
215
|
+
# The rendering type, such as email, password, or text.
|
|
216
|
+
attr_accessor type: String
|
|
217
|
+
|
|
218
|
+
# @param id
|
|
219
|
+
# The field ID to submit as field_id in a fields entry.
|
|
220
|
+
# @param label
|
|
221
|
+
# The label to display beside the control.
|
|
222
|
+
# @param required
|
|
223
|
+
# Whether this control requires a nonempty value.
|
|
224
|
+
# @param type
|
|
225
|
+
# The rendering type, such as email, password, or text.
|
|
226
|
+
def initialize: (
|
|
227
|
+
id: String,
|
|
228
|
+
label: String,
|
|
229
|
+
required: bool,
|
|
230
|
+
type: String
|
|
231
|
+
) -> void
|
|
232
|
+
|
|
233
|
+
def to_hash: -> {
|
|
234
|
+
id: String,
|
|
235
|
+
label: String,
|
|
236
|
+
required: bool,
|
|
237
|
+
type: String
|
|
238
|
+
}
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
type option =
|
|
242
|
+
{ id: String, field_ids: ::Array[String], label: String }
|
|
243
|
+
|
|
244
|
+
class Option < OpenAI::Internal::Type::BaseModel
|
|
245
|
+
# The option ID to submit as selected_option.
|
|
246
|
+
attr_accessor id: String
|
|
247
|
+
|
|
248
|
+
# IDs from the registered fields that this method accepts.
|
|
249
|
+
attr_accessor field_ids: ::Array[String]
|
|
250
|
+
|
|
251
|
+
# The method label to display.
|
|
252
|
+
attr_accessor label: String
|
|
253
|
+
|
|
254
|
+
# @param id
|
|
255
|
+
# The option ID to submit as selected_option.
|
|
256
|
+
# @param field_ids
|
|
257
|
+
# IDs from the registered fields that this method accepts.
|
|
258
|
+
# @param label
|
|
259
|
+
# The method label to display.
|
|
260
|
+
def initialize: (
|
|
261
|
+
id: String,
|
|
262
|
+
field_ids: ::Array[String],
|
|
263
|
+
label: String
|
|
264
|
+
) -> void
|
|
265
|
+
|
|
266
|
+
def to_hash: -> {
|
|
267
|
+
id: String,
|
|
268
|
+
field_ids: ::Array[String],
|
|
269
|
+
label: String
|
|
270
|
+
}
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
|
|
21
275
|
def self?.variants: -> ::Array[OpenAI::Models::Beta::agent_output_item]
|
|
22
276
|
end
|
|
23
277
|
end
|
|
@@ -213,12 +213,226 @@ module OpenAI
|
|
|
213
213
|
end
|
|
214
214
|
|
|
215
215
|
type required_action =
|
|
216
|
-
OpenAI::Beta::AgentSession::RequiredAction::
|
|
216
|
+
OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest
|
|
217
|
+
| OpenAI::Beta::AgentSession::RequiredAction::FunctionCall
|
|
217
218
|
| OpenAI::Beta::AgentSession::RequiredAction::EnvironmentConnection
|
|
218
219
|
|
|
219
220
|
module RequiredAction
|
|
220
221
|
extend OpenAI::Internal::Type::Union
|
|
221
222
|
|
|
223
|
+
type computer_use_approval_request =
|
|
224
|
+
{
|
|
225
|
+
request: OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::request,
|
|
226
|
+
request_id: String,
|
|
227
|
+
turn_id: String,
|
|
228
|
+
?type: :computer_use_approval_request
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
class ComputerUseApprovalRequest < OpenAI::Internal::Type::BaseModel
|
|
232
|
+
# The information needed to render the request.
|
|
233
|
+
attr_accessor request: OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::request
|
|
234
|
+
|
|
235
|
+
# The registered request ID to echo when responding.
|
|
236
|
+
attr_accessor request_id: String
|
|
237
|
+
|
|
238
|
+
# The turn that requested approval.
|
|
239
|
+
attr_accessor turn_id: String
|
|
240
|
+
|
|
241
|
+
# The type of the object. Always `computer_use_approval_request`.
|
|
242
|
+
attr_accessor type: :computer_use_approval_request
|
|
243
|
+
|
|
244
|
+
# @param request
|
|
245
|
+
# The information needed to render the request.
|
|
246
|
+
# @param request_id
|
|
247
|
+
# The registered request ID to echo when responding.
|
|
248
|
+
# @param turn_id
|
|
249
|
+
# The turn that requested approval.
|
|
250
|
+
# @param type
|
|
251
|
+
# The type of the object. Always `computer_use_approval_request`.
|
|
252
|
+
def initialize: (
|
|
253
|
+
request: OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::request,
|
|
254
|
+
request_id: String,
|
|
255
|
+
turn_id: String,
|
|
256
|
+
?type: :computer_use_approval_request
|
|
257
|
+
) -> void
|
|
258
|
+
|
|
259
|
+
def to_hash: -> {
|
|
260
|
+
request: OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::request,
|
|
261
|
+
request_id: String,
|
|
262
|
+
turn_id: String,
|
|
263
|
+
?type: :computer_use_approval_request
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
type request =
|
|
267
|
+
OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication
|
|
268
|
+
| OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserOriginAccess
|
|
269
|
+
|
|
270
|
+
module Request
|
|
271
|
+
extend OpenAI::Internal::Type::Union
|
|
272
|
+
|
|
273
|
+
type browser_authentication =
|
|
274
|
+
{
|
|
275
|
+
credential_origin: String?,
|
|
276
|
+
fields: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field],
|
|
277
|
+
options: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option],
|
|
278
|
+
reason: String?,
|
|
279
|
+
?type: :browser_authentication
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
class BrowserAuthentication < OpenAI::Internal::Type::BaseModel
|
|
283
|
+
# The registered form or frame origin where values will be entered.
|
|
284
|
+
attr_accessor credential_origin: String?
|
|
285
|
+
|
|
286
|
+
# Controls to render. All submitted values are sensitive.
|
|
287
|
+
attr_accessor fields: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field]
|
|
288
|
+
|
|
289
|
+
# Sign-in methods. Empty for a plain form.
|
|
290
|
+
attr_accessor options: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option]
|
|
291
|
+
|
|
292
|
+
# Why the agent needs the user to sign in.
|
|
293
|
+
attr_accessor reason: String?
|
|
294
|
+
|
|
295
|
+
# The type of the object. Always `browser_authentication`.
|
|
296
|
+
attr_accessor type: :browser_authentication
|
|
297
|
+
|
|
298
|
+
# @param credential_origin
|
|
299
|
+
# The registered form or frame origin where values will be entered.
|
|
300
|
+
# @param fields
|
|
301
|
+
# Controls to render. All submitted values are sensitive.
|
|
302
|
+
# @param options
|
|
303
|
+
# Sign-in methods. Empty for a plain form.
|
|
304
|
+
# @param reason
|
|
305
|
+
# Why the agent needs the user to sign in.
|
|
306
|
+
# @param type
|
|
307
|
+
# The type of the object. Always `browser_authentication`.
|
|
308
|
+
def initialize: (
|
|
309
|
+
credential_origin: String?,
|
|
310
|
+
fields: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field],
|
|
311
|
+
options: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option],
|
|
312
|
+
reason: String?,
|
|
313
|
+
?type: :browser_authentication
|
|
314
|
+
) -> void
|
|
315
|
+
|
|
316
|
+
def to_hash: -> {
|
|
317
|
+
credential_origin: String?,
|
|
318
|
+
fields: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Field],
|
|
319
|
+
options: ::Array[OpenAI::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::Request::BrowserAuthentication::Option],
|
|
320
|
+
reason: String?,
|
|
321
|
+
?type: :browser_authentication
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
type field =
|
|
325
|
+
{ id: String, label: String, required: bool, type: String }
|
|
326
|
+
|
|
327
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
328
|
+
# The field ID to submit as field_id in a fields entry.
|
|
329
|
+
attr_accessor id: String
|
|
330
|
+
|
|
331
|
+
# The label to display beside the control.
|
|
332
|
+
attr_accessor label: String
|
|
333
|
+
|
|
334
|
+
# Whether this control requires a nonempty value.
|
|
335
|
+
attr_accessor required: bool
|
|
336
|
+
|
|
337
|
+
# The rendering type, such as email, password, or text.
|
|
338
|
+
attr_accessor type: String
|
|
339
|
+
|
|
340
|
+
# @param id
|
|
341
|
+
# The field ID to submit as field_id in a fields entry.
|
|
342
|
+
# @param label
|
|
343
|
+
# The label to display beside the control.
|
|
344
|
+
# @param required
|
|
345
|
+
# Whether this control requires a nonempty value.
|
|
346
|
+
# @param type
|
|
347
|
+
# The rendering type, such as email, password, or text.
|
|
348
|
+
def initialize: (
|
|
349
|
+
id: String,
|
|
350
|
+
label: String,
|
|
351
|
+
required: bool,
|
|
352
|
+
type: String
|
|
353
|
+
) -> void
|
|
354
|
+
|
|
355
|
+
def to_hash: -> {
|
|
356
|
+
id: String,
|
|
357
|
+
label: String,
|
|
358
|
+
required: bool,
|
|
359
|
+
type: String
|
|
360
|
+
}
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
type option =
|
|
364
|
+
{ id: String, field_ids: ::Array[String], label: String }
|
|
365
|
+
|
|
366
|
+
class Option < OpenAI::Internal::Type::BaseModel
|
|
367
|
+
# The option ID to submit as selected_option.
|
|
368
|
+
attr_accessor id: String
|
|
369
|
+
|
|
370
|
+
# IDs from the registered fields that this method accepts.
|
|
371
|
+
attr_accessor field_ids: ::Array[String]
|
|
372
|
+
|
|
373
|
+
# The method label to display.
|
|
374
|
+
attr_accessor label: String
|
|
375
|
+
|
|
376
|
+
# @param id
|
|
377
|
+
# The option ID to submit as selected_option.
|
|
378
|
+
# @param field_ids
|
|
379
|
+
# IDs from the registered fields that this method accepts.
|
|
380
|
+
# @param label
|
|
381
|
+
# The method label to display.
|
|
382
|
+
def initialize: (
|
|
383
|
+
id: String,
|
|
384
|
+
field_ids: ::Array[String],
|
|
385
|
+
label: String
|
|
386
|
+
) -> void
|
|
387
|
+
|
|
388
|
+
def to_hash: -> {
|
|
389
|
+
id: String,
|
|
390
|
+
field_ids: ::Array[String],
|
|
391
|
+
label: String
|
|
392
|
+
}
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
type browser_origin_access =
|
|
397
|
+
{
|
|
398
|
+
origin: String,
|
|
399
|
+
reason: String?,
|
|
400
|
+
?type: :browser_origin_access
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
class BrowserOriginAccess < OpenAI::Internal::Type::BaseModel
|
|
404
|
+
# The origin the browser needs permission to access.
|
|
405
|
+
attr_accessor origin: String
|
|
406
|
+
|
|
407
|
+
# The browser's explanation for this request, or null when unavailable.
|
|
408
|
+
attr_accessor reason: String?
|
|
409
|
+
|
|
410
|
+
# The type of the object. Always `browser_origin_access`.
|
|
411
|
+
attr_accessor type: :browser_origin_access
|
|
412
|
+
|
|
413
|
+
# @param origin
|
|
414
|
+
# The origin the browser needs permission to access.
|
|
415
|
+
# @param reason
|
|
416
|
+
# The browser's explanation for this request, or null when unavailable.
|
|
417
|
+
# @param type
|
|
418
|
+
# The type of the object. Always `browser_origin_access`.
|
|
419
|
+
def initialize: (
|
|
420
|
+
origin: String,
|
|
421
|
+
reason: String?,
|
|
422
|
+
?type: :browser_origin_access
|
|
423
|
+
) -> void
|
|
424
|
+
|
|
425
|
+
def to_hash: -> {
|
|
426
|
+
origin: String,
|
|
427
|
+
reason: String?,
|
|
428
|
+
?type: :browser_origin_access
|
|
429
|
+
}
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::AgentSession::RequiredAction::ComputerUseApprovalRequest::request]
|
|
433
|
+
end
|
|
434
|
+
end
|
|
435
|
+
|
|
222
436
|
type function_call =
|
|
223
437
|
{
|
|
224
438
|
arguments: top,
|
|
@@ -2,13 +2,63 @@ module OpenAI
|
|
|
2
2
|
module Models
|
|
3
3
|
module Beta
|
|
4
4
|
type agent_session_input_param =
|
|
5
|
-
OpenAI::Beta::AgentSessionInputParam::
|
|
5
|
+
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult
|
|
6
|
+
| OpenAI::Beta::AgentSessionInputParam::AgentSessionInputMessage
|
|
6
7
|
| OpenAI::Beta::AgentSessionInputParam::AgentSessionInputCancel
|
|
7
8
|
| OpenAI::Beta::AgentSessionInputParam::AgentSessionInputToolResult
|
|
8
9
|
|
|
9
10
|
module AgentSessionInputParam
|
|
10
11
|
extend OpenAI::Internal::Type::Union
|
|
11
12
|
|
|
13
|
+
type agent_session_input_computer_use_approval_request_result =
|
|
14
|
+
{
|
|
15
|
+
request_id: String,
|
|
16
|
+
response: OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::response,
|
|
17
|
+
?type: :"agent.session.input.computer_use_approval_request_result"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class AgentSessionInputComputerUseApprovalRequestResult < OpenAI::Internal::Type::BaseModel
|
|
21
|
+
# The registered request ID from the required action.
|
|
22
|
+
attr_accessor request_id: String
|
|
23
|
+
|
|
24
|
+
# The response for this request type.
|
|
25
|
+
attr_accessor response: OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::response
|
|
26
|
+
|
|
27
|
+
# The type of the object. Always
|
|
28
|
+
# `agent.session.input.computer_use_approval_request_result`.
|
|
29
|
+
attr_accessor type: :"agent.session.input.computer_use_approval_request_result"
|
|
30
|
+
|
|
31
|
+
# @param request_id
|
|
32
|
+
# The registered request ID from the required action.
|
|
33
|
+
# @param response
|
|
34
|
+
# The response for this request type.
|
|
35
|
+
# @param type
|
|
36
|
+
# The type of the object. Always
|
|
37
|
+
# `agent.session.input.computer_use_approval_request_result`.
|
|
38
|
+
def initialize: (
|
|
39
|
+
request_id: String,
|
|
40
|
+
response: OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::response,
|
|
41
|
+
?type: :"agent.session.input.computer_use_approval_request_result"
|
|
42
|
+
) -> void
|
|
43
|
+
|
|
44
|
+
def to_hash: -> {
|
|
45
|
+
request_id: String,
|
|
46
|
+
response: OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::response,
|
|
47
|
+
?type: :"agent.session.input.computer_use_approval_request_result"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
type response =
|
|
51
|
+
OpenAI::Beta::AgentBrowserAuthenticationSubmitParam
|
|
52
|
+
| OpenAI::Beta::AgentBrowserAuthenticationCancelParam
|
|
53
|
+
| OpenAI::Beta::AgentBrowserOriginAccessParam
|
|
54
|
+
|
|
55
|
+
module Response
|
|
56
|
+
extend OpenAI::Internal::Type::Union
|
|
57
|
+
|
|
58
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::response]
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
12
62
|
type agent_session_input_message =
|
|
13
63
|
{
|
|
14
64
|
input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam],
|