openai 0.119.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 +26 -0
- data/README.md +1 -1
- data/lib/openai/models/all_models.rb +1 -0
- 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_response.rb +3 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +6 -0
- data/lib/openai/models/beta/response_compact_params.rb +6 -0
- data/lib/openai/models/beta/response_create_params.rb +6 -0
- data/lib/openai/models/responses/response_compact_params.rb +3 -0
- data/lib/openai/models/responses_model.rb +1 -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/all_models.rbi +1 -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_response.rbi +1 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +8 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +2 -0
- data/rbi/openai/models/beta/response_create_params.rbi +2 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +1 -0
- data/rbi/openai/models/responses_model.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/all_models.rbs +2 -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_response.rbs +2 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +4 -0
- data/sig/openai/models/beta/response_compact_params.rbs +4 -0
- data/sig/openai/models/beta/response_create_params.rbs +4 -0
- data/sig/openai/models/responses/response_compact_params.rbs +2 -0
- data/sig/openai/models/responses_model.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,127 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type automation_schedule_param =
|
|
6
|
+
OpenAI::Beta::Agents::AutomationScheduleParam::Periodic
|
|
7
|
+
| OpenAI::Beta::Agents::AutomationScheduleParam::Once
|
|
8
|
+
|
|
9
|
+
module AutomationScheduleParam
|
|
10
|
+
extend OpenAI::Internal::Type::Union
|
|
11
|
+
|
|
12
|
+
type periodic =
|
|
13
|
+
{
|
|
14
|
+
expression: String,
|
|
15
|
+
name: String,
|
|
16
|
+
target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
17
|
+
timezone: String,
|
|
18
|
+
?type: :periodic,
|
|
19
|
+
?metadata: ::Hash[Symbol, String]
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class Periodic < OpenAI::Internal::Type::BaseModel
|
|
23
|
+
# A standard five-field cron expression defining scheduled occurrences.
|
|
24
|
+
attr_accessor expression: String
|
|
25
|
+
|
|
26
|
+
# A human-readable name for the automation.
|
|
27
|
+
attr_accessor name: String
|
|
28
|
+
|
|
29
|
+
# The session an automation invocation targets.
|
|
30
|
+
attr_accessor target: OpenAI::Models::Beta::Agents::automation_target_param
|
|
31
|
+
|
|
32
|
+
# The IANA timezone used to interpret the cron expression.
|
|
33
|
+
attr_accessor timezone: String
|
|
34
|
+
|
|
35
|
+
# The type of the object. Always `periodic`.
|
|
36
|
+
attr_accessor type: :periodic
|
|
37
|
+
|
|
38
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
39
|
+
|
|
40
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
41
|
+
|
|
42
|
+
# @param expression
|
|
43
|
+
# A standard five-field cron expression defining scheduled occurrences.
|
|
44
|
+
# @param name
|
|
45
|
+
# A human-readable name for the automation.
|
|
46
|
+
# @param target
|
|
47
|
+
# The session an automation invocation targets.
|
|
48
|
+
# @param timezone
|
|
49
|
+
# The IANA timezone used to interpret the cron expression.
|
|
50
|
+
# @param type
|
|
51
|
+
# The type of the object. Always `periodic`.
|
|
52
|
+
def initialize: (
|
|
53
|
+
expression: String,
|
|
54
|
+
name: String,
|
|
55
|
+
target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
56
|
+
timezone: String,
|
|
57
|
+
?metadata: ::Hash[Symbol, String],
|
|
58
|
+
?type: :periodic
|
|
59
|
+
) -> void
|
|
60
|
+
|
|
61
|
+
def to_hash: -> {
|
|
62
|
+
expression: String,
|
|
63
|
+
name: String,
|
|
64
|
+
target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
65
|
+
timezone: String,
|
|
66
|
+
?type: :periodic,
|
|
67
|
+
?metadata: ::Hash[Symbol, String]
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
type once =
|
|
72
|
+
{
|
|
73
|
+
name: String,
|
|
74
|
+
run_at: Integer,
|
|
75
|
+
target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
76
|
+
?type: :once,
|
|
77
|
+
?metadata: ::Hash[Symbol, String]
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
class Once < OpenAI::Internal::Type::BaseModel
|
|
81
|
+
# A human-readable name for the automation.
|
|
82
|
+
attr_accessor name: String
|
|
83
|
+
|
|
84
|
+
# A future Unix timestamp in seconds.
|
|
85
|
+
attr_accessor run_at: Integer
|
|
86
|
+
|
|
87
|
+
# The session an automation invocation targets.
|
|
88
|
+
attr_accessor target: OpenAI::Models::Beta::Agents::automation_target_param
|
|
89
|
+
|
|
90
|
+
# The type of the object. Always `once`.
|
|
91
|
+
attr_accessor type: :once
|
|
92
|
+
|
|
93
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
94
|
+
|
|
95
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
96
|
+
|
|
97
|
+
# @param name
|
|
98
|
+
# A human-readable name for the automation.
|
|
99
|
+
# @param run_at
|
|
100
|
+
# A future Unix timestamp in seconds.
|
|
101
|
+
# @param target
|
|
102
|
+
# The session an automation invocation targets.
|
|
103
|
+
# @param type
|
|
104
|
+
# The type of the object. Always `once`.
|
|
105
|
+
def initialize: (
|
|
106
|
+
name: String,
|
|
107
|
+
run_at: Integer,
|
|
108
|
+
target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
109
|
+
?metadata: ::Hash[Symbol, String],
|
|
110
|
+
?type: :once
|
|
111
|
+
) -> void
|
|
112
|
+
|
|
113
|
+
def to_hash: -> {
|
|
114
|
+
name: String,
|
|
115
|
+
run_at: Integer,
|
|
116
|
+
target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
117
|
+
?type: :once,
|
|
118
|
+
?metadata: ::Hash[Symbol, String]
|
|
119
|
+
}
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::Agents::automation_schedule_param]
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type automation_target =
|
|
6
|
+
OpenAI::Beta::Agents::AutomationTarget::NewSession
|
|
7
|
+
| OpenAI::Beta::Agents::AutomationTarget::ExistingSession
|
|
8
|
+
|
|
9
|
+
module AutomationTarget
|
|
10
|
+
extend OpenAI::Internal::Type::Union
|
|
11
|
+
|
|
12
|
+
type new_session =
|
|
13
|
+
{
|
|
14
|
+
agent: OpenAI::Beta::Agents::AutomationAgentConfig?,
|
|
15
|
+
agent_id: String?,
|
|
16
|
+
environment: OpenAI::Models::Beta::Agents::automation_environment,
|
|
17
|
+
input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input],
|
|
18
|
+
metadata: ::Hash[Symbol, String],
|
|
19
|
+
?type: :new_session,
|
|
20
|
+
vault_ids: ::Array[String]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
class NewSession < OpenAI::Internal::Type::BaseModel
|
|
24
|
+
# The inline agent configuration, or null when agent_id is configured.
|
|
25
|
+
attr_accessor agent: OpenAI::Beta::Agents::AutomationAgentConfig?
|
|
26
|
+
|
|
27
|
+
# The saved agent reference, or null when an inline agent is configured.
|
|
28
|
+
attr_accessor agent_id: String?
|
|
29
|
+
|
|
30
|
+
# Configuration or references used to select the execution environment.
|
|
31
|
+
attr_accessor environment: OpenAI::Models::Beta::Agents::automation_environment
|
|
32
|
+
|
|
33
|
+
# Initial input delivered to each new session.
|
|
34
|
+
attr_accessor input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input]
|
|
35
|
+
|
|
36
|
+
# Metadata attached to each new session.
|
|
37
|
+
attr_accessor metadata: ::Hash[Symbol, String]
|
|
38
|
+
|
|
39
|
+
# The type of the object. Always `new_session`.
|
|
40
|
+
attr_accessor type: :new_session
|
|
41
|
+
|
|
42
|
+
# Vaults made available to each new session.
|
|
43
|
+
attr_accessor vault_ids: ::Array[String]
|
|
44
|
+
|
|
45
|
+
# @param agent
|
|
46
|
+
# The inline agent configuration, or null when agent_id is configured.
|
|
47
|
+
# @param agent_id
|
|
48
|
+
# The saved agent reference, or null when an inline agent is configured.
|
|
49
|
+
# @param environment
|
|
50
|
+
# Configuration or references used to select the execution environment.
|
|
51
|
+
# @param input
|
|
52
|
+
# Initial input delivered to each new session.
|
|
53
|
+
# @param metadata
|
|
54
|
+
# Metadata attached to each new session.
|
|
55
|
+
# @param vault_ids
|
|
56
|
+
# Vaults made available to each new session.
|
|
57
|
+
# @param type
|
|
58
|
+
# The type of the object. Always `new_session`.
|
|
59
|
+
def initialize: (
|
|
60
|
+
agent: OpenAI::Beta::Agents::AutomationAgentConfig?,
|
|
61
|
+
agent_id: String?,
|
|
62
|
+
environment: OpenAI::Models::Beta::Agents::automation_environment,
|
|
63
|
+
input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input],
|
|
64
|
+
metadata: ::Hash[Symbol, String],
|
|
65
|
+
vault_ids: ::Array[String],
|
|
66
|
+
?type: :new_session
|
|
67
|
+
) -> void
|
|
68
|
+
|
|
69
|
+
def to_hash: -> {
|
|
70
|
+
agent: OpenAI::Beta::Agents::AutomationAgentConfig?,
|
|
71
|
+
agent_id: String?,
|
|
72
|
+
environment: OpenAI::Models::Beta::Agents::automation_environment,
|
|
73
|
+
input: ::Array[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input],
|
|
74
|
+
metadata: ::Hash[Symbol, String],
|
|
75
|
+
?type: :new_session,
|
|
76
|
+
vault_ids: ::Array[String]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type input =
|
|
80
|
+
{
|
|
81
|
+
content: ::Array[OpenAI::Models::Beta::input_content],
|
|
82
|
+
?role: :user,
|
|
83
|
+
?type: :message
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
class Input < OpenAI::Internal::Type::BaseModel
|
|
87
|
+
# The content of the message.
|
|
88
|
+
attr_accessor content: ::Array[OpenAI::Models::Beta::input_content]
|
|
89
|
+
|
|
90
|
+
# The role of the message author. Always `user`.
|
|
91
|
+
attr_accessor role: :user
|
|
92
|
+
|
|
93
|
+
# The type of the input item. Always `message`.
|
|
94
|
+
attr_accessor type: :message
|
|
95
|
+
|
|
96
|
+
# @param content
|
|
97
|
+
# The content of the message.
|
|
98
|
+
# @param role
|
|
99
|
+
# The role of the message author. Always `user`.
|
|
100
|
+
# @param type
|
|
101
|
+
# The type of the input item. Always `message`.
|
|
102
|
+
def initialize: (
|
|
103
|
+
content: ::Array[OpenAI::Models::Beta::input_content],
|
|
104
|
+
?role: :user,
|
|
105
|
+
?type: :message
|
|
106
|
+
) -> void
|
|
107
|
+
|
|
108
|
+
def to_hash: -> {
|
|
109
|
+
content: ::Array[OpenAI::Models::Beta::input_content],
|
|
110
|
+
?role: :user,
|
|
111
|
+
?type: :message
|
|
112
|
+
}
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
type existing_session =
|
|
117
|
+
{
|
|
118
|
+
instructions: String,
|
|
119
|
+
session_id: String,
|
|
120
|
+
?type: :existing_session
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
class ExistingSession < OpenAI::Internal::Type::BaseModel
|
|
124
|
+
# Saved instructions delivered as an automation notification.
|
|
125
|
+
attr_accessor instructions: String
|
|
126
|
+
|
|
127
|
+
# The session receiving each invocation.
|
|
128
|
+
attr_accessor session_id: String
|
|
129
|
+
|
|
130
|
+
# The type of the object. Always `existing_session`.
|
|
131
|
+
attr_accessor type: :existing_session
|
|
132
|
+
|
|
133
|
+
# @param instructions
|
|
134
|
+
# Saved instructions delivered as an automation notification.
|
|
135
|
+
# @param session_id
|
|
136
|
+
# The session receiving each invocation.
|
|
137
|
+
# @param type
|
|
138
|
+
# The type of the object. Always `existing_session`.
|
|
139
|
+
def initialize: (
|
|
140
|
+
instructions: String,
|
|
141
|
+
session_id: String,
|
|
142
|
+
?type: :existing_session
|
|
143
|
+
) -> void
|
|
144
|
+
|
|
145
|
+
def to_hash: -> {
|
|
146
|
+
instructions: String,
|
|
147
|
+
session_id: String,
|
|
148
|
+
?type: :existing_session
|
|
149
|
+
}
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::Agents::automation_target]
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type automation_target_param =
|
|
6
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession
|
|
7
|
+
| OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
|
|
8
|
+
|
|
9
|
+
module AutomationTargetParam
|
|
10
|
+
extend OpenAI::Internal::Type::Union
|
|
11
|
+
|
|
12
|
+
type new_session =
|
|
13
|
+
{
|
|
14
|
+
environment: OpenAI::Models::Beta::environment_param,
|
|
15
|
+
input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam],
|
|
16
|
+
?type: :new_session,
|
|
17
|
+
?agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent,
|
|
18
|
+
?agent_id: String,
|
|
19
|
+
?metadata: ::Hash[Symbol, String]?,
|
|
20
|
+
?vault_ids: ::Array[String]?
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
class NewSession < OpenAI::Internal::Type::BaseModel
|
|
24
|
+
# The execution environment for each new session.
|
|
25
|
+
attr_accessor environment: OpenAI::Models::Beta::environment_param
|
|
26
|
+
|
|
27
|
+
# Initial user messages submitted with each new session.
|
|
28
|
+
attr_accessor input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam]
|
|
29
|
+
|
|
30
|
+
# The type of the object. Always `new_session`.
|
|
31
|
+
attr_accessor type: :new_session
|
|
32
|
+
|
|
33
|
+
# Inline agent configuration. Provide exactly one of agent and agent_id.
|
|
34
|
+
attr_reader agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent?
|
|
35
|
+
|
|
36
|
+
# Inline agent configuration. Provide exactly one of agent and agent_id.
|
|
37
|
+
def agent=: (
|
|
38
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent
|
|
39
|
+
) -> OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent
|
|
40
|
+
|
|
41
|
+
# A saved agent ID. Provide exactly one of agent and agent_id.
|
|
42
|
+
attr_reader agent_id: String?
|
|
43
|
+
|
|
44
|
+
# A saved agent ID. Provide exactly one of agent and agent_id.
|
|
45
|
+
def agent_id=: (String) -> String
|
|
46
|
+
|
|
47
|
+
# Metadata attached to each new session.
|
|
48
|
+
attr_accessor metadata: ::Hash[Symbol, String]?
|
|
49
|
+
|
|
50
|
+
# The IDs of vaults made available to each new session.
|
|
51
|
+
attr_accessor vault_ids: ::Array[String]?
|
|
52
|
+
|
|
53
|
+
# @param environment
|
|
54
|
+
# The execution environment for each new session.
|
|
55
|
+
# @param input
|
|
56
|
+
# Initial user messages submitted with each new session.
|
|
57
|
+
# @param agent
|
|
58
|
+
# Inline agent configuration. Provide exactly one of agent and agent_id.
|
|
59
|
+
# @param agent_id
|
|
60
|
+
# A saved agent ID. Provide exactly one of agent and agent_id.
|
|
61
|
+
# @param metadata
|
|
62
|
+
# Metadata attached to each new session.
|
|
63
|
+
# @param vault_ids
|
|
64
|
+
# The IDs of vaults made available to each new session.
|
|
65
|
+
# @param type
|
|
66
|
+
# The type of the object. Always `new_session`.
|
|
67
|
+
def initialize: (
|
|
68
|
+
environment: OpenAI::Models::Beta::environment_param,
|
|
69
|
+
input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam],
|
|
70
|
+
?agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent,
|
|
71
|
+
?agent_id: String,
|
|
72
|
+
?metadata: ::Hash[Symbol, String]?,
|
|
73
|
+
?vault_ids: ::Array[String]?,
|
|
74
|
+
?type: :new_session
|
|
75
|
+
) -> void
|
|
76
|
+
|
|
77
|
+
def to_hash: -> {
|
|
78
|
+
environment: OpenAI::Models::Beta::environment_param,
|
|
79
|
+
input: ::Array[OpenAI::Beta::AgentSessionInputMessageParam],
|
|
80
|
+
?type: :new_session,
|
|
81
|
+
?agent: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent,
|
|
82
|
+
?agent_id: String,
|
|
83
|
+
?metadata: ::Hash[Symbol, String]?,
|
|
84
|
+
?vault_ids: ::Array[String]?
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
type agent =
|
|
88
|
+
{
|
|
89
|
+
?compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?,
|
|
90
|
+
?experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental,
|
|
91
|
+
?instructions: String?,
|
|
92
|
+
?model: String,
|
|
93
|
+
?multi_agent: OpenAI::Beta::MultiAgentConfigParam?,
|
|
94
|
+
?reasoning: OpenAI::Beta::AgentReasoningParam?,
|
|
95
|
+
?service_tier: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?,
|
|
96
|
+
?text: OpenAI::Beta::AgentTextParam?,
|
|
97
|
+
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
class Agent < OpenAI::Internal::Type::BaseModel
|
|
101
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
102
|
+
# object replaces the settings; null or an empty object enables background
|
|
103
|
+
# compaction.
|
|
104
|
+
attr_accessor compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?
|
|
105
|
+
|
|
106
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
107
|
+
# values.
|
|
108
|
+
attr_reader experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental?
|
|
109
|
+
|
|
110
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
111
|
+
# values.
|
|
112
|
+
def experimental=: (
|
|
113
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental
|
|
114
|
+
) -> OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental
|
|
115
|
+
|
|
116
|
+
# Additional instructions appended to the agent's default base instructions. Omit
|
|
117
|
+
# to leave unchanged.
|
|
118
|
+
attr_accessor instructions: String?
|
|
119
|
+
|
|
120
|
+
# The model to use for the agent. The requested model name is preserved.
|
|
121
|
+
attr_reader model: String?
|
|
122
|
+
|
|
123
|
+
# The model to use for the agent. The requested model name is preserved.
|
|
124
|
+
def model=: (String) -> String
|
|
125
|
+
|
|
126
|
+
# Configuration for creating and coordinating subagents.
|
|
127
|
+
attr_accessor multi_agent: OpenAI::Beta::MultiAgentConfigParam?
|
|
128
|
+
|
|
129
|
+
# Configuration for model reasoning. Omit to keep the current settings; pass
|
|
130
|
+
# `null` to reset to the model's default effort.
|
|
131
|
+
attr_accessor reasoning: OpenAI::Beta::AgentReasoningParam?
|
|
132
|
+
|
|
133
|
+
# The service tier used for model requests.
|
|
134
|
+
attr_accessor service_tier: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?
|
|
135
|
+
|
|
136
|
+
# Configuration for text generated by the agent.
|
|
137
|
+
attr_accessor text: OpenAI::Beta::AgentTextParam?
|
|
138
|
+
|
|
139
|
+
# Tools available to the agent. Omit to inherit, or pass null to clear them. The
|
|
140
|
+
# resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
|
|
141
|
+
# JSON.
|
|
142
|
+
attr_accessor tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
143
|
+
|
|
144
|
+
# @param compaction
|
|
145
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
146
|
+
# object replaces the settings; null or an empty object enables background
|
|
147
|
+
# compaction.
|
|
148
|
+
# @param experimental
|
|
149
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
150
|
+
# values.
|
|
151
|
+
# @param instructions
|
|
152
|
+
# Additional instructions appended to the agent's default base instructions. Omit
|
|
153
|
+
# to leave unchanged.
|
|
154
|
+
# @param model
|
|
155
|
+
# The model to use for the agent. The requested model name is preserved.
|
|
156
|
+
# @param multi_agent
|
|
157
|
+
# Configuration for creating and coordinating subagents.
|
|
158
|
+
# @param reasoning
|
|
159
|
+
# Configuration for model reasoning. Omit to keep the current settings; pass
|
|
160
|
+
# `null` to reset to the model's default effort.
|
|
161
|
+
# @param service_tier
|
|
162
|
+
# The service tier used for model requests.
|
|
163
|
+
# @param text
|
|
164
|
+
# Configuration for text generated by the agent.
|
|
165
|
+
# @param tools
|
|
166
|
+
# Tools available to the agent. Omit to inherit, or pass null to clear them. The
|
|
167
|
+
# resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
|
|
168
|
+
# JSON.
|
|
169
|
+
def initialize: (
|
|
170
|
+
?compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?,
|
|
171
|
+
?experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental,
|
|
172
|
+
?instructions: String?,
|
|
173
|
+
?model: String,
|
|
174
|
+
?multi_agent: OpenAI::Beta::MultiAgentConfigParam?,
|
|
175
|
+
?reasoning: OpenAI::Beta::AgentReasoningParam?,
|
|
176
|
+
?service_tier: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?,
|
|
177
|
+
?text: OpenAI::Beta::AgentTextParam?,
|
|
178
|
+
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
179
|
+
) -> void
|
|
180
|
+
|
|
181
|
+
def to_hash: -> {
|
|
182
|
+
?compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?,
|
|
183
|
+
?experimental: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental,
|
|
184
|
+
?instructions: String?,
|
|
185
|
+
?model: String,
|
|
186
|
+
?multi_agent: OpenAI::Beta::MultiAgentConfigParam?,
|
|
187
|
+
?reasoning: OpenAI::Beta::AgentReasoningParam?,
|
|
188
|
+
?service_tier: OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier?,
|
|
189
|
+
?text: OpenAI::Beta::AgentTextParam?,
|
|
190
|
+
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
type compaction = { ?async: bool? }
|
|
194
|
+
|
|
195
|
+
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
196
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
197
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
198
|
+
# token usage.
|
|
199
|
+
attr_accessor async: bool?
|
|
200
|
+
|
|
201
|
+
# @param async
|
|
202
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
203
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
204
|
+
# token usage.
|
|
205
|
+
def initialize: (?async: bool?) -> void
|
|
206
|
+
|
|
207
|
+
def to_hash: -> { ?async: bool? }
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
type experimental = { ?time_awareness: bool }
|
|
211
|
+
|
|
212
|
+
class Experimental < OpenAI::Internal::Type::BaseModel
|
|
213
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
214
|
+
# current setting.
|
|
215
|
+
attr_reader time_awareness: bool?
|
|
216
|
+
|
|
217
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
218
|
+
# current setting.
|
|
219
|
+
def time_awareness=: (bool) -> bool
|
|
220
|
+
|
|
221
|
+
# @param time_awareness
|
|
222
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
223
|
+
# current setting.
|
|
224
|
+
def initialize: (?time_awareness: bool) -> void
|
|
225
|
+
|
|
226
|
+
def to_hash: -> { ?time_awareness: bool }
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
type service_tier =
|
|
230
|
+
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
231
|
+
|
|
232
|
+
module ServiceTier
|
|
233
|
+
extend OpenAI::Internal::Type::Enum
|
|
234
|
+
|
|
235
|
+
# Selects the service tier automatically.
|
|
236
|
+
AUTO: :auto
|
|
237
|
+
|
|
238
|
+
# Uses the default service tier.
|
|
239
|
+
DEFAULT: :default
|
|
240
|
+
|
|
241
|
+
# Uses the flex service tier.
|
|
242
|
+
FLEX: :flex
|
|
243
|
+
|
|
244
|
+
# Uses the priority service tier.
|
|
245
|
+
PRIORITY: :priority
|
|
246
|
+
|
|
247
|
+
# Uses the fast service tier.
|
|
248
|
+
FAST: :fast
|
|
249
|
+
|
|
250
|
+
# Uses the ultrafast service tier.
|
|
251
|
+
ULTRAFAST: :ultrafast
|
|
252
|
+
|
|
253
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::service_tier]
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
type existing_session =
|
|
259
|
+
{
|
|
260
|
+
instructions: String,
|
|
261
|
+
session_id: String,
|
|
262
|
+
?type: :existing_session
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
class ExistingSession < OpenAI::Internal::Type::BaseModel
|
|
266
|
+
# Instructions delivered as an automation notification.
|
|
267
|
+
attr_accessor instructions: String
|
|
268
|
+
|
|
269
|
+
# The session receiving each invocation.
|
|
270
|
+
attr_accessor session_id: String
|
|
271
|
+
|
|
272
|
+
# The type of the object. Always `existing_session`.
|
|
273
|
+
attr_accessor type: :existing_session
|
|
274
|
+
|
|
275
|
+
# @param instructions
|
|
276
|
+
# Instructions delivered as an automation notification.
|
|
277
|
+
# @param session_id
|
|
278
|
+
# The session receiving each invocation.
|
|
279
|
+
# @param type
|
|
280
|
+
# The type of the object. Always `existing_session`.
|
|
281
|
+
def initialize: (
|
|
282
|
+
instructions: String,
|
|
283
|
+
session_id: String,
|
|
284
|
+
?type: :existing_session
|
|
285
|
+
) -> void
|
|
286
|
+
|
|
287
|
+
def to_hash: -> {
|
|
288
|
+
instructions: String,
|
|
289
|
+
session_id: String,
|
|
290
|
+
?type: :existing_session
|
|
291
|
+
}
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::Agents::automation_target_param]
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Beta
|
|
4
|
+
module Agents
|
|
5
|
+
type automation_update_params =
|
|
6
|
+
{
|
|
7
|
+
automation_id: String,
|
|
8
|
+
?expression: String,
|
|
9
|
+
?metadata: ::Hash[Symbol, String],
|
|
10
|
+
?name: String,
|
|
11
|
+
?run_at: Integer,
|
|
12
|
+
?target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
13
|
+
?timezone: String,
|
|
14
|
+
?request_options: OpenAI::request_opts
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class AutomationUpdateParams < OpenAI::Internal::Type::BaseModel
|
|
18
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
19
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
20
|
+
|
|
21
|
+
attr_accessor automation_id: String
|
|
22
|
+
|
|
23
|
+
# Only accepted for periodic automations.
|
|
24
|
+
attr_reader expression: String?
|
|
25
|
+
|
|
26
|
+
# Only accepted for periodic automations.
|
|
27
|
+
def expression=: (String) -> String
|
|
28
|
+
|
|
29
|
+
# Replaces all metadata; omit to leave unchanged.
|
|
30
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
31
|
+
|
|
32
|
+
# Replaces all metadata; omit to leave unchanged.
|
|
33
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
34
|
+
|
|
35
|
+
attr_reader name: String?
|
|
36
|
+
|
|
37
|
+
def name=: (String) -> String
|
|
38
|
+
|
|
39
|
+
# A future Unix timestamp in seconds; accepted only before a one-time scheduled
|
|
40
|
+
# invocation exists.
|
|
41
|
+
attr_reader run_at: Integer?
|
|
42
|
+
|
|
43
|
+
# A future Unix timestamp in seconds; accepted only before a one-time scheduled
|
|
44
|
+
# invocation exists.
|
|
45
|
+
def run_at=: (Integer) -> Integer
|
|
46
|
+
|
|
47
|
+
# Replaces the complete target, retaining its type and any creator session.
|
|
48
|
+
attr_reader target: OpenAI::Models::Beta::Agents::automation_target_param?
|
|
49
|
+
|
|
50
|
+
# Replaces the complete target, retaining its type and any creator session.
|
|
51
|
+
def target=: (
|
|
52
|
+
OpenAI::Models::Beta::Agents::automation_target_param
|
|
53
|
+
) -> OpenAI::Models::Beta::Agents::automation_target_param
|
|
54
|
+
|
|
55
|
+
# Only accepted for periodic automations.
|
|
56
|
+
attr_reader timezone: String?
|
|
57
|
+
|
|
58
|
+
# Only accepted for periodic automations.
|
|
59
|
+
def timezone=: (String) -> String
|
|
60
|
+
|
|
61
|
+
# @param expression
|
|
62
|
+
# Only accepted for periodic automations.
|
|
63
|
+
# @param metadata
|
|
64
|
+
# Replaces all metadata; omit to leave unchanged.
|
|
65
|
+
# @param run_at
|
|
66
|
+
# A future Unix timestamp in seconds; accepted only before a one-time scheduled
|
|
67
|
+
# invocation exists.
|
|
68
|
+
# @param target
|
|
69
|
+
# Replaces the complete target, retaining its type and any creator session.
|
|
70
|
+
# @param timezone
|
|
71
|
+
# Only accepted for periodic automations.
|
|
72
|
+
def initialize: (
|
|
73
|
+
automation_id: String,
|
|
74
|
+
?expression: String,
|
|
75
|
+
?metadata: ::Hash[Symbol, String],
|
|
76
|
+
?name: String,
|
|
77
|
+
?run_at: Integer,
|
|
78
|
+
?target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
79
|
+
?timezone: String,
|
|
80
|
+
?request_options: OpenAI::request_opts
|
|
81
|
+
) -> void
|
|
82
|
+
|
|
83
|
+
def to_hash: -> {
|
|
84
|
+
automation_id: String,
|
|
85
|
+
?expression: String,
|
|
86
|
+
?metadata: ::Hash[Symbol, String],
|
|
87
|
+
?name: String,
|
|
88
|
+
?run_at: Integer,
|
|
89
|
+
?target: OpenAI::Models::Beta::Agents::automation_target_param,
|
|
90
|
+
?timezone: String,
|
|
91
|
+
?request_options: OpenAI::RequestOptions
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|