openai 0.96.0 → 0.98.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 +31 -0
- data/README.md +76 -1
- data/lib/openai/helpers/agents/session_stream.rb +60 -3
- data/lib/openai/helpers/beta/agents/artifacts.rb +72 -0
- data/lib/openai/helpers/beta/agents/creation_stream.rb +69 -0
- data/lib/openai/helpers/beta/agents/files.rb +236 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +65 -0
- data/lib/openai/helpers/beta/agents/model_adapter.rb +27 -0
- data/lib/openai/helpers/beta/agents/result.rb +170 -0
- data/lib/openai/helpers/beta/agents/typed_output.rb +191 -0
- data/lib/openai/helpers/live/websocket.rb +7 -1
- data/lib/openai/helpers/realtime/conversation_item_variant_resolver.rb +1 -1
- data/lib/openai/helpers/responses_websocket/connection.rb +7 -1
- data/lib/openai/helpers/responses_websocket/session.rb +5 -1
- data/lib/openai/helpers/responses_websocket/transports/async_websocket.rb +12 -2
- data/lib/openai/internal/transport/base_client.rb +18 -0
- data/lib/openai/internal/type/array_of.rb +1 -1
- data/lib/openai/internal/type/base_model.rb +6 -3
- data/lib/openai/internal/type/converter.rb +50 -3
- data/lib/openai/internal/type/hash_of.rb +1 -1
- data/lib/openai/internal/type/union.rb +6 -6
- 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/agents/sessions/session_trace.rb +64 -0
- data/lib/openai/models/beta/agents/sessions/trace_list_params.rb +68 -0
- data/lib/openai/models/beta/agents/vaults/credential.rb +8 -4
- data/lib/openai/models/beta/beta_response_output_text.rb +2 -2
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +2 -2
- data/lib/openai/models/beta/environment.rb +58 -2
- data/lib/openai/models/beta/environment_param.rb +66 -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/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +1 -0
- data/lib/openai/models/live/fork_server_event.rb +14 -3
- data/lib/openai/models/live/server_event.rb +14 -3
- data/lib/openai/models/realtime/translations/client_secret_create_params.rb +28 -0
- data/lib/openai/models/responses/response_output_text.rb +2 -2
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +2 -2
- data/lib/openai/resources/beta/agents/environments/files.rb +31 -0
- data/lib/openai/resources/beta/agents/environments/templates.rb +9 -2
- data/lib/openai/resources/beta/agents/sessions/artifacts.rb +8 -0
- data/lib/openai/resources/beta/agents/sessions/events.rb +7 -6
- 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/sessions/traces.rb +58 -0
- data/lib/openai/resources/beta/agents/sessions.rb +18 -5
- data/lib/openai/resources/beta/agents.rb +2 -2
- data/lib/openai/resources/evals/runs.rb +1 -1
- data/lib/openai/resources/realtime/translations/client_secrets.rb +58 -0
- data/lib/openai/resources/realtime/translations.rb +20 -0
- data/lib/openai/resources/realtime.rb +4 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +12 -1
- data/rbi/openai/helpers/agents.rbi +20 -1
- data/rbi/openai/helpers/beta/agents/artifacts.rbi +29 -0
- data/rbi/openai/helpers/beta/agents/files.rbi +65 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +40 -0
- data/rbi/openai/helpers/beta/agents/model_adapter.rbi +22 -0
- data/rbi/openai/helpers/beta/agents.rbi +146 -0
- data/rbi/openai/internal/transport/base_client.rbi +12 -0
- data/rbi/openai/internal/type/base_model.rbi +2 -2
- data/rbi/openai/internal/type/converter.rbi +21 -3
- data/rbi/openai/internal/type/union.rbi +6 -2
- 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/agents/sessions/session_trace.rbi +97 -0
- data/rbi/openai/models/beta/agents/sessions/trace_list_params.rbi +121 -0
- data/rbi/openai/models/beta/agents/vaults/credential.rbi +5 -5
- data/rbi/openai/models/beta/beta_response_output_text.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +2 -2
- data/rbi/openai/models/beta/environment.rbi +82 -2
- data/rbi/openai/models/beta/environment_param.rbi +103 -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/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +1 -0
- data/rbi/openai/models/live/fork_server_event.rbi +14 -2
- data/rbi/openai/models/live/server_event.rbi +14 -2
- data/rbi/openai/models/realtime/translations/client_secret_create_params.rbi +68 -0
- data/rbi/openai/models/responses/response_output_text.rbi +2 -2
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +2 -2
- data/rbi/openai/resources/beta/agents/environments/files.rbi +31 -0
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +7 -0
- data/rbi/openai/resources/beta/agents/sessions/artifacts.rbi +8 -0
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +7 -5
- data/rbi/openai/resources/beta/agents/sessions/traces.rbi +54 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +6 -1
- data/rbi/openai/resources/beta/agents.rbi +4 -2
- data/rbi/openai/resources/realtime/translations/client_secrets.rbi +54 -0
- data/rbi/openai/resources/realtime/translations.rbi +22 -0
- data/rbi/openai/resources/realtime.rbi +3 -0
- data/sig/openai/helpers/agents.rbs +7 -0
- data/sig/openai/helpers/beta/agents/artifacts.rbs +20 -0
- data/sig/openai/helpers/beta/agents/files.rbs +41 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +24 -0
- data/sig/openai/helpers/beta/agents/model_adapter.rbs +16 -0
- data/sig/openai/helpers/beta/agents.rbs +71 -0
- data/sig/openai/helpers/structured_output.rbs +12 -0
- data/sig/openai/internal/transport/base_client.rbs +8 -0
- data/sig/openai/internal/type/base_model.rbs +3 -1
- data/sig/openai/internal/type/converter.rbs +16 -2
- data/sig/openai/internal/type/union.rbs +2 -1
- 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/agents/sessions/session_trace.rbs +65 -0
- data/sig/openai/models/beta/agents/sessions/trace_list_params.rbs +81 -0
- data/sig/openai/models/beta/agents/vaults/credential.rbs +5 -5
- data/sig/openai/models/beta/beta_response_output_text.rbs +2 -2
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +2 -2
- data/sig/openai/models/beta/environment.rbs +51 -3
- data/sig/openai/models/beta/environment_param.rbs +64 -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/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +2 -1
- data/sig/openai/models/live/fork_server_event.rbs +17 -2
- data/sig/openai/models/live/server_event.rbs +17 -2
- data/sig/openai/models/realtime/translations/client_secret_create_params.rbs +39 -0
- data/sig/openai/models/responses/response_output_text.rbs +2 -2
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +2 -2
- data/sig/openai/resources/beta/agents/environments/files.rbs +17 -0
- data/sig/openai/resources/beta/agents/environments/templates.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions/artifacts.rbs +4 -0
- data/sig/openai/resources/beta/agents/sessions/traces.rbs +21 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -1
- data/sig/openai/resources/realtime/translations/client_secrets.rbs +17 -0
- data/sig/openai/resources/realtime/translations.rbs +11 -0
- data/sig/openai/resources/realtime.rbs +2 -0
- metadata +46 -1
|
@@ -162,6 +162,14 @@ module OpenAI
|
|
|
162
162
|
OpenAI::Internal::Transport::BaseClient::request_components req
|
|
163
163
|
) -> top
|
|
164
164
|
|
|
165
|
+
# @api private
|
|
166
|
+
def request_streaming_body: (
|
|
167
|
+
request_components req,
|
|
168
|
+
?(^-> untyped)? on_response
|
|
169
|
+
) {
|
|
170
|
+
(String chunk) -> untyped
|
|
171
|
+
} -> void
|
|
172
|
+
|
|
165
173
|
private def perform_request: (
|
|
166
174
|
OpenAI::Internal::Transport::BaseClient::request_components req
|
|
167
175
|
) ?{
|
|
@@ -13,7 +13,9 @@ module OpenAI
|
|
|
13
13
|
def self.known_fields: -> ::Hash[Symbol, (OpenAI::Internal::Type::BaseModel::known_field
|
|
14
14
|
& { type_fn: (^-> OpenAI::Internal::Type::Converter::input) })]
|
|
15
15
|
|
|
16
|
-
def self.fields:
|
|
16
|
+
def self.fields: (
|
|
17
|
+
?state: OpenAI::Internal::Type::Converter::coerce_state?
|
|
18
|
+
) -> ::Hash[Symbol, (OpenAI::Internal::Type::BaseModel::known_field
|
|
17
19
|
& { type: OpenAI::Internal::Type::Converter::input })]
|
|
18
20
|
|
|
19
21
|
private def self.add_field: (
|
|
@@ -13,7 +13,8 @@ module OpenAI
|
|
|
13
13
|
strictness: bool,
|
|
14
14
|
exactness: { yes: Integer, no: Integer, maybe: Integer },
|
|
15
15
|
error: StandardError?,
|
|
16
|
-
branched: Integer
|
|
16
|
+
branched: Integer,
|
|
17
|
+
memo: Hash[untyped, untyped]?
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
type dump_state = { can_retry: bool }
|
|
@@ -59,7 +60,8 @@ module OpenAI
|
|
|
59
60
|
|
|
60
61
|
def self.new_coerce_state: (
|
|
61
62
|
?translate_names: bool,
|
|
62
|
-
?request_only: bool
|
|
63
|
+
?request_only: bool,
|
|
64
|
+
?memoize: bool
|
|
63
65
|
) -> OpenAI::Internal::Type::Converter::coerce_state
|
|
64
66
|
|
|
65
67
|
def self.coerce: (
|
|
@@ -68,6 +70,18 @@ module OpenAI
|
|
|
68
70
|
?state: OpenAI::Internal::Type::Converter::coerce_state
|
|
69
71
|
) -> top
|
|
70
72
|
|
|
73
|
+
# @api private
|
|
74
|
+
def self.resolve_type: (
|
|
75
|
+
^-> untyped type_fn,
|
|
76
|
+
?state: coerce_state?
|
|
77
|
+
) -> untyped
|
|
78
|
+
|
|
79
|
+
def self.coerce_cached: (
|
|
80
|
+
OpenAI::Internal::Type::Converter target,
|
|
81
|
+
Hash[untyped, untyped] | Array[untyped] value,
|
|
82
|
+
state: OpenAI::Internal::Type::Converter::coerce_state
|
|
83
|
+
) -> untyped
|
|
84
|
+
|
|
71
85
|
def self.coerce_with_error: (
|
|
72
86
|
OpenAI::Internal::Type::Converter::input target,
|
|
73
87
|
top value,
|
|
@@ -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
|
|
@@ -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
|