openai 0.120.0 → 0.121.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 +13 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agents/automation.rb +27 -0
- data/lib/openai/models/beta/agents/automation_agent_config.rb +142 -0
- data/lib/openai/models/beta/agents/automation_create_params.rb +27 -0
- data/lib/openai/models/beta/agents/automation_created_by.rb +65 -0
- data/lib/openai/models/beta/agents/automation_delete_params.rb +24 -0
- data/lib/openai/models/beta/agents/automation_deleted.rb +40 -0
- data/lib/openai/models/beta/agents/automation_environment.rb +484 -0
- data/lib/openai/models/beta/agents/automation_list_params.rb +68 -0
- data/lib/openai/models/beta/agents/automation_pause_params.rb +24 -0
- data/lib/openai/models/beta/agents/automation_resume_params.rb +24 -0
- data/lib/openai/models/beta/agents/automation_retrieve_params.rb +24 -0
- data/lib/openai/models/beta/agents/automation_schedule_param.rb +124 -0
- data/lib/openai/models/beta/agents/automation_target.rb +153 -0
- data/lib/openai/models/beta/agents/automation_target_param.rb +312 -0
- data/lib/openai/models/beta/agents/automation_update_params.rb +79 -0
- data/lib/openai/models/beta/agents/automations/automation_invocation.rb +148 -0
- data/lib/openai/models/beta/agents/automations/automation_invocation_source.rb +59 -0
- data/lib/openai/models/beta/agents/automations/invocation_create_params.rb +26 -0
- data/lib/openai/models/beta/agents/automations/invocation_list_params.rb +68 -0
- data/lib/openai/models/beta/agents/automations/invocation_retrieve_params.rb +32 -0
- data/lib/openai/models/beta/agents/environments/file_create_params.rb +11 -1
- data/lib/openai/models/beta/agents/one_time_automation.rb +118 -0
- data/lib/openai/models/beta/agents/periodic_automation.rb +126 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +3 -0
- data/lib/openai/models/beta/response_compact_params.rb +3 -0
- data/lib/openai/models/beta/response_create_params.rb +3 -0
- data/lib/openai/resources/beta/agents/automations/invocations.rb +103 -0
- data/lib/openai/resources/beta/agents/automations.rb +211 -0
- data/lib/openai/resources/beta/agents.rb +4 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +24 -0
- data/rbi/openai/models/beta/agents/automation.rbi +32 -0
- data/rbi/openai/models/beta/agents/automation_agent_config.rbi +255 -0
- data/rbi/openai/models/beta/agents/automation_create_params.rbi +75 -0
- data/rbi/openai/models/beta/agents/automation_created_by.rbi +124 -0
- data/rbi/openai/models/beta/agents/automation_delete_params.rbi +57 -0
- data/rbi/openai/models/beta/agents/automation_deleted.rbi +71 -0
- data/rbi/openai/models/beta/agents/automation_environment.rbi +795 -0
- data/rbi/openai/models/beta/agents/automation_list_params.rbi +122 -0
- data/rbi/openai/models/beta/agents/automation_pause_params.rbi +57 -0
- data/rbi/openai/models/beta/agents/automation_resume_params.rbi +57 -0
- data/rbi/openai/models/beta/agents/automation_retrieve_params.rbi +57 -0
- data/rbi/openai/models/beta/agents/automation_schedule_param.rbi +228 -0
- data/rbi/openai/models/beta/agents/automation_target.rbi +250 -0
- data/rbi/openai/models/beta/agents/automation_target_param.rbi +564 -0
- data/rbi/openai/models/beta/agents/automation_update_params.rbi +161 -0
- data/rbi/openai/models/beta/agents/automations/automation_invocation.rbi +233 -0
- data/rbi/openai/models/beta/agents/automations/automation_invocation_source.rbi +123 -0
- data/rbi/openai/models/beta/agents/automations/invocation_create_params.rbi +61 -0
- data/rbi/openai/models/beta/agents/automations/invocation_list_params.rbi +125 -0
- data/rbi/openai/models/beta/agents/automations/invocation_retrieve_params.rbi +68 -0
- data/rbi/openai/models/beta/agents/environments/file_create_params.rbi +27 -1
- data/rbi/openai/models/beta/agents/one_time_automation.rbi +168 -0
- data/rbi/openai/models/beta/agents/periodic_automation.rbi +177 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +4 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +1 -0
- data/rbi/openai/models/beta/response_create_params.rbi +1 -0
- data/rbi/openai/resources/beta/agents/automations/invocations.rbi +67 -0
- data/rbi/openai/resources/beta/agents/automations.rbi +141 -0
- data/rbi/openai/resources/beta/agents.rbi +3 -0
- data/sig/openai/models/beta/agent_session_turn_reasoning_summary_part_done_event.rbs +1 -4
- data/sig/openai/models/beta/agents/automation.rbs +17 -0
- data/sig/openai/models/beta/agents/automation_agent_config.rbs +143 -0
- data/sig/openai/models/beta/agents/automation_create_params.rbs +33 -0
- data/sig/openai/models/beta/agents/automation_created_by.rbs +62 -0
- data/sig/openai/models/beta/agents/automation_delete_params.rbs +27 -0
- data/sig/openai/models/beta/agents/automation_deleted.rbs +39 -0
- data/sig/openai/models/beta/agents/automation_environment.rbs +428 -0
- data/sig/openai/models/beta/agents/automation_list_params.rbs +85 -0
- data/sig/openai/models/beta/agents/automation_pause_params.rbs +27 -0
- data/sig/openai/models/beta/agents/automation_resume_params.rbs +27 -0
- data/sig/openai/models/beta/agents/automation_retrieve_params.rbs +27 -0
- data/sig/openai/models/beta/agents/automation_schedule_param.rbs +127 -0
- data/sig/openai/models/beta/agents/automation_target.rbs +157 -0
- data/sig/openai/models/beta/agents/automation_target_param.rbs +299 -0
- data/sig/openai/models/beta/agents/automation_update_params.rbs +97 -0
- data/sig/openai/models/beta/agents/automations/automation_invocation.rbs +134 -0
- data/sig/openai/models/beta/agents/automations/automation_invocation_source.rbs +62 -0
- data/sig/openai/models/beta/agents/automations/invocation_create_params.rbs +29 -0
- data/sig/openai/models/beta/agents/automations/invocation_list_params.rbs +81 -0
- data/sig/openai/models/beta/agents/automations/invocation_retrieve_params.rbs +37 -0
- data/sig/openai/models/beta/agents/environments/file_create_params.rbs +12 -1
- data/sig/openai/models/beta/agents/one_time_automation.rbs +111 -0
- data/sig/openai/models/beta/agents/periodic_automation.rbs +118 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +2 -0
- data/sig/openai/models/beta/response_compact_params.rbs +2 -0
- data/sig/openai/models/beta/response_create_params.rbs +2 -0
- data/sig/openai/resources/beta/agents/automations/invocations.rbs +32 -0
- data/sig/openai/resources/beta/agents/automations.rbs +57 -0
- data/sig/openai/resources/beta/agents.rbs +2 -0
- metadata +73 -1
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
# The session an automation invocation targets.
|
|
11
|
+
module AutomationTargetParam
|
|
12
|
+
extend OpenAI::Internal::Type::Union
|
|
13
|
+
|
|
14
|
+
Variants = T.type_alias do
|
|
15
|
+
T.any(
|
|
16
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
|
|
17
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class NewSession < OpenAI::Internal::Type::BaseModel
|
|
22
|
+
OrHash = T.type_alias do
|
|
23
|
+
T.any(
|
|
24
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
|
|
25
|
+
OpenAI::Internal::AnyHash
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# The execution environment for each new session.
|
|
30
|
+
sig {
|
|
31
|
+
returns(
|
|
32
|
+
T.any(
|
|
33
|
+
OpenAI::Beta::EnvironmentParam::None,
|
|
34
|
+
OpenAI::Beta::EnvironmentParam::OpenAIHosted,
|
|
35
|
+
OpenAI::Beta::EnvironmentParam::SelfHosted
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
attr_accessor :environment
|
|
40
|
+
|
|
41
|
+
# Initial user messages submitted with each new session.
|
|
42
|
+
sig { returns(T::Array[OpenAI::Beta::AgentSessionInputMessageParam]) }
|
|
43
|
+
attr_accessor :input
|
|
44
|
+
|
|
45
|
+
# The type of the object. Always `new_session`.
|
|
46
|
+
sig { returns(Symbol) }
|
|
47
|
+
attr_accessor :type
|
|
48
|
+
|
|
49
|
+
# Inline agent configuration. Provide exactly one of agent and agent_id.
|
|
50
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent)) }
|
|
51
|
+
attr_reader :agent
|
|
52
|
+
|
|
53
|
+
sig { params(agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::OrHash).void }
|
|
54
|
+
attr_writer :agent
|
|
55
|
+
|
|
56
|
+
# A saved agent ID. Provide exactly one of agent and agent_id.
|
|
57
|
+
sig { returns(T.nilable(String)) }
|
|
58
|
+
attr_reader :agent_id
|
|
59
|
+
|
|
60
|
+
sig { params(agent_id: String).void }
|
|
61
|
+
attr_writer :agent_id
|
|
62
|
+
|
|
63
|
+
# Metadata attached to each new session.
|
|
64
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
65
|
+
attr_accessor :metadata
|
|
66
|
+
|
|
67
|
+
# The IDs of vaults made available to each new session.
|
|
68
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
69
|
+
attr_accessor :vault_ids
|
|
70
|
+
|
|
71
|
+
# Create a session for each invocation.
|
|
72
|
+
sig do
|
|
73
|
+
params(
|
|
74
|
+
|
|
75
|
+
environment: T.any(
|
|
76
|
+
OpenAI::Beta::EnvironmentParam::None::OrHash,
|
|
77
|
+
OpenAI::Beta::EnvironmentParam::OpenAIHosted::OrHash,
|
|
78
|
+
OpenAI::Beta::EnvironmentParam::SelfHosted::OrHash
|
|
79
|
+
),
|
|
80
|
+
|
|
81
|
+
input: T::Array[OpenAI::Beta::AgentSessionInputMessageParam::OrHash],
|
|
82
|
+
|
|
83
|
+
agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::OrHash,
|
|
84
|
+
|
|
85
|
+
agent_id: String,
|
|
86
|
+
|
|
87
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
88
|
+
|
|
89
|
+
vault_ids: T.nilable(T::Array[String]),
|
|
90
|
+
|
|
91
|
+
type: Symbol
|
|
92
|
+
)
|
|
93
|
+
.returns(T.attached_class)
|
|
94
|
+
end
|
|
95
|
+
def self.new(
|
|
96
|
+
|
|
97
|
+
# The execution environment for each new session.
|
|
98
|
+
environment:,
|
|
99
|
+
|
|
100
|
+
# Initial user messages submitted with each new session.
|
|
101
|
+
input:,
|
|
102
|
+
|
|
103
|
+
# Inline agent configuration. Provide exactly one of agent and agent_id.
|
|
104
|
+
agent: nil,
|
|
105
|
+
|
|
106
|
+
# A saved agent ID. Provide exactly one of agent and agent_id.
|
|
107
|
+
agent_id: nil,
|
|
108
|
+
|
|
109
|
+
# Metadata attached to each new session.
|
|
110
|
+
metadata: nil,
|
|
111
|
+
|
|
112
|
+
# The IDs of vaults made available to each new session.
|
|
113
|
+
vault_ids: nil,
|
|
114
|
+
|
|
115
|
+
# The type of the object. Always `new_session`.
|
|
116
|
+
|
|
117
|
+
type: :new_session
|
|
118
|
+
)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
sig do
|
|
122
|
+
override.returns(
|
|
123
|
+
{
|
|
124
|
+
environment: T.any(
|
|
125
|
+
OpenAI::Beta::EnvironmentParam::None,
|
|
126
|
+
OpenAI::Beta::EnvironmentParam::OpenAIHosted,
|
|
127
|
+
OpenAI::Beta::EnvironmentParam::SelfHosted
|
|
128
|
+
),
|
|
129
|
+
input: T::Array[OpenAI::Beta::AgentSessionInputMessageParam],
|
|
130
|
+
type: Symbol,
|
|
131
|
+
agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent,
|
|
132
|
+
agent_id: String,
|
|
133
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
134
|
+
vault_ids: T.nilable(T::Array[String])
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
end
|
|
138
|
+
def to_hash
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
class Agent < OpenAI::Internal::Type::BaseModel
|
|
142
|
+
OrHash = T.type_alias do
|
|
143
|
+
T.any(
|
|
144
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent,
|
|
145
|
+
OpenAI::Internal::AnyHash
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
150
|
+
# object replaces the settings; null or an empty object enables background
|
|
151
|
+
# compaction.
|
|
152
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction)) }
|
|
153
|
+
attr_reader :compaction
|
|
154
|
+
|
|
155
|
+
sig {
|
|
156
|
+
params(
|
|
157
|
+
compaction: T.nilable(
|
|
158
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction::OrHash
|
|
159
|
+
)
|
|
160
|
+
)
|
|
161
|
+
.void
|
|
162
|
+
}
|
|
163
|
+
attr_writer :compaction
|
|
164
|
+
|
|
165
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
166
|
+
# values.
|
|
167
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental)) }
|
|
168
|
+
attr_reader :experimental
|
|
169
|
+
|
|
170
|
+
sig {
|
|
171
|
+
params(
|
|
172
|
+
experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental::OrHash
|
|
173
|
+
)
|
|
174
|
+
.void
|
|
175
|
+
}
|
|
176
|
+
attr_writer :experimental
|
|
177
|
+
|
|
178
|
+
# Additional instructions appended to the agent's default base instructions. Omit
|
|
179
|
+
# to leave unchanged.
|
|
180
|
+
sig { returns(T.nilable(String)) }
|
|
181
|
+
attr_accessor :instructions
|
|
182
|
+
|
|
183
|
+
# The model to use for the agent. The requested model name is preserved.
|
|
184
|
+
sig { returns(T.nilable(String)) }
|
|
185
|
+
attr_reader :model
|
|
186
|
+
|
|
187
|
+
sig { params(model: String).void }
|
|
188
|
+
attr_writer :model
|
|
189
|
+
|
|
190
|
+
# Configuration for creating and coordinating subagents.
|
|
191
|
+
sig { returns(T.nilable(OpenAI::Beta::MultiAgentConfigParam)) }
|
|
192
|
+
attr_reader :multi_agent
|
|
193
|
+
|
|
194
|
+
sig { params(multi_agent: T.nilable(OpenAI::Beta::MultiAgentConfigParam::OrHash)).void }
|
|
195
|
+
attr_writer :multi_agent
|
|
196
|
+
|
|
197
|
+
# Configuration for model reasoning. Omit to keep the current settings; pass
|
|
198
|
+
# `null` to reset to the model's default effort.
|
|
199
|
+
sig { returns(T.nilable(OpenAI::Beta::AgentReasoningParam)) }
|
|
200
|
+
attr_reader :reasoning
|
|
201
|
+
|
|
202
|
+
sig { params(reasoning: T.nilable(OpenAI::Beta::AgentReasoningParam::OrHash)).void }
|
|
203
|
+
attr_writer :reasoning
|
|
204
|
+
|
|
205
|
+
# The service tier used for model requests.
|
|
206
|
+
sig {
|
|
207
|
+
returns(
|
|
208
|
+
T.nilable(OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::OrSymbol)
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
attr_accessor :service_tier
|
|
212
|
+
|
|
213
|
+
# Configuration for text generated by the agent.
|
|
214
|
+
sig { returns(T.nilable(OpenAI::Beta::AgentTextParam)) }
|
|
215
|
+
attr_reader :text
|
|
216
|
+
|
|
217
|
+
sig { params(text: T.nilable(OpenAI::Beta::AgentTextParam::OrHash)).void }
|
|
218
|
+
attr_writer :text
|
|
219
|
+
|
|
220
|
+
# Tools available to the agent. Omit to inherit, or pass null to clear them. The
|
|
221
|
+
# resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
|
|
222
|
+
# JSON.
|
|
223
|
+
sig {
|
|
224
|
+
returns(
|
|
225
|
+
T.nilable(
|
|
226
|
+
T::Array[
|
|
227
|
+
T.any(
|
|
228
|
+
OpenAI::Beta::AgentToolParam::Function,
|
|
229
|
+
OpenAI::Beta::AgentToolParam::ToolSearch,
|
|
230
|
+
OpenAI::Beta::AgentToolParam::ProgrammaticToolCalling,
|
|
231
|
+
OpenAI::Beta::AgentToolParam::Mcp,
|
|
232
|
+
OpenAI::Beta::AgentToolParam::WebSearch,
|
|
233
|
+
OpenAI::Beta::AgentToolParam::ComputerUse,
|
|
234
|
+
OpenAI::Beta::AgentToolParam::Automations
|
|
235
|
+
)
|
|
236
|
+
]
|
|
237
|
+
)
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
attr_accessor :tools
|
|
241
|
+
|
|
242
|
+
# Inline agent configuration. Provide exactly one of agent and agent_id.
|
|
243
|
+
sig do
|
|
244
|
+
params(
|
|
245
|
+
|
|
246
|
+
compaction: T.nilable(
|
|
247
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction::OrHash
|
|
248
|
+
),
|
|
249
|
+
|
|
250
|
+
experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental::OrHash,
|
|
251
|
+
|
|
252
|
+
instructions: T.nilable(String),
|
|
253
|
+
|
|
254
|
+
model: String,
|
|
255
|
+
|
|
256
|
+
multi_agent: T.nilable(OpenAI::Beta::MultiAgentConfigParam::OrHash),
|
|
257
|
+
|
|
258
|
+
reasoning: T.nilable(OpenAI::Beta::AgentReasoningParam::OrHash),
|
|
259
|
+
|
|
260
|
+
service_tier: T.nilable(
|
|
261
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::OrSymbol
|
|
262
|
+
),
|
|
263
|
+
|
|
264
|
+
text: T.nilable(OpenAI::Beta::AgentTextParam::OrHash),
|
|
265
|
+
|
|
266
|
+
tools: T.nilable(
|
|
267
|
+
T::Array[
|
|
268
|
+
T.any(
|
|
269
|
+
OpenAI::Beta::AgentToolParam::Function::OrHash,
|
|
270
|
+
OpenAI::Beta::AgentToolParam::ToolSearch::OrHash,
|
|
271
|
+
OpenAI::Beta::AgentToolParam::ProgrammaticToolCalling::OrHash,
|
|
272
|
+
OpenAI::Beta::AgentToolParam::Mcp::OrHash,
|
|
273
|
+
OpenAI::Beta::AgentToolParam::WebSearch::OrHash,
|
|
274
|
+
OpenAI::Beta::AgentToolParam::ComputerUse::OrHash,
|
|
275
|
+
OpenAI::Beta::AgentToolParam::Automations::OrHash
|
|
276
|
+
)
|
|
277
|
+
]
|
|
278
|
+
)
|
|
279
|
+
)
|
|
280
|
+
.returns(T.attached_class)
|
|
281
|
+
end
|
|
282
|
+
def self.new(
|
|
283
|
+
|
|
284
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
285
|
+
# object replaces the settings; null or an empty object enables background
|
|
286
|
+
# compaction.
|
|
287
|
+
compaction: nil,
|
|
288
|
+
|
|
289
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
290
|
+
# values.
|
|
291
|
+
experimental: nil,
|
|
292
|
+
|
|
293
|
+
# Additional instructions appended to the agent's default base instructions. Omit
|
|
294
|
+
# to leave unchanged.
|
|
295
|
+
instructions: nil,
|
|
296
|
+
|
|
297
|
+
# The model to use for the agent. The requested model name is preserved.
|
|
298
|
+
model: nil,
|
|
299
|
+
|
|
300
|
+
# Configuration for creating and coordinating subagents.
|
|
301
|
+
multi_agent: nil,
|
|
302
|
+
|
|
303
|
+
# Configuration for model reasoning. Omit to keep the current settings; pass
|
|
304
|
+
# `null` to reset to the model's default effort.
|
|
305
|
+
reasoning: nil,
|
|
306
|
+
|
|
307
|
+
# The service tier used for model requests.
|
|
308
|
+
service_tier: nil,
|
|
309
|
+
|
|
310
|
+
# Configuration for text generated by the agent.
|
|
311
|
+
text: nil,
|
|
312
|
+
|
|
313
|
+
# Tools available to the agent. Omit to inherit, or pass null to clear them. The
|
|
314
|
+
# resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
|
|
315
|
+
# JSON.
|
|
316
|
+
|
|
317
|
+
tools: nil
|
|
318
|
+
)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
sig do
|
|
322
|
+
override.returns(
|
|
323
|
+
{
|
|
324
|
+
compaction: T.nilable(OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction),
|
|
325
|
+
experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental,
|
|
326
|
+
instructions: T.nilable(String),
|
|
327
|
+
model: String,
|
|
328
|
+
multi_agent: T.nilable(OpenAI::Beta::MultiAgentConfigParam),
|
|
329
|
+
reasoning: T.nilable(OpenAI::Beta::AgentReasoningParam),
|
|
330
|
+
service_tier: T.nilable(
|
|
331
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::OrSymbol
|
|
332
|
+
),
|
|
333
|
+
text: T.nilable(OpenAI::Beta::AgentTextParam),
|
|
334
|
+
tools: T.nilable(
|
|
335
|
+
T::Array[
|
|
336
|
+
T.any(
|
|
337
|
+
OpenAI::Beta::AgentToolParam::Function,
|
|
338
|
+
OpenAI::Beta::AgentToolParam::ToolSearch,
|
|
339
|
+
OpenAI::Beta::AgentToolParam::ProgrammaticToolCalling,
|
|
340
|
+
OpenAI::Beta::AgentToolParam::Mcp,
|
|
341
|
+
OpenAI::Beta::AgentToolParam::WebSearch,
|
|
342
|
+
OpenAI::Beta::AgentToolParam::ComputerUse,
|
|
343
|
+
OpenAI::Beta::AgentToolParam::Automations
|
|
344
|
+
)
|
|
345
|
+
]
|
|
346
|
+
)
|
|
347
|
+
}
|
|
348
|
+
)
|
|
349
|
+
end
|
|
350
|
+
def to_hash
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
354
|
+
OrHash = T.type_alias do
|
|
355
|
+
T.any(
|
|
356
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction,
|
|
357
|
+
OpenAI::Internal::AnyHash
|
|
358
|
+
)
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
362
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
363
|
+
# token usage.
|
|
364
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
365
|
+
attr_accessor :async
|
|
366
|
+
|
|
367
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
368
|
+
# object replaces the settings; null or an empty object enables background
|
|
369
|
+
# compaction.
|
|
370
|
+
sig do
|
|
371
|
+
params(
|
|
372
|
+
|
|
373
|
+
async: T.nilable(T::Boolean)
|
|
374
|
+
)
|
|
375
|
+
.returns(T.attached_class)
|
|
376
|
+
end
|
|
377
|
+
def self.new(
|
|
378
|
+
|
|
379
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
380
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
381
|
+
# token usage.
|
|
382
|
+
|
|
383
|
+
async: nil
|
|
384
|
+
)
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
sig do
|
|
388
|
+
override.returns(
|
|
389
|
+
{async: T.nilable(T::Boolean)}
|
|
390
|
+
)
|
|
391
|
+
end
|
|
392
|
+
def to_hash
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
class Experimental < OpenAI::Internal::Type::BaseModel
|
|
398
|
+
OrHash = T.type_alias do
|
|
399
|
+
T.any(
|
|
400
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental,
|
|
401
|
+
OpenAI::Internal::AnyHash
|
|
402
|
+
)
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
406
|
+
# current setting.
|
|
407
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
408
|
+
attr_reader :time_awareness
|
|
409
|
+
|
|
410
|
+
sig { params(time_awareness: T::Boolean).void }
|
|
411
|
+
attr_writer :time_awareness
|
|
412
|
+
|
|
413
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
414
|
+
# values.
|
|
415
|
+
sig do
|
|
416
|
+
params(
|
|
417
|
+
|
|
418
|
+
time_awareness: T::Boolean
|
|
419
|
+
)
|
|
420
|
+
.returns(T.attached_class)
|
|
421
|
+
end
|
|
422
|
+
def self.new(
|
|
423
|
+
|
|
424
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
425
|
+
# current setting.
|
|
426
|
+
|
|
427
|
+
time_awareness: nil
|
|
428
|
+
)
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
sig do
|
|
432
|
+
override.returns(
|
|
433
|
+
{time_awareness: T::Boolean}
|
|
434
|
+
)
|
|
435
|
+
end
|
|
436
|
+
def to_hash
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# The service tier used for model requests.
|
|
442
|
+
module ServiceTier
|
|
443
|
+
extend OpenAI::Internal::Type::Enum
|
|
444
|
+
|
|
445
|
+
TaggedSymbol = T.type_alias {
|
|
446
|
+
T.all(Symbol, OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier)
|
|
447
|
+
}
|
|
448
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
449
|
+
|
|
450
|
+
# Selects the service tier automatically.
|
|
451
|
+
AUTO = T.let(
|
|
452
|
+
:auto,
|
|
453
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::TaggedSymbol
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
# Uses the default service tier.
|
|
457
|
+
DEFAULT = T.let(
|
|
458
|
+
:default,
|
|
459
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::TaggedSymbol
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
# Uses the flex service tier.
|
|
463
|
+
FLEX = T.let(
|
|
464
|
+
:flex,
|
|
465
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::TaggedSymbol
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
# Uses the priority service tier.
|
|
469
|
+
PRIORITY = T.let(
|
|
470
|
+
:priority,
|
|
471
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::TaggedSymbol
|
|
472
|
+
)
|
|
473
|
+
|
|
474
|
+
# Uses the fast service tier.
|
|
475
|
+
FAST = T.let(
|
|
476
|
+
:fast,
|
|
477
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::TaggedSymbol
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
# Uses the ultrafast service tier.
|
|
481
|
+
ULTRAFAST = T.let(
|
|
482
|
+
:ultrafast,
|
|
483
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::TaggedSymbol
|
|
484
|
+
)
|
|
485
|
+
|
|
486
|
+
sig {
|
|
487
|
+
override.returns(
|
|
488
|
+
T::Array[OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier::TaggedSymbol]
|
|
489
|
+
)
|
|
490
|
+
}
|
|
491
|
+
def self.values
|
|
492
|
+
end
|
|
493
|
+
end
|
|
494
|
+
end
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
class ExistingSession < OpenAI::Internal::Type::BaseModel
|
|
498
|
+
OrHash = T.type_alias do
|
|
499
|
+
T.any(
|
|
500
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession,
|
|
501
|
+
OpenAI::Internal::AnyHash
|
|
502
|
+
)
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
# Instructions delivered as an automation notification.
|
|
506
|
+
sig { returns(String) }
|
|
507
|
+
attr_accessor :instructions
|
|
508
|
+
|
|
509
|
+
# The session receiving each invocation.
|
|
510
|
+
sig { returns(String) }
|
|
511
|
+
attr_accessor :session_id
|
|
512
|
+
|
|
513
|
+
# The type of the object. Always `existing_session`.
|
|
514
|
+
sig { returns(Symbol) }
|
|
515
|
+
attr_accessor :type
|
|
516
|
+
|
|
517
|
+
# Deliver instructions to an existing session.
|
|
518
|
+
sig do
|
|
519
|
+
params(
|
|
520
|
+
|
|
521
|
+
instructions: String,
|
|
522
|
+
|
|
523
|
+
session_id: String,
|
|
524
|
+
|
|
525
|
+
type: Symbol
|
|
526
|
+
)
|
|
527
|
+
.returns(T.attached_class)
|
|
528
|
+
end
|
|
529
|
+
def self.new(
|
|
530
|
+
|
|
531
|
+
# Instructions delivered as an automation notification.
|
|
532
|
+
instructions:,
|
|
533
|
+
|
|
534
|
+
# The session receiving each invocation.
|
|
535
|
+
session_id:,
|
|
536
|
+
|
|
537
|
+
# The type of the object. Always `existing_session`.
|
|
538
|
+
|
|
539
|
+
type: :existing_session
|
|
540
|
+
)
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
sig do
|
|
544
|
+
override.returns(
|
|
545
|
+
{instructions: String, session_id: String, type: Symbol}
|
|
546
|
+
)
|
|
547
|
+
end
|
|
548
|
+
def to_hash
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
sig { override.returns(T::Array[OpenAI::Beta::Agents::AutomationTargetParam::Variants]) }
|
|
554
|
+
def self.variants
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
end
|
|
564
|
+
end
|