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
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
class AgentBrowserAuthenticationSubmitParam < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Beta::AgentBrowserAuthenticationSubmitParam,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(Symbol) }
|
|
18
|
+
attr_accessor :action
|
|
19
|
+
|
|
20
|
+
# Values for up to six active fields in the required action. The submitted
|
|
21
|
+
# field-value mapping and selected option must fit within 120 KiB of JSON.
|
|
22
|
+
sig { returns(T::Array[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field]) }
|
|
23
|
+
attr_accessor :fields
|
|
24
|
+
|
|
25
|
+
sig { returns(Symbol) }
|
|
26
|
+
attr_accessor :type
|
|
27
|
+
|
|
28
|
+
# The chosen method. Required when the required action contains options.
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
|
+
attr_accessor :selected_option
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
|
|
35
|
+
fields: T::Array[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field::OrHash],
|
|
36
|
+
|
|
37
|
+
selected_option: T.nilable(String),
|
|
38
|
+
|
|
39
|
+
action: Symbol,
|
|
40
|
+
|
|
41
|
+
type: Symbol
|
|
42
|
+
)
|
|
43
|
+
.returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
|
|
47
|
+
# Values for up to six active fields in the required action. The submitted
|
|
48
|
+
# field-value mapping and selected option must fit within 120 KiB of JSON.
|
|
49
|
+
fields:,
|
|
50
|
+
|
|
51
|
+
# The chosen method. Required when the required action contains options.
|
|
52
|
+
selected_option: nil,
|
|
53
|
+
|
|
54
|
+
action: :submit,
|
|
55
|
+
|
|
56
|
+
type: :browser_authentication
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
override.returns(
|
|
62
|
+
{
|
|
63
|
+
action: Symbol,
|
|
64
|
+
fields: T::Array[OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field],
|
|
65
|
+
type: Symbol,
|
|
66
|
+
selected_option: T.nilable(String)
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
def to_hash
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
74
|
+
OrHash = T.type_alias do
|
|
75
|
+
T.any(
|
|
76
|
+
OpenAI::Beta::AgentBrowserAuthenticationSubmitParam::Field,
|
|
77
|
+
OpenAI::Internal::AnyHash
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# The field ID from the required action.
|
|
82
|
+
sig { returns(String) }
|
|
83
|
+
attr_accessor :field_id
|
|
84
|
+
|
|
85
|
+
# The value to enter into the registered control.
|
|
86
|
+
sig { returns(String) }
|
|
87
|
+
attr_accessor :value
|
|
88
|
+
|
|
89
|
+
# One user-entered value, including non-password fields such as an email address.
|
|
90
|
+
sig do
|
|
91
|
+
params(
|
|
92
|
+
|
|
93
|
+
field_id: String,
|
|
94
|
+
|
|
95
|
+
value: String
|
|
96
|
+
)
|
|
97
|
+
.returns(T.attached_class)
|
|
98
|
+
end
|
|
99
|
+
def self.new(
|
|
100
|
+
|
|
101
|
+
# The field ID from the required action.
|
|
102
|
+
field_id:,
|
|
103
|
+
|
|
104
|
+
# The value to enter into the registered control.
|
|
105
|
+
|
|
106
|
+
value:
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
sig do
|
|
111
|
+
override.returns(
|
|
112
|
+
{field_id: String, value: String}
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
def to_hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
end
|
|
125
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
class AgentBrowserOriginAccessParam < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Beta::AgentBrowserOriginAccessParam,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Whether to allow, deny, or cancel the requested origin access.
|
|
18
|
+
sig { returns(OpenAI::Beta::AgentBrowserOriginAccessParam::Decision::OrSymbol) }
|
|
19
|
+
attr_accessor :decision
|
|
20
|
+
|
|
21
|
+
sig { returns(Symbol) }
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
|
|
27
|
+
decision: OpenAI::Beta::AgentBrowserOriginAccessParam::Decision::OrSymbol,
|
|
28
|
+
|
|
29
|
+
type: Symbol
|
|
30
|
+
)
|
|
31
|
+
.returns(T.attached_class)
|
|
32
|
+
end
|
|
33
|
+
def self.new(
|
|
34
|
+
|
|
35
|
+
# Whether to allow, deny, or cancel the requested origin access.
|
|
36
|
+
decision:,
|
|
37
|
+
|
|
38
|
+
type: :browser_origin_access
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
override.returns(
|
|
44
|
+
{decision: OpenAI::Beta::AgentBrowserOriginAccessParam::Decision::OrSymbol, type: Symbol}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Whether to allow, deny, or cancel the requested origin access.
|
|
51
|
+
module Decision
|
|
52
|
+
extend OpenAI::Internal::Type::Enum
|
|
53
|
+
|
|
54
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::AgentBrowserOriginAccessParam::Decision) }
|
|
55
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
56
|
+
|
|
57
|
+
# Allow the browser to access this origin.
|
|
58
|
+
APPROVE = T.let(:approve, OpenAI::Beta::AgentBrowserOriginAccessParam::Decision::TaggedSymbol)
|
|
59
|
+
|
|
60
|
+
# Deny access to this origin.
|
|
61
|
+
DENY = T.let(:deny, OpenAI::Beta::AgentBrowserOriginAccessParam::Decision::TaggedSymbol)
|
|
62
|
+
|
|
63
|
+
# Dismiss this request without approving access.
|
|
64
|
+
CANCEL = T.let(:cancel, OpenAI::Beta::AgentBrowserOriginAccessParam::Decision::TaggedSymbol)
|
|
65
|
+
|
|
66
|
+
sig { override.returns(T::Array[OpenAI::Beta::AgentBrowserOriginAccessParam::Decision::TaggedSymbol]) }
|
|
67
|
+
def self.values
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -72,7 +72,8 @@ module OpenAI
|
|
|
72
72
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch,
|
|
73
73
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling,
|
|
74
74
|
OpenAI::Beta::PersistedAgentToolParam::Mcp,
|
|
75
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch
|
|
75
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch,
|
|
76
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse
|
|
76
77
|
)
|
|
77
78
|
]
|
|
78
79
|
)
|
|
@@ -106,7 +107,8 @@ module OpenAI
|
|
|
106
107
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch::OrHash,
|
|
107
108
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling::OrHash,
|
|
108
109
|
OpenAI::Beta::PersistedAgentToolParam::Mcp::OrHash,
|
|
109
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash
|
|
110
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash,
|
|
111
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse::OrHash
|
|
110
112
|
)
|
|
111
113
|
]
|
|
112
114
|
),
|
|
@@ -170,7 +172,8 @@ module OpenAI
|
|
|
170
172
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch,
|
|
171
173
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling,
|
|
172
174
|
OpenAI::Beta::PersistedAgentToolParam::Mcp,
|
|
173
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch
|
|
175
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch,
|
|
176
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse
|
|
174
177
|
)
|
|
175
178
|
]
|
|
176
179
|
),
|
|
@@ -15,6 +15,8 @@ module OpenAI
|
|
|
15
15
|
OpenAI::Beta::AgentReasoningItem,
|
|
16
16
|
OpenAI::Beta::AgentFunctionCallItem,
|
|
17
17
|
OpenAI::Beta::AgentMcpCallItem,
|
|
18
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseCall,
|
|
19
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest,
|
|
18
20
|
OpenAI::Beta::AgentWebSearchCallItem,
|
|
19
21
|
OpenAI::Beta::AgentCommandExecutionItem,
|
|
20
22
|
OpenAI::Beta::AgentCreateSubagentCallItem,
|
|
@@ -26,6 +28,426 @@ module OpenAI
|
|
|
26
28
|
)
|
|
27
29
|
end
|
|
28
30
|
|
|
31
|
+
class ComputerUseCall < OpenAI::Internal::Type::BaseModel
|
|
32
|
+
OrHash = T.type_alias do
|
|
33
|
+
T.any(
|
|
34
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseCall,
|
|
35
|
+
OpenAI::Internal::AnyHash
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# The ID of the activity item.
|
|
40
|
+
sig { returns(String) }
|
|
41
|
+
attr_accessor :id
|
|
42
|
+
|
|
43
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
44
|
+
# disabled or the call emitted no screenshot.
|
|
45
|
+
sig { returns(T.nilable(OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output)) }
|
|
46
|
+
attr_reader :output
|
|
47
|
+
|
|
48
|
+
sig { params(output: T.nilable(OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output::OrHash)).void }
|
|
49
|
+
attr_writer :output
|
|
50
|
+
|
|
51
|
+
# The execution status of the activity.
|
|
52
|
+
sig { returns(OpenAI::Beta::AgentFunctionCallStatus::TaggedSymbol) }
|
|
53
|
+
attr_accessor :status
|
|
54
|
+
|
|
55
|
+
# A model-generated description of the activity, when available.
|
|
56
|
+
sig { returns(T.nilable(String)) }
|
|
57
|
+
attr_accessor :title
|
|
58
|
+
|
|
59
|
+
# The ID of the turn that contains this item.
|
|
60
|
+
sig { returns(String) }
|
|
61
|
+
attr_accessor :turn_id
|
|
62
|
+
|
|
63
|
+
# The item type. Always `computer_use_call`.
|
|
64
|
+
sig { returns(Symbol) }
|
|
65
|
+
attr_accessor :type
|
|
66
|
+
|
|
67
|
+
# One execution of the platform-provided computer-use capability.
|
|
68
|
+
sig do
|
|
69
|
+
params(
|
|
70
|
+
|
|
71
|
+
id: String,
|
|
72
|
+
|
|
73
|
+
output: T.nilable(OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output::OrHash),
|
|
74
|
+
|
|
75
|
+
status: OpenAI::Beta::AgentFunctionCallStatus::OrSymbol,
|
|
76
|
+
|
|
77
|
+
title: T.nilable(String),
|
|
78
|
+
|
|
79
|
+
turn_id: String,
|
|
80
|
+
|
|
81
|
+
type: Symbol
|
|
82
|
+
)
|
|
83
|
+
.returns(T.attached_class)
|
|
84
|
+
end
|
|
85
|
+
def self.new(
|
|
86
|
+
|
|
87
|
+
# The ID of the activity item.
|
|
88
|
+
id:,
|
|
89
|
+
|
|
90
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
91
|
+
# disabled or the call emitted no screenshot.
|
|
92
|
+
output:,
|
|
93
|
+
|
|
94
|
+
# The execution status of the activity.
|
|
95
|
+
status:,
|
|
96
|
+
|
|
97
|
+
# A model-generated description of the activity, when available.
|
|
98
|
+
title:,
|
|
99
|
+
|
|
100
|
+
# The ID of the turn that contains this item.
|
|
101
|
+
turn_id:,
|
|
102
|
+
|
|
103
|
+
# The item type. Always `computer_use_call`.
|
|
104
|
+
|
|
105
|
+
type: :computer_use_call
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
sig do
|
|
110
|
+
override.returns(
|
|
111
|
+
{
|
|
112
|
+
id: String,
|
|
113
|
+
output: T.nilable(OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output),
|
|
114
|
+
status: OpenAI::Beta::AgentFunctionCallStatus::TaggedSymbol,
|
|
115
|
+
title: T.nilable(String),
|
|
116
|
+
turn_id: String,
|
|
117
|
+
type: Symbol
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
def to_hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
125
|
+
OrHash = T.type_alias do
|
|
126
|
+
T.any(
|
|
127
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseCall::Output,
|
|
128
|
+
OpenAI::Internal::AnyHash
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# The complete JPEG image as a base64 data URL.
|
|
133
|
+
sig { returns(String) }
|
|
134
|
+
attr_accessor :image_url
|
|
135
|
+
|
|
136
|
+
# The content type. Always `computer_screenshot`.
|
|
137
|
+
sig { returns(Symbol) }
|
|
138
|
+
attr_accessor :type
|
|
139
|
+
|
|
140
|
+
# The last screenshot emitted by the model. Null when screenshot inclusion is
|
|
141
|
+
# disabled or the call emitted no screenshot.
|
|
142
|
+
sig do
|
|
143
|
+
params(
|
|
144
|
+
|
|
145
|
+
image_url: String,
|
|
146
|
+
|
|
147
|
+
type: Symbol
|
|
148
|
+
)
|
|
149
|
+
.returns(T.attached_class)
|
|
150
|
+
end
|
|
151
|
+
def self.new(
|
|
152
|
+
|
|
153
|
+
# The complete JPEG image as a base64 data URL.
|
|
154
|
+
image_url:,
|
|
155
|
+
|
|
156
|
+
# The content type. Always `computer_screenshot`.
|
|
157
|
+
|
|
158
|
+
type: :computer_screenshot
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
sig do
|
|
163
|
+
override.returns(
|
|
164
|
+
{image_url: String, type: Symbol}
|
|
165
|
+
)
|
|
166
|
+
end
|
|
167
|
+
def to_hash
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
class ComputerUseApprovalRequest < OpenAI::Internal::Type::BaseModel
|
|
174
|
+
OrHash = T.type_alias do
|
|
175
|
+
T.any(
|
|
176
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest,
|
|
177
|
+
OpenAI::Internal::AnyHash
|
|
178
|
+
)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# The stable history item ID.
|
|
182
|
+
sig { returns(String) }
|
|
183
|
+
attr_accessor :id
|
|
184
|
+
|
|
185
|
+
# A registered form awaiting the application's response.
|
|
186
|
+
sig { returns(OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request) }
|
|
187
|
+
attr_reader :request
|
|
188
|
+
|
|
189
|
+
sig { params(request: OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::OrHash).void }
|
|
190
|
+
attr_writer :request
|
|
191
|
+
|
|
192
|
+
sig { returns(String) }
|
|
193
|
+
attr_accessor :request_id
|
|
194
|
+
|
|
195
|
+
sig { returns(String) }
|
|
196
|
+
attr_accessor :turn_id
|
|
197
|
+
|
|
198
|
+
# The item type. Always computer_use_approval_request.
|
|
199
|
+
sig { returns(Symbol) }
|
|
200
|
+
attr_accessor :type
|
|
201
|
+
|
|
202
|
+
# A credential-free history record of the emitted login request.
|
|
203
|
+
sig do
|
|
204
|
+
params(
|
|
205
|
+
|
|
206
|
+
id: String,
|
|
207
|
+
|
|
208
|
+
request: OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::OrHash,
|
|
209
|
+
|
|
210
|
+
request_id: String,
|
|
211
|
+
|
|
212
|
+
turn_id: String,
|
|
213
|
+
|
|
214
|
+
type: Symbol
|
|
215
|
+
)
|
|
216
|
+
.returns(T.attached_class)
|
|
217
|
+
end
|
|
218
|
+
def self.new(
|
|
219
|
+
|
|
220
|
+
# The stable history item ID.
|
|
221
|
+
id:,
|
|
222
|
+
|
|
223
|
+
# A registered form awaiting the application's response.
|
|
224
|
+
request:,
|
|
225
|
+
|
|
226
|
+
request_id:,
|
|
227
|
+
|
|
228
|
+
turn_id:,
|
|
229
|
+
|
|
230
|
+
# The item type. Always computer_use_approval_request.
|
|
231
|
+
|
|
232
|
+
type: :computer_use_approval_request
|
|
233
|
+
)
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
sig do
|
|
237
|
+
override.returns(
|
|
238
|
+
{
|
|
239
|
+
id: String,
|
|
240
|
+
request: OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request,
|
|
241
|
+
request_id: String,
|
|
242
|
+
turn_id: String,
|
|
243
|
+
type: Symbol
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
end
|
|
247
|
+
def to_hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
class Request < OpenAI::Internal::Type::BaseModel
|
|
251
|
+
OrHash = T.type_alias do
|
|
252
|
+
T.any(
|
|
253
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request,
|
|
254
|
+
OpenAI::Internal::AnyHash
|
|
255
|
+
)
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# The registered form or frame origin where values will be entered.
|
|
259
|
+
sig { returns(T.nilable(String)) }
|
|
260
|
+
attr_accessor :credential_origin
|
|
261
|
+
|
|
262
|
+
# Controls to render. All submitted values are sensitive.
|
|
263
|
+
sig { returns(T::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field]) }
|
|
264
|
+
attr_accessor :fields
|
|
265
|
+
|
|
266
|
+
# Sign-in methods. Empty for a plain form.
|
|
267
|
+
sig { returns(T::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option]) }
|
|
268
|
+
attr_accessor :options
|
|
269
|
+
|
|
270
|
+
# Why the agent needs the user to sign in.
|
|
271
|
+
sig { returns(T.nilable(String)) }
|
|
272
|
+
attr_accessor :reason
|
|
273
|
+
|
|
274
|
+
# The type of the object. Always `browser_authentication`.
|
|
275
|
+
sig { returns(Symbol) }
|
|
276
|
+
attr_accessor :type
|
|
277
|
+
|
|
278
|
+
# A registered form awaiting the application's response.
|
|
279
|
+
sig do
|
|
280
|
+
params(
|
|
281
|
+
|
|
282
|
+
credential_origin: T.nilable(String),
|
|
283
|
+
|
|
284
|
+
fields: T::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field::OrHash],
|
|
285
|
+
|
|
286
|
+
options: T::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option::OrHash],
|
|
287
|
+
|
|
288
|
+
reason: T.nilable(String),
|
|
289
|
+
|
|
290
|
+
type: Symbol
|
|
291
|
+
)
|
|
292
|
+
.returns(T.attached_class)
|
|
293
|
+
end
|
|
294
|
+
def self.new(
|
|
295
|
+
|
|
296
|
+
# The registered form or frame origin where values will be entered.
|
|
297
|
+
credential_origin:,
|
|
298
|
+
|
|
299
|
+
# Controls to render. All submitted values are sensitive.
|
|
300
|
+
fields:,
|
|
301
|
+
|
|
302
|
+
# Sign-in methods. Empty for a plain form.
|
|
303
|
+
options:,
|
|
304
|
+
|
|
305
|
+
# Why the agent needs the user to sign in.
|
|
306
|
+
reason:,
|
|
307
|
+
|
|
308
|
+
# The type of the object. Always `browser_authentication`.
|
|
309
|
+
|
|
310
|
+
type: :browser_authentication
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
sig do
|
|
315
|
+
override.returns(
|
|
316
|
+
{
|
|
317
|
+
credential_origin: T.nilable(String),
|
|
318
|
+
fields: T::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field],
|
|
319
|
+
options: T::Array[OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option],
|
|
320
|
+
reason: T.nilable(String),
|
|
321
|
+
type: Symbol
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
end
|
|
325
|
+
def to_hash
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
class Field < OpenAI::Internal::Type::BaseModel
|
|
329
|
+
OrHash = T.type_alias do
|
|
330
|
+
T.any(
|
|
331
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Field,
|
|
332
|
+
OpenAI::Internal::AnyHash
|
|
333
|
+
)
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# The field ID to submit as field_id in a fields entry.
|
|
337
|
+
sig { returns(String) }
|
|
338
|
+
attr_accessor :id
|
|
339
|
+
|
|
340
|
+
# The label to display beside the control.
|
|
341
|
+
sig { returns(String) }
|
|
342
|
+
attr_accessor :label
|
|
343
|
+
|
|
344
|
+
# Whether this control requires a nonempty value.
|
|
345
|
+
sig { returns(T::Boolean) }
|
|
346
|
+
attr_accessor :required
|
|
347
|
+
|
|
348
|
+
# The rendering type, such as email, password, or text.
|
|
349
|
+
sig { returns(String) }
|
|
350
|
+
attr_accessor :type
|
|
351
|
+
|
|
352
|
+
# A control in a registered browser-login form.
|
|
353
|
+
sig do
|
|
354
|
+
params(
|
|
355
|
+
|
|
356
|
+
id: String,
|
|
357
|
+
|
|
358
|
+
label: String,
|
|
359
|
+
|
|
360
|
+
required: T::Boolean,
|
|
361
|
+
|
|
362
|
+
type: String
|
|
363
|
+
)
|
|
364
|
+
.returns(T.attached_class)
|
|
365
|
+
end
|
|
366
|
+
def self.new(
|
|
367
|
+
|
|
368
|
+
# The field ID to submit as field_id in a fields entry.
|
|
369
|
+
id:,
|
|
370
|
+
|
|
371
|
+
# The label to display beside the control.
|
|
372
|
+
label:,
|
|
373
|
+
|
|
374
|
+
# Whether this control requires a nonempty value.
|
|
375
|
+
required:,
|
|
376
|
+
|
|
377
|
+
# The rendering type, such as email, password, or text.
|
|
378
|
+
|
|
379
|
+
type:
|
|
380
|
+
)
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
sig do
|
|
384
|
+
override.returns(
|
|
385
|
+
{id: String, label: String, required: T::Boolean, type: String}
|
|
386
|
+
)
|
|
387
|
+
end
|
|
388
|
+
def to_hash
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
class Option < OpenAI::Internal::Type::BaseModel
|
|
394
|
+
OrHash = T.type_alias do
|
|
395
|
+
T.any(
|
|
396
|
+
OpenAI::Beta::AgentOutputItem::ComputerUseApprovalRequest::Request::Option,
|
|
397
|
+
OpenAI::Internal::AnyHash
|
|
398
|
+
)
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# The option ID to submit as selected_option.
|
|
402
|
+
sig { returns(String) }
|
|
403
|
+
attr_accessor :id
|
|
404
|
+
|
|
405
|
+
# IDs from the registered fields that this method accepts.
|
|
406
|
+
sig { returns(T::Array[String]) }
|
|
407
|
+
attr_accessor :field_ids
|
|
408
|
+
|
|
409
|
+
# The method label to display.
|
|
410
|
+
sig { returns(String) }
|
|
411
|
+
attr_accessor :label
|
|
412
|
+
|
|
413
|
+
# A sign-in method and the fields that belong to it.
|
|
414
|
+
sig do
|
|
415
|
+
params(
|
|
416
|
+
|
|
417
|
+
id: String,
|
|
418
|
+
|
|
419
|
+
field_ids: T::Array[String],
|
|
420
|
+
|
|
421
|
+
label: String
|
|
422
|
+
)
|
|
423
|
+
.returns(T.attached_class)
|
|
424
|
+
end
|
|
425
|
+
def self.new(
|
|
426
|
+
|
|
427
|
+
# The option ID to submit as selected_option.
|
|
428
|
+
id:,
|
|
429
|
+
|
|
430
|
+
# IDs from the registered fields that this method accepts.
|
|
431
|
+
field_ids:,
|
|
432
|
+
|
|
433
|
+
# The method label to display.
|
|
434
|
+
|
|
435
|
+
label:
|
|
436
|
+
)
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
sig do
|
|
440
|
+
override.returns(
|
|
441
|
+
{id: String, field_ids: T::Array[String], label: String}
|
|
442
|
+
)
|
|
443
|
+
end
|
|
444
|
+
def to_hash
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
end
|
|
448
|
+
end
|
|
449
|
+
end
|
|
450
|
+
|
|
29
451
|
sig { override.returns(T::Array[OpenAI::Beta::AgentOutputItem::Variants]) }
|
|
30
452
|
def self.variants
|
|
31
453
|
end
|