openai 0.101.1 → 0.103.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 +14 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agent_session_environment_expired_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_environment_state.rb +6 -0
- data/lib/openai/models/beta/agent_session_environment_suspended_event.rb +57 -0
- data/lib/openai/models/beta/agent_session_event.rb +7 -1
- data/lib/openai/models/beta/agents/environment_create_params.rb +300 -0
- data/lib/openai/models/beta/agents/environment_info.rb +7 -1
- data/lib/openai/models/beta/agents/environment_list_params.rb +78 -0
- data/lib/openai/models/beta/environment_param.rb +12 -1
- data/lib/openai/models/webhooks/agent_environment_expired_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/agent_environment_failed_webhook_event.rb +73 -0
- data/lib/openai/models/webhooks/agent_environment_ready_webhook_event.rb +73 -0
- data/lib/openai/models/webhooks/agent_environment_suspended_webhook_event.rb +72 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +14 -3
- data/lib/openai/models/webhooks/webhook_create_params.rb +4 -0
- data/lib/openai/models/webhooks/webhook_test_params.rb +4 -0
- data/lib/openai/models/webhooks/webhook_update_params.rb +4 -0
- data/lib/openai/resources/beta/agents/environments/files.rb +4 -2
- data/lib/openai/resources/beta/agents/environments/templates.rb +10 -5
- data/lib/openai/resources/beta/agents/environments.rb +80 -1
- data/lib/openai/resources/beta/agents/sessions/artifacts.rb +8 -5
- data/lib/openai/resources/beta/agents/sessions/events.rb +11 -5
- data/lib/openai/resources/beta/agents/sessions/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/turns/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/turns.rb +4 -2
- data/lib/openai/resources/beta/agents/sessions/subagents.rb +4 -2
- data/lib/openai/resources/beta/agents/sessions/traces.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/turns/items.rb +2 -1
- data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -2
- data/lib/openai/resources/beta/agents/sessions.rb +16 -7
- data/lib/openai/resources/beta/agents/vaults/credentials.rb +10 -5
- data/lib/openai/resources/beta/agents/vaults.rb +8 -4
- data/lib/openai/resources/beta/agents.rb +10 -5
- data/lib/openai/resources/beta/assistants.rb +10 -5
- data/lib/openai/resources/beta/chatkit/sessions.rb +4 -2
- data/lib/openai/resources/beta/chatkit/threads.rb +8 -4
- data/lib/openai/resources/beta/threads/messages.rb +10 -5
- data/lib/openai/resources/beta/threads/runs/steps.rb +4 -2
- data/lib/openai/resources/beta/threads/runs.rb +24 -10
- data/lib/openai/resources/beta/threads.rb +16 -7
- data/lib/openai/resources/vector_stores/file_batches.rb +8 -10
- data/lib/openai/resources/vector_stores/files.rb +12 -12
- data/lib/openai/resources/vector_stores.rb +12 -6
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +8 -0
- data/rbi/openai/models/beta/agent_session_environment_expired_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_environment_state.rbi +6 -0
- data/rbi/openai/models/beta/agent_session_environment_suspended_event.rbi +95 -0
- data/rbi/openai/models/beta/agent_session_event.rbi +2 -0
- data/rbi/openai/models/beta/agents/environment_create_params.rbi +499 -0
- data/rbi/openai/models/beta/agents/environment_info.rbi +6 -0
- data/rbi/openai/models/beta/agents/environment_list_params.rbi +136 -0
- data/rbi/openai/models/beta/environment_param.rbi +15 -0
- data/rbi/openai/models/webhooks/agent_environment_expired_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/agent_environment_failed_webhook_event.rbi +134 -0
- data/rbi/openai/models/webhooks/agent_environment_ready_webhook_event.rbi +134 -0
- data/rbi/openai/models/webhooks/agent_environment_suspended_webhook_event.rbi +133 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +5 -2
- data/rbi/openai/models/webhooks/webhook_create_params.rbi +16 -0
- data/rbi/openai/models/webhooks/webhook_test_params.rbi +16 -0
- data/rbi/openai/models/webhooks/webhook_update_params.rbi +16 -0
- data/rbi/openai/resources/beta/agents/environments.rbi +53 -0
- data/rbi/openai/resources/webhooks.rbi +4 -0
- data/sig/openai/models/beta/agent_session_environment_expired_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_environment_state.rbs +14 -1
- data/sig/openai/models/beta/agent_session_environment_suspended_event.rbs +57 -0
- data/sig/openai/models/beta/agent_session_event.rbs +2 -0
- data/sig/openai/models/beta/agents/environment_create_params.rbs +268 -0
- data/sig/openai/models/beta/agents/environment_info.rbs +15 -1
- data/sig/openai/models/beta/agents/environment_list_params.rbs +97 -0
- data/sig/openai/models/beta/environment_param.rbs +14 -0
- data/sig/openai/models/webhooks/agent_environment_expired_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/agent_environment_failed_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/agent_environment_ready_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/agent_environment_suspended_webhook_event.rbs +70 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +5 -1
- data/sig/openai/models/webhooks/webhook_create_params.rbs +8 -0
- data/sig/openai/models/webhooks/webhook_test_params.rbs +8 -0
- data/sig/openai/models/webhooks/webhook_update_params.rbs +8 -0
- data/sig/openai/resources/beta/agents/environments.rbs +15 -0
- data/sig/openai/resources/webhooks.rbs +5 -1
- metadata +25 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_session_environment_expired_event =
|
|
5
|
+
{
|
|
6
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
7
|
+
event_id: String,
|
|
8
|
+
session_id: String,
|
|
9
|
+
turn_id: String?,
|
|
10
|
+
?type: :"agent.session.environment.expired"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class AgentSessionEnvironmentExpiredEvent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The current environment state.
|
|
15
|
+
attr_accessor environment: OpenAI::Beta::AgentSessionEnvironmentState
|
|
16
|
+
|
|
17
|
+
# The unique ID of the event.
|
|
18
|
+
attr_accessor event_id: String
|
|
19
|
+
|
|
20
|
+
# The ID of the session associated with the event.
|
|
21
|
+
attr_accessor session_id: String
|
|
22
|
+
|
|
23
|
+
# The ID of the turn associated with the event, when applicable.
|
|
24
|
+
attr_accessor turn_id: String?
|
|
25
|
+
|
|
26
|
+
# The type of the object. Always `agent.session.environment.expired`.
|
|
27
|
+
attr_accessor type: :"agent.session.environment.expired"
|
|
28
|
+
|
|
29
|
+
# @param environment
|
|
30
|
+
# The current environment state.
|
|
31
|
+
# @param event_id
|
|
32
|
+
# The unique ID of the event.
|
|
33
|
+
# @param session_id
|
|
34
|
+
# The ID of the session associated with the event.
|
|
35
|
+
# @param turn_id
|
|
36
|
+
# The ID of the turn associated with the event, when applicable.
|
|
37
|
+
# @param type
|
|
38
|
+
# The type of the object. Always `agent.session.environment.expired`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
41
|
+
event_id: String,
|
|
42
|
+
session_id: String,
|
|
43
|
+
turn_id: String?,
|
|
44
|
+
?type: :"agent.session.environment.expired"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
49
|
+
event_id: String,
|
|
50
|
+
session_id: String,
|
|
51
|
+
turn_id: String?,
|
|
52
|
+
?type: :"agent.session.environment.expired"
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -67,7 +67,14 @@ module OpenAI
|
|
|
67
67
|
def to_hash: -> { code: String, message: String, type: String }
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
type status =
|
|
70
|
+
type status =
|
|
71
|
+
:pending
|
|
72
|
+
| :ready
|
|
73
|
+
| :connected
|
|
74
|
+
| :disconnected
|
|
75
|
+
| :suspended
|
|
76
|
+
| :expired
|
|
77
|
+
| :failed
|
|
71
78
|
|
|
72
79
|
module Status
|
|
73
80
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -84,6 +91,12 @@ module OpenAI
|
|
|
84
91
|
# The environment is disconnected.
|
|
85
92
|
DISCONNECTED: :disconnected
|
|
86
93
|
|
|
94
|
+
# The environment is stopped and can be resumed from its private checkpoint.
|
|
95
|
+
SUSPENDED: :suspended
|
|
96
|
+
|
|
97
|
+
# The environment and its private checkpoint have expired.
|
|
98
|
+
EXPIRED: :expired
|
|
99
|
+
|
|
87
100
|
# The environment failed to connect.
|
|
88
101
|
FAILED: :failed
|
|
89
102
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
type agent_session_environment_suspended_event =
|
|
5
|
+
{
|
|
6
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
7
|
+
event_id: String,
|
|
8
|
+
session_id: String,
|
|
9
|
+
turn_id: String?,
|
|
10
|
+
?type: :"agent.session.environment.suspended"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class AgentSessionEnvironmentSuspendedEvent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The current environment state.
|
|
15
|
+
attr_accessor environment: OpenAI::Beta::AgentSessionEnvironmentState
|
|
16
|
+
|
|
17
|
+
# The unique ID of the event.
|
|
18
|
+
attr_accessor event_id: String
|
|
19
|
+
|
|
20
|
+
# The ID of the session associated with the event.
|
|
21
|
+
attr_accessor session_id: String
|
|
22
|
+
|
|
23
|
+
# The ID of the turn associated with the event, when applicable.
|
|
24
|
+
attr_accessor turn_id: String?
|
|
25
|
+
|
|
26
|
+
# The type of the object. Always `agent.session.environment.suspended`.
|
|
27
|
+
attr_accessor type: :"agent.session.environment.suspended"
|
|
28
|
+
|
|
29
|
+
# @param environment
|
|
30
|
+
# The current environment state.
|
|
31
|
+
# @param event_id
|
|
32
|
+
# The unique ID of the event.
|
|
33
|
+
# @param session_id
|
|
34
|
+
# The ID of the session associated with the event.
|
|
35
|
+
# @param turn_id
|
|
36
|
+
# The ID of the turn associated with the event, when applicable.
|
|
37
|
+
# @param type
|
|
38
|
+
# The type of the object. Always `agent.session.environment.suspended`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
41
|
+
event_id: String,
|
|
42
|
+
session_id: String,
|
|
43
|
+
turn_id: String?,
|
|
44
|
+
?type: :"agent.session.environment.suspended"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
environment: OpenAI::Beta::AgentSessionEnvironmentState,
|
|
49
|
+
event_id: String,
|
|
50
|
+
session_id: String,
|
|
51
|
+
turn_id: String?,
|
|
52
|
+
?type: :"agent.session.environment.suspended"
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -4,6 +4,8 @@ module OpenAI
|
|
|
4
4
|
type agent_session_event =
|
|
5
5
|
OpenAI::Beta::AgentSessionErrorEvent
|
|
6
6
|
| OpenAI::Beta::AgentSessionEnvironmentReadyEvent
|
|
7
|
+
| OpenAI::Beta::AgentSessionEnvironmentSuspendedEvent
|
|
8
|
+
| OpenAI::Beta::AgentSessionEnvironmentExpiredEvent
|
|
7
9
|
| OpenAI::Beta::AgentSessionEnvironmentResetEvent
|
|
8
10
|
| OpenAI::Beta::AgentOutputCommandExecutionOutputDeltaEvent
|
|
9
11
|
| OpenAI::Beta::AgentSessionCreatedEvent
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type environment_create_params =
|
|
6
|
+
{
|
|
7
|
+
environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment,
|
|
8
|
+
?vault_ids: ::Array[String]?,
|
|
9
|
+
?idempotency_key: String,
|
|
10
|
+
?request_options: OpenAI::request_opts
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class EnvironmentCreateParams < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
# The required hosting type and its configuration.
|
|
18
|
+
attr_accessor environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment
|
|
19
|
+
|
|
20
|
+
# The IDs of up to 10 vaults made available to an OpenAI-hosted environment.
|
|
21
|
+
attr_accessor vault_ids: ::Array[String]?
|
|
22
|
+
|
|
23
|
+
attr_reader idempotency_key: String?
|
|
24
|
+
|
|
25
|
+
def idempotency_key=: (String) -> String
|
|
26
|
+
|
|
27
|
+
# @param environment
|
|
28
|
+
# The required hosting type and its configuration.
|
|
29
|
+
# @param vault_ids
|
|
30
|
+
# The IDs of up to 10 vaults made available to an OpenAI-hosted environment.
|
|
31
|
+
def initialize: (
|
|
32
|
+
environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment,
|
|
33
|
+
?vault_ids: ::Array[String]?,
|
|
34
|
+
?idempotency_key: String,
|
|
35
|
+
?request_options: OpenAI::request_opts
|
|
36
|
+
) -> void
|
|
37
|
+
|
|
38
|
+
def to_hash: -> {
|
|
39
|
+
environment: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment,
|
|
40
|
+
?vault_ids: ::Array[String]?,
|
|
41
|
+
?idempotency_key: String,
|
|
42
|
+
?request_options: OpenAI::RequestOptions
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type environment =
|
|
46
|
+
{
|
|
47
|
+
?type: :openai_hosted,
|
|
48
|
+
?capability_directories: ::Array[String]?,
|
|
49
|
+
?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?,
|
|
50
|
+
?env: ::Hash[Symbol, String]?,
|
|
51
|
+
?environment_template_id: String,
|
|
52
|
+
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
53
|
+
?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?,
|
|
54
|
+
?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?,
|
|
55
|
+
?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?,
|
|
56
|
+
?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?,
|
|
57
|
+
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
class Environment < OpenAI::Internal::Type::BaseModel
|
|
61
|
+
# The type of the object. Always `openai_hosted`.
|
|
62
|
+
attr_accessor type: :openai_hosted
|
|
63
|
+
|
|
64
|
+
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
65
|
+
# list.
|
|
66
|
+
attr_accessor capability_directories: ::Array[String]?
|
|
67
|
+
|
|
68
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
69
|
+
# defaults to disabled.
|
|
70
|
+
attr_accessor desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?
|
|
71
|
+
|
|
72
|
+
# Environment variables made available to the agent.
|
|
73
|
+
attr_accessor env: ::Hash[Symbol, String]?
|
|
74
|
+
|
|
75
|
+
# A reusable hosted template applied before inline configuration. Omitted fields
|
|
76
|
+
# inherit the template; network overrides cannot broaden its policy.
|
|
77
|
+
attr_reader environment_template_id: String?
|
|
78
|
+
|
|
79
|
+
# A reusable hosted template applied before inline configuration. Omitted fields
|
|
80
|
+
# inherit the template; network overrides cannot broaden its policy.
|
|
81
|
+
def environment_template_id=: (String) -> String
|
|
82
|
+
|
|
83
|
+
# Files available before the agent starts. Defaults to an empty list.
|
|
84
|
+
attr_accessor files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?
|
|
85
|
+
|
|
86
|
+
# Network access policy for the environment. If omitted, the API version
|
|
87
|
+
# determines whether network access is enabled or disabled.
|
|
88
|
+
attr_accessor network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?
|
|
89
|
+
|
|
90
|
+
# Packages to install in the environment. Defaults to empty package lists.
|
|
91
|
+
attr_accessor packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?
|
|
92
|
+
|
|
93
|
+
# Plugins provided as inline ZIP archives. Defaults to an empty list.
|
|
94
|
+
attr_accessor plugins: ::Array[OpenAI::Beta::HostedPluginParam]?
|
|
95
|
+
|
|
96
|
+
# Ordered, confidential setup commands. Command bodies are never returned.
|
|
97
|
+
attr_accessor setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?
|
|
98
|
+
|
|
99
|
+
# Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty
|
|
100
|
+
# list.
|
|
101
|
+
attr_accessor skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
|
|
102
|
+
|
|
103
|
+
# @param capability_directories
|
|
104
|
+
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
105
|
+
# list.
|
|
106
|
+
# @param desktop
|
|
107
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
108
|
+
# defaults to disabled.
|
|
109
|
+
# @param env
|
|
110
|
+
# Environment variables made available to the agent.
|
|
111
|
+
# @param environment_template_id
|
|
112
|
+
# A reusable hosted template applied before inline configuration. Omitted fields
|
|
113
|
+
# inherit the template; network overrides cannot broaden its policy.
|
|
114
|
+
# @param files
|
|
115
|
+
# Files available before the agent starts. Defaults to an empty list.
|
|
116
|
+
# @param network
|
|
117
|
+
# Network access policy for the environment. If omitted, the API version
|
|
118
|
+
# determines whether network access is enabled or disabled.
|
|
119
|
+
# @param packages
|
|
120
|
+
# Packages to install in the environment. Defaults to empty package lists.
|
|
121
|
+
# @param plugins
|
|
122
|
+
# Plugins provided as inline ZIP archives. Defaults to an empty list.
|
|
123
|
+
# @param setup_commands
|
|
124
|
+
# Ordered, confidential setup commands. Command bodies are never returned.
|
|
125
|
+
# @param skills
|
|
126
|
+
# Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty
|
|
127
|
+
# list.
|
|
128
|
+
# @param type
|
|
129
|
+
# The type of the object. Always `openai_hosted`.
|
|
130
|
+
def initialize: (
|
|
131
|
+
?capability_directories: ::Array[String]?,
|
|
132
|
+
?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?,
|
|
133
|
+
?env: ::Hash[Symbol, String]?,
|
|
134
|
+
?environment_template_id: String,
|
|
135
|
+
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
136
|
+
?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?,
|
|
137
|
+
?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?,
|
|
138
|
+
?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?,
|
|
139
|
+
?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?,
|
|
140
|
+
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?,
|
|
141
|
+
?type: :openai_hosted
|
|
142
|
+
) -> void
|
|
143
|
+
|
|
144
|
+
def to_hash: -> {
|
|
145
|
+
?type: :openai_hosted,
|
|
146
|
+
?capability_directories: ::Array[String]?,
|
|
147
|
+
?desktop: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Desktop?,
|
|
148
|
+
?env: ::Hash[Symbol, String]?,
|
|
149
|
+
?environment_template_id: String,
|
|
150
|
+
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
151
|
+
?network: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Network?,
|
|
152
|
+
?packages: OpenAI::Beta::Agents::EnvironmentCreateParams::Environment::Packages?,
|
|
153
|
+
?plugins: ::Array[OpenAI::Beta::HostedPluginParam]?,
|
|
154
|
+
?setup_commands: ::Array[OpenAI::Beta::SetupCommandParam]?,
|
|
155
|
+
?skills: ::Array[OpenAI::Models::Beta::hosted_skill_param]?
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
type desktop = { enabled: bool }
|
|
159
|
+
|
|
160
|
+
class Desktop < OpenAI::Internal::Type::BaseModel
|
|
161
|
+
# Whether to provision the desktop and its browser proxy.
|
|
162
|
+
attr_accessor enabled: bool
|
|
163
|
+
|
|
164
|
+
# @param enabled
|
|
165
|
+
# Whether to provision the desktop and its browser proxy.
|
|
166
|
+
def initialize: (enabled: bool) -> void
|
|
167
|
+
|
|
168
|
+
def to_hash: -> { enabled: bool }
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
type network =
|
|
172
|
+
{
|
|
173
|
+
access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access,
|
|
174
|
+
?allowed_domains: ::Array[String]?,
|
|
175
|
+
?blocked_domains: ::Array[String]?
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
class Network < OpenAI::Internal::Type::BaseModel
|
|
179
|
+
# The environment's network access mode.
|
|
180
|
+
attr_accessor access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access
|
|
181
|
+
|
|
182
|
+
# Domains the environment may access when network access is restricted.
|
|
183
|
+
attr_accessor allowed_domains: ::Array[String]?
|
|
184
|
+
|
|
185
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
186
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
187
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
188
|
+
attr_accessor blocked_domains: ::Array[String]?
|
|
189
|
+
|
|
190
|
+
# @param access
|
|
191
|
+
# The environment's network access mode.
|
|
192
|
+
# @param allowed_domains
|
|
193
|
+
# Domains the environment may access when network access is restricted.
|
|
194
|
+
# @param blocked_domains
|
|
195
|
+
# Domains blocked for both executor and browser when access is restricted. A
|
|
196
|
+
# nonempty list requires `access: restricted` and cannot be combined with nonempty
|
|
197
|
+
# `allowed_domains`. Wildcard domains are not supported.
|
|
198
|
+
def initialize: (
|
|
199
|
+
access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access,
|
|
200
|
+
?allowed_domains: ::Array[String]?,
|
|
201
|
+
?blocked_domains: ::Array[String]?
|
|
202
|
+
) -> void
|
|
203
|
+
|
|
204
|
+
def to_hash: -> {
|
|
205
|
+
access: OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access,
|
|
206
|
+
?allowed_domains: ::Array[String]?,
|
|
207
|
+
?blocked_domains: ::Array[String]?
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
type access = :enabled | :disabled | :restricted
|
|
211
|
+
|
|
212
|
+
module Access
|
|
213
|
+
extend OpenAI::Internal::Type::Enum
|
|
214
|
+
|
|
215
|
+
# Allows unrestricted network access.
|
|
216
|
+
ENABLED: :enabled
|
|
217
|
+
|
|
218
|
+
# Disables network access.
|
|
219
|
+
DISABLED: :disabled
|
|
220
|
+
|
|
221
|
+
# Applies the configured domain restrictions.
|
|
222
|
+
RESTRICTED: :restricted
|
|
223
|
+
|
|
224
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::EnvironmentCreateParams::Environment::Network::access]
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
type packages =
|
|
229
|
+
{
|
|
230
|
+
?npm: ::Array[String]?,
|
|
231
|
+
?python: ::Array[String]?,
|
|
232
|
+
?system_: ::Array[String]?
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
class Packages < OpenAI::Internal::Type::BaseModel
|
|
236
|
+
# npm packages to install globally. Defaults to an empty list.
|
|
237
|
+
attr_accessor npm: ::Array[String]?
|
|
238
|
+
|
|
239
|
+
# Python packages to install. Defaults to an empty list.
|
|
240
|
+
attr_accessor python: ::Array[String]?
|
|
241
|
+
|
|
242
|
+
# System packages to install. Defaults to an empty list.
|
|
243
|
+
attr_accessor system_: ::Array[String]?
|
|
244
|
+
|
|
245
|
+
# @param npm
|
|
246
|
+
# npm packages to install globally. Defaults to an empty list.
|
|
247
|
+
# @param python
|
|
248
|
+
# Python packages to install. Defaults to an empty list.
|
|
249
|
+
# @param system_
|
|
250
|
+
# System packages to install. Defaults to an empty list.
|
|
251
|
+
def initialize: (
|
|
252
|
+
?npm: ::Array[String]?,
|
|
253
|
+
?python: ::Array[String]?,
|
|
254
|
+
?system_: ::Array[String]?
|
|
255
|
+
) -> void
|
|
256
|
+
|
|
257
|
+
def to_hash: -> {
|
|
258
|
+
?npm: ::Array[String]?,
|
|
259
|
+
?python: ::Array[String]?,
|
|
260
|
+
?system_: ::Array[String]?
|
|
261
|
+
}
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
end
|
|
@@ -70,14 +70,28 @@ module OpenAI
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
type status =
|
|
73
|
-
:pending
|
|
73
|
+
:pending
|
|
74
|
+
| :ready
|
|
75
|
+
| :connected
|
|
76
|
+
| :disconnected
|
|
77
|
+
| :suspended
|
|
78
|
+
| :expired
|
|
79
|
+
| :failed
|
|
74
80
|
|
|
75
81
|
module Status
|
|
76
82
|
extend OpenAI::Internal::Type::Enum
|
|
77
83
|
|
|
78
84
|
PENDING: :pending
|
|
85
|
+
|
|
86
|
+
# Provisioning succeeded and the environment is available for attachment or use.
|
|
87
|
+
READY: :ready
|
|
88
|
+
|
|
79
89
|
CONNECTED: :connected
|
|
80
90
|
DISCONNECTED: :disconnected
|
|
91
|
+
|
|
92
|
+
# The sandbox is stopped and can be resumed from its private checkpoint.
|
|
93
|
+
SUSPENDED: :suspended
|
|
94
|
+
|
|
81
95
|
EXPIRED: :expired
|
|
82
96
|
FAILED: :failed
|
|
83
97
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type environment_list_params =
|
|
6
|
+
{
|
|
7
|
+
?after: String,
|
|
8
|
+
?limit: Integer,
|
|
9
|
+
?order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order,
|
|
10
|
+
?type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_,
|
|
11
|
+
?request_options: OpenAI::request_opts
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class EnvironmentListParams < OpenAI::Internal::Type::BaseModel
|
|
15
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
16
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
17
|
+
|
|
18
|
+
# Return environments after this environment ID in the selected order.
|
|
19
|
+
attr_reader after: String?
|
|
20
|
+
|
|
21
|
+
# Return environments after this environment ID in the selected order.
|
|
22
|
+
def after=: (String) -> String
|
|
23
|
+
|
|
24
|
+
# The maximum number of environments to return, between 1 and 100. Defaults to 20.
|
|
25
|
+
attr_reader limit: Integer?
|
|
26
|
+
|
|
27
|
+
# The maximum number of environments to return, between 1 and 100. Defaults to 20.
|
|
28
|
+
def limit=: (Integer) -> Integer
|
|
29
|
+
|
|
30
|
+
# The order in which environments are returned. Defaults to `desc`.
|
|
31
|
+
attr_reader order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order?
|
|
32
|
+
|
|
33
|
+
# The order in which environments are returned. Defaults to `desc`.
|
|
34
|
+
def order=: (
|
|
35
|
+
OpenAI::Models::Beta::Agents::EnvironmentListParams::order
|
|
36
|
+
) -> OpenAI::Models::Beta::Agents::EnvironmentListParams::order
|
|
37
|
+
|
|
38
|
+
# The hosting type to list. Defaults to `openai_hosted`.
|
|
39
|
+
attr_reader type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_?
|
|
40
|
+
|
|
41
|
+
# The hosting type to list. Defaults to `openai_hosted`.
|
|
42
|
+
def type=: (
|
|
43
|
+
OpenAI::Models::Beta::Agents::EnvironmentListParams::type_
|
|
44
|
+
) -> OpenAI::Models::Beta::Agents::EnvironmentListParams::type_
|
|
45
|
+
|
|
46
|
+
# @param after
|
|
47
|
+
# Return environments after this environment ID in the selected order.
|
|
48
|
+
# @param limit
|
|
49
|
+
# The maximum number of environments to return, between 1 and 100. Defaults to 20.
|
|
50
|
+
# @param order
|
|
51
|
+
# The order in which environments are returned. Defaults to `desc`.
|
|
52
|
+
# @param type
|
|
53
|
+
# The hosting type to list. Defaults to `openai_hosted`.
|
|
54
|
+
def initialize: (
|
|
55
|
+
?after: String,
|
|
56
|
+
?limit: Integer,
|
|
57
|
+
?order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order,
|
|
58
|
+
?type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_,
|
|
59
|
+
?request_options: OpenAI::request_opts
|
|
60
|
+
) -> void
|
|
61
|
+
|
|
62
|
+
def to_hash: -> {
|
|
63
|
+
?after: String,
|
|
64
|
+
?limit: Integer,
|
|
65
|
+
?order: OpenAI::Models::Beta::Agents::EnvironmentListParams::order,
|
|
66
|
+
?type: OpenAI::Models::Beta::Agents::EnvironmentListParams::type_,
|
|
67
|
+
?request_options: OpenAI::RequestOptions
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type order = :asc | :desc
|
|
71
|
+
|
|
72
|
+
module Order
|
|
73
|
+
extend OpenAI::Internal::Type::Enum
|
|
74
|
+
|
|
75
|
+
# Returns resources in ascending order.
|
|
76
|
+
ASC: :asc
|
|
77
|
+
|
|
78
|
+
# Returns resources in descending order.
|
|
79
|
+
DESC: :desc
|
|
80
|
+
|
|
81
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::EnvironmentListParams::order]
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
type type_ = :openai_hosted
|
|
85
|
+
|
|
86
|
+
module Type
|
|
87
|
+
extend OpenAI::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
OPENAI_HOSTED: :openai_hosted
|
|
90
|
+
|
|
91
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::EnvironmentListParams::type_]
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -29,6 +29,7 @@ module OpenAI
|
|
|
29
29
|
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
30
30
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
31
31
|
?env: ::Hash[Symbol, String]?,
|
|
32
|
+
?environment_id: String,
|
|
32
33
|
?environment_template_id: String,
|
|
33
34
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
34
35
|
?network: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network?,
|
|
@@ -61,6 +62,14 @@ module OpenAI
|
|
|
61
62
|
# Environment variables made available to the agent.
|
|
62
63
|
attr_accessor env: ::Hash[Symbol, String]?
|
|
63
64
|
|
|
65
|
+
# An existing prewarmed environment. Cannot be combined with a template or inline
|
|
66
|
+
# configuration.
|
|
67
|
+
attr_reader environment_id: String?
|
|
68
|
+
|
|
69
|
+
# An existing prewarmed environment. Cannot be combined with a template or inline
|
|
70
|
+
# configuration.
|
|
71
|
+
def environment_id=: (String) -> String
|
|
72
|
+
|
|
64
73
|
# A reusable hosted template applied before inline session configuration. Omitted
|
|
65
74
|
# fields inherit the template; network overrides cannot broaden its policy.
|
|
66
75
|
attr_reader environment_template_id: String?
|
|
@@ -99,6 +108,9 @@ module OpenAI
|
|
|
99
108
|
# defaults to disabled.
|
|
100
109
|
# @param env
|
|
101
110
|
# Environment variables made available to the agent.
|
|
111
|
+
# @param environment_id
|
|
112
|
+
# An existing prewarmed environment. Cannot be combined with a template or inline
|
|
113
|
+
# configuration.
|
|
102
114
|
# @param environment_template_id
|
|
103
115
|
# A reusable hosted template applied before inline session configuration. Omitted
|
|
104
116
|
# fields inherit the template; network overrides cannot broaden its policy.
|
|
@@ -123,6 +135,7 @@ module OpenAI
|
|
|
123
135
|
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
124
136
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
125
137
|
?env: ::Hash[Symbol, String]?,
|
|
138
|
+
?environment_id: String,
|
|
126
139
|
?environment_template_id: String,
|
|
127
140
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
128
141
|
?network: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network?,
|
|
@@ -139,6 +152,7 @@ module OpenAI
|
|
|
139
152
|
?container_size: OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted::container_size,
|
|
140
153
|
?desktop: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Desktop?,
|
|
141
154
|
?env: ::Hash[Symbol, String]?,
|
|
155
|
+
?environment_id: String,
|
|
142
156
|
?environment_template_id: String,
|
|
143
157
|
?files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?,
|
|
144
158
|
?network: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network?,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Webhooks
|
|
4
|
+
type agent_environment_expired_webhook_event =
|
|
5
|
+
{
|
|
6
|
+
id: String,
|
|
7
|
+
created_at: Integer,
|
|
8
|
+
data: OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data,
|
|
9
|
+
?object: :event,
|
|
10
|
+
?type: :"agent.environment.expired"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class AgentEnvironmentExpiredWebhookEvent < OpenAI::Internal::Type::BaseModel
|
|
14
|
+
# The unique ID of the event.
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
18
|
+
attr_accessor created_at: Integer
|
|
19
|
+
|
|
20
|
+
# Identifies the environment whose lifecycle changed.
|
|
21
|
+
attr_accessor data: OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data
|
|
22
|
+
|
|
23
|
+
# The object type. Always `event`.
|
|
24
|
+
attr_accessor object: :event
|
|
25
|
+
|
|
26
|
+
# The event type. Always `agent.environment.expired`.
|
|
27
|
+
attr_accessor type: :"agent.environment.expired"
|
|
28
|
+
|
|
29
|
+
# @param id
|
|
30
|
+
# The unique ID of the event.
|
|
31
|
+
# @param created_at
|
|
32
|
+
# The Unix timestamp, in seconds, when the event was created.
|
|
33
|
+
# @param data
|
|
34
|
+
# Identifies the environment whose lifecycle changed.
|
|
35
|
+
# @param object
|
|
36
|
+
# The object type. Always `event`.
|
|
37
|
+
# @param type
|
|
38
|
+
# The event type. Always `agent.environment.expired`.
|
|
39
|
+
def initialize: (
|
|
40
|
+
id: String,
|
|
41
|
+
created_at: Integer,
|
|
42
|
+
data: OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data,
|
|
43
|
+
?object: :event,
|
|
44
|
+
?type: :"agent.environment.expired"
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
id: String,
|
|
49
|
+
created_at: Integer,
|
|
50
|
+
data: OpenAI::Webhooks::AgentEnvironmentExpiredWebhookEvent::Data,
|
|
51
|
+
?object: :event,
|
|
52
|
+
?type: :"agent.environment.expired"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
type data = { id: String }
|
|
56
|
+
|
|
57
|
+
class Data < OpenAI::Internal::Type::BaseModel
|
|
58
|
+
# The ID of the environment.
|
|
59
|
+
attr_accessor id: String
|
|
60
|
+
|
|
61
|
+
# @param id
|
|
62
|
+
# The ID of the environment.
|
|
63
|
+
def initialize: (id: String) -> void
|
|
64
|
+
|
|
65
|
+
def to_hash: -> { id: String }
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|