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
|
@@ -72,6 +72,14 @@ module OpenAI
|
|
|
72
72
|
sig { returns(T.nilable(T::Array[String])) }
|
|
73
73
|
attr_accessor :capability_directories
|
|
74
74
|
|
|
75
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
76
|
+
# defaults to disabled.
|
|
77
|
+
sig { returns(T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop)) }
|
|
78
|
+
attr_reader :desktop
|
|
79
|
+
|
|
80
|
+
sig { params(desktop: T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop::OrHash)).void }
|
|
81
|
+
attr_writer :desktop
|
|
82
|
+
|
|
75
83
|
# Environment variables made available to the agent.
|
|
76
84
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
77
85
|
attr_accessor :env
|
|
@@ -140,6 +148,8 @@ module OpenAI
|
|
|
140
148
|
|
|
141
149
|
capability_directories: T.nilable(T::Array[String]),
|
|
142
150
|
|
|
151
|
+
desktop: T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop::OrHash),
|
|
152
|
+
|
|
143
153
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
144
154
|
|
|
145
155
|
environment_template_id: String,
|
|
@@ -180,6 +190,10 @@ module OpenAI
|
|
|
180
190
|
# list.
|
|
181
191
|
capability_directories: nil,
|
|
182
192
|
|
|
193
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
194
|
+
# defaults to disabled.
|
|
195
|
+
desktop: nil,
|
|
196
|
+
|
|
183
197
|
# Environment variables made available to the agent.
|
|
184
198
|
env: nil,
|
|
185
199
|
|
|
@@ -218,6 +232,7 @@ module OpenAI
|
|
|
218
232
|
{
|
|
219
233
|
type: Symbol,
|
|
220
234
|
capability_directories: T.nilable(T::Array[String]),
|
|
235
|
+
desktop: T.nilable(OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop),
|
|
221
236
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
222
237
|
environment_template_id: String,
|
|
223
238
|
files: T.nilable(
|
|
@@ -243,6 +258,45 @@ module OpenAI
|
|
|
243
258
|
def to_hash
|
|
244
259
|
end
|
|
245
260
|
|
|
261
|
+
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
262
|
+
OrHash = T.type_alias do
|
|
263
|
+
T.any(
|
|
264
|
+
OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop,
|
|
265
|
+
OpenAI::Internal::AnyHash
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Whether to provision the desktop and its browser proxy.
|
|
270
|
+
sig { returns(T::Boolean) }
|
|
271
|
+
attr_accessor :enabled
|
|
272
|
+
|
|
273
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
274
|
+
# defaults to disabled.
|
|
275
|
+
sig do
|
|
276
|
+
params(
|
|
277
|
+
|
|
278
|
+
enabled: T::Boolean
|
|
279
|
+
)
|
|
280
|
+
.returns(T.attached_class)
|
|
281
|
+
end
|
|
282
|
+
def self.new(
|
|
283
|
+
|
|
284
|
+
# Whether to provision the desktop and its browser proxy.
|
|
285
|
+
|
|
286
|
+
enabled:
|
|
287
|
+
)
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
sig do
|
|
291
|
+
override.returns(
|
|
292
|
+
{enabled: T::Boolean}
|
|
293
|
+
)
|
|
294
|
+
end
|
|
295
|
+
def to_hash
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
end
|
|
299
|
+
|
|
246
300
|
class Network < OpenAI::Internal::Type::BaseModel
|
|
247
301
|
OrHash = T.type_alias do
|
|
248
302
|
T.any(
|
|
@@ -259,6 +313,12 @@ module OpenAI
|
|
|
259
313
|
sig { returns(T.nilable(T::Array[String])) }
|
|
260
314
|
attr_accessor :allowed_domains
|
|
261
315
|
|
|
316
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
317
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
318
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
319
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
320
|
+
attr_accessor :blocked_domains
|
|
321
|
+
|
|
262
322
|
# Network access policy for the environment. Defaults to disabled for GA requests
|
|
263
323
|
# and enabled for beta requests.
|
|
264
324
|
sig do
|
|
@@ -266,7 +326,9 @@ module OpenAI
|
|
|
266
326
|
|
|
267
327
|
access: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network::Access::OrSymbol,
|
|
268
328
|
|
|
269
|
-
allowed_domains: T.nilable(T::Array[String])
|
|
329
|
+
allowed_domains: T.nilable(T::Array[String]),
|
|
330
|
+
|
|
331
|
+
blocked_domains: T.nilable(T::Array[String])
|
|
270
332
|
)
|
|
271
333
|
.returns(T.attached_class)
|
|
272
334
|
end
|
|
@@ -276,8 +338,13 @@ module OpenAI
|
|
|
276
338
|
access:,
|
|
277
339
|
|
|
278
340
|
# Domains the environment may access when network access is restricted.
|
|
341
|
+
allowed_domains: nil,
|
|
342
|
+
|
|
343
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
344
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
345
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
279
346
|
|
|
280
|
-
|
|
347
|
+
blocked_domains: nil
|
|
281
348
|
)
|
|
282
349
|
end
|
|
283
350
|
|
|
@@ -285,7 +352,8 @@ module OpenAI
|
|
|
285
352
|
override.returns(
|
|
286
353
|
{
|
|
287
354
|
access: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network::Access::OrSymbol,
|
|
288
|
-
allowed_domains: T.nilable(T::Array[String])
|
|
355
|
+
allowed_domains: T.nilable(T::Array[String]),
|
|
356
|
+
blocked_domains: T.nilable(T::Array[String])
|
|
289
357
|
}
|
|
290
358
|
)
|
|
291
359
|
end
|
|
@@ -307,7 +375,7 @@ module OpenAI
|
|
|
307
375
|
# Disables network access.
|
|
308
376
|
DISABLED = T.let(:disabled, OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network::Access::TaggedSymbol)
|
|
309
377
|
|
|
310
|
-
#
|
|
378
|
+
# Applies the configured domain restrictions.
|
|
311
379
|
RESTRICTED = T.let(
|
|
312
380
|
:restricted,
|
|
313
381
|
OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network::Access::TaggedSymbol
|
|
@@ -15,7 +15,8 @@ module OpenAI
|
|
|
15
15
|
OpenAI::Beta::PersistedAgentTool::ToolSearch,
|
|
16
16
|
OpenAI::Beta::PersistedAgentTool::ProgrammaticToolCalling,
|
|
17
17
|
OpenAI::Beta::PersistedAgentTool::Mcp,
|
|
18
|
-
OpenAI::Beta::PersistedAgentTool::WebSearch
|
|
18
|
+
OpenAI::Beta::PersistedAgentTool::WebSearch,
|
|
19
|
+
OpenAI::Beta::PersistedAgentTool::ComputerUse
|
|
19
20
|
)
|
|
20
21
|
end
|
|
21
22
|
|
|
@@ -495,6 +496,53 @@ module OpenAI
|
|
|
495
496
|
end
|
|
496
497
|
end
|
|
497
498
|
|
|
499
|
+
class ComputerUse < OpenAI::Internal::Type::BaseModel
|
|
500
|
+
OrHash = T.type_alias do
|
|
501
|
+
T.any(
|
|
502
|
+
OpenAI::Beta::PersistedAgentTool::ComputerUse,
|
|
503
|
+
OpenAI::Internal::AnyHash
|
|
504
|
+
)
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
# Whether computer tool outputs include screenshots.
|
|
508
|
+
sig { returns(T::Boolean) }
|
|
509
|
+
attr_accessor :include_screenshots
|
|
510
|
+
|
|
511
|
+
# The type of the object. Always `computer_use`.
|
|
512
|
+
sig { returns(Symbol) }
|
|
513
|
+
attr_accessor :type
|
|
514
|
+
|
|
515
|
+
# Browser use in an OpenAI-hosted session.
|
|
516
|
+
sig do
|
|
517
|
+
params(
|
|
518
|
+
|
|
519
|
+
include_screenshots: T::Boolean,
|
|
520
|
+
|
|
521
|
+
type: Symbol
|
|
522
|
+
)
|
|
523
|
+
.returns(T.attached_class)
|
|
524
|
+
end
|
|
525
|
+
def self.new(
|
|
526
|
+
|
|
527
|
+
# Whether computer tool outputs include screenshots.
|
|
528
|
+
include_screenshots:,
|
|
529
|
+
|
|
530
|
+
# The type of the object. Always `computer_use`.
|
|
531
|
+
|
|
532
|
+
type: :computer_use
|
|
533
|
+
)
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
sig do
|
|
537
|
+
override.returns(
|
|
538
|
+
{include_screenshots: T::Boolean, type: Symbol}
|
|
539
|
+
)
|
|
540
|
+
end
|
|
541
|
+
def to_hash
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
end
|
|
545
|
+
|
|
498
546
|
sig { override.returns(T::Array[OpenAI::Beta::PersistedAgentTool::Variants]) }
|
|
499
547
|
def self.variants
|
|
500
548
|
end
|
|
@@ -15,7 +15,8 @@ module OpenAI
|
|
|
15
15
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch,
|
|
16
16
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling,
|
|
17
17
|
OpenAI::Beta::PersistedAgentToolParam::Mcp,
|
|
18
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch
|
|
18
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch,
|
|
19
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse
|
|
19
20
|
)
|
|
20
21
|
end
|
|
21
22
|
|
|
@@ -534,6 +535,56 @@ module OpenAI
|
|
|
534
535
|
end
|
|
535
536
|
end
|
|
536
537
|
|
|
538
|
+
class ComputerUse < OpenAI::Internal::Type::BaseModel
|
|
539
|
+
OrHash = T.type_alias do
|
|
540
|
+
T.any(
|
|
541
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse,
|
|
542
|
+
OpenAI::Internal::AnyHash
|
|
543
|
+
)
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# The type of the object. Always `computer_use`.
|
|
547
|
+
sig { returns(Symbol) }
|
|
548
|
+
attr_accessor :type
|
|
549
|
+
|
|
550
|
+
# Whether computer tool outputs include screenshots. Defaults to `false`.
|
|
551
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
552
|
+
attr_reader :include_screenshots
|
|
553
|
+
|
|
554
|
+
sig { params(include_screenshots: T::Boolean).void }
|
|
555
|
+
attr_writer :include_screenshots
|
|
556
|
+
|
|
557
|
+
# Browser use in an OpenAI-hosted session.
|
|
558
|
+
sig do
|
|
559
|
+
params(
|
|
560
|
+
|
|
561
|
+
include_screenshots: T::Boolean,
|
|
562
|
+
|
|
563
|
+
type: Symbol
|
|
564
|
+
)
|
|
565
|
+
.returns(T.attached_class)
|
|
566
|
+
end
|
|
567
|
+
def self.new(
|
|
568
|
+
|
|
569
|
+
# Whether computer tool outputs include screenshots. Defaults to `false`.
|
|
570
|
+
include_screenshots: nil,
|
|
571
|
+
|
|
572
|
+
# The type of the object. Always `computer_use`.
|
|
573
|
+
|
|
574
|
+
type: :computer_use
|
|
575
|
+
)
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
sig do
|
|
579
|
+
override.returns(
|
|
580
|
+
{type: Symbol, include_screenshots: T::Boolean}
|
|
581
|
+
)
|
|
582
|
+
end
|
|
583
|
+
def to_hash
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
end
|
|
587
|
+
|
|
537
588
|
sig { override.returns(T::Array[OpenAI::Beta::PersistedAgentToolParam::Variants]) }
|
|
538
589
|
def self.variants
|
|
539
590
|
end
|
|
@@ -17,6 +17,7 @@ module OpenAI
|
|
|
17
17
|
sig {
|
|
18
18
|
params(
|
|
19
19
|
capability_directories: T.nilable(T::Array[String]),
|
|
20
|
+
desktop: T.nilable(OpenAI::Beta::Agents::Environments::TemplateCreateParams::Desktop::OrHash),
|
|
20
21
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
21
22
|
files: T.nilable(
|
|
22
23
|
T::Array[
|
|
@@ -47,6 +48,9 @@ module OpenAI
|
|
|
47
48
|
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
48
49
|
# list.
|
|
49
50
|
capability_directories: nil,
|
|
51
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
52
|
+
# defaults to disabled.
|
|
53
|
+
desktop: nil,
|
|
50
54
|
# Environment variables made available to the agent.
|
|
51
55
|
env: nil,
|
|
52
56
|
# Files available before the agent starts. Defaults to an empty list.
|
|
@@ -91,6 +95,7 @@ module OpenAI
|
|
|
91
95
|
params(
|
|
92
96
|
environment_template_id: String,
|
|
93
97
|
capability_directories: T.nilable(T::Array[String]),
|
|
98
|
+
desktop: T.nilable(OpenAI::Beta::Agents::Environments::TemplateUpdateParams::Desktop::OrHash),
|
|
94
99
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
95
100
|
files: T.nilable(
|
|
96
101
|
T::Array[
|
|
@@ -122,6 +127,8 @@ module OpenAI
|
|
|
122
127
|
environment_template_id,
|
|
123
128
|
# Directories that expose capabilities to the agent.
|
|
124
129
|
capability_directories: nil,
|
|
130
|
+
# Replacement desktop configuration, or null to disable the desktop.
|
|
131
|
+
desktop: nil,
|
|
125
132
|
# Replacement confidential environment values.
|
|
126
133
|
env: nil,
|
|
127
134
|
# Replacement file configuration materialized for each new session.
|
|
@@ -22,6 +22,7 @@ module OpenAI
|
|
|
22
22
|
session_id: String,
|
|
23
23
|
events: T::Array[
|
|
24
24
|
T.any(
|
|
25
|
+
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::OrHash,
|
|
25
26
|
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputMessage::OrHash,
|
|
26
27
|
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputCancel::OrHash,
|
|
27
28
|
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputToolResult::OrHash
|
|
@@ -35,7 +35,8 @@ module OpenAI
|
|
|
35
35
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch::OrHash,
|
|
36
36
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling::OrHash,
|
|
37
37
|
OpenAI::Beta::PersistedAgentToolParam::Mcp::OrHash,
|
|
38
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash
|
|
38
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash,
|
|
39
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse::OrHash
|
|
39
40
|
)
|
|
40
41
|
]
|
|
41
42
|
),
|
|
@@ -100,7 +101,8 @@ module OpenAI
|
|
|
100
101
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch::OrHash,
|
|
101
102
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling::OrHash,
|
|
102
103
|
OpenAI::Beta::PersistedAgentToolParam::Mcp::OrHash,
|
|
103
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash
|
|
104
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash,
|
|
105
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse::OrHash
|
|
104
106
|
)
|
|
105
107
|
]
|
|
106
108
|
),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_browser_authentication_cancel_param =
|
|
5
|
+
{ ?action: :cancel, ?type: :browser_authentication }
|
|
6
|
+
|
|
7
|
+
class AgentBrowserAuthenticationCancelParam < OpenAI::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor action: :cancel
|
|
9
|
+
|
|
10
|
+
attr_accessor type: :browser_authentication
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
?action: :cancel,
|
|
14
|
+
?type: :browser_authentication
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> { ?action: :cancel, ?type: :browser_authentication }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_browser_authentication_submit_param =
|
|
5
|
+
{
|
|
6
|
+
?action: :submit,
|
|
7
|
+
fields: ::Array[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field],
|
|
8
|
+
?type: :browser_authentication,
|
|
9
|
+
?selected_option: String?
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class AgentBrowserAuthenticationSubmitParam < OpenAI::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor action: :submit
|
|
14
|
+
|
|
15
|
+
# Values for up to six active fields in the required action. The submitted
|
|
16
|
+
# field-value mapping and selected option must fit within 120 KiB of JSON.
|
|
17
|
+
attr_accessor fields: ::Array[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field]
|
|
18
|
+
|
|
19
|
+
attr_accessor type: :browser_authentication
|
|
20
|
+
|
|
21
|
+
# The chosen method. Required when the required action contains options.
|
|
22
|
+
attr_accessor selected_option: String?
|
|
23
|
+
|
|
24
|
+
# @param fields
|
|
25
|
+
# Values for up to six active fields in the required action. The submitted
|
|
26
|
+
# field-value mapping and selected option must fit within 120 KiB of JSON.
|
|
27
|
+
# @param selected_option
|
|
28
|
+
# The chosen method. Required when the required action contains options.
|
|
29
|
+
def initialize: (
|
|
30
|
+
fields: ::Array[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field],
|
|
31
|
+
?selected_option: String?,
|
|
32
|
+
?action: :submit,
|
|
33
|
+
?type: :browser_authentication
|
|
34
|
+
) -> void
|
|
35
|
+
|
|
36
|
+
def to_hash: -> {
|
|
37
|
+
?action: :submit,
|
|
38
|
+
fields: ::Array[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field],
|
|
39
|
+
?type: :browser_authentication,
|
|
40
|
+
?selected_option: String?
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
type field = { field_id: String, value: String }
|
|
44
|
+
|
|
45
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
46
|
+
# The field ID from the required action.
|
|
47
|
+
attr_accessor field_id: String
|
|
48
|
+
|
|
49
|
+
# The value to enter into the registered control.
|
|
50
|
+
attr_accessor value: String
|
|
51
|
+
|
|
52
|
+
# @param field_id
|
|
53
|
+
# The field ID from the required action.
|
|
54
|
+
# @param value
|
|
55
|
+
# The value to enter into the registered control.
|
|
56
|
+
def initialize: (field_id: String, value: String) -> void
|
|
57
|
+
|
|
58
|
+
def to_hash: -> { field_id: String, value: String }
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_browser_origin_access_param =
|
|
5
|
+
{
|
|
6
|
+
decision: OpenAI::Models::Beta::AgentBrowserOriginAccessParam::decision,
|
|
7
|
+
?type: :browser_origin_access
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class AgentBrowserOriginAccessParam < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
# Whether to allow, deny, or cancel the requested origin access.
|
|
12
|
+
attr_accessor decision: OpenAI::Models::Beta::AgentBrowserOriginAccessParam::decision
|
|
13
|
+
|
|
14
|
+
attr_accessor type: :browser_origin_access
|
|
15
|
+
|
|
16
|
+
# @param decision
|
|
17
|
+
# Whether to allow, deny, or cancel the requested origin access.
|
|
18
|
+
def initialize: (
|
|
19
|
+
decision: OpenAI::Models::Beta::AgentBrowserOriginAccessParam::decision,
|
|
20
|
+
?type: :browser_origin_access
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
decision: OpenAI::Models::Beta::AgentBrowserOriginAccessParam::decision,
|
|
25
|
+
?type: :browser_origin_access
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type decision = :approve | :deny | :cancel
|
|
29
|
+
|
|
30
|
+
module Decision
|
|
31
|
+
extend OpenAI::Internal::Type::Enum
|
|
32
|
+
|
|
33
|
+
# Allow the browser to access this origin.
|
|
34
|
+
APPROVE: :approve
|
|
35
|
+
|
|
36
|
+
# Deny access to this origin.
|
|
37
|
+
DENY: :deny
|
|
38
|
+
|
|
39
|
+
# Dismiss this request without approving access.
|
|
40
|
+
CANCEL: :cancel
|
|
41
|
+
|
|
42
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentBrowserOriginAccessParam::decision]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|