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,68 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
module Automations
|
|
11
|
+
|
|
12
|
+
class InvocationRetrieveParams < OpenAI::Internal::Type::BaseModel
|
|
13
|
+
|
|
14
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
OrHash = T.type_alias do
|
|
18
|
+
T.any(
|
|
19
|
+
OpenAI::Beta::Agents::Automations::InvocationRetrieveParams,
|
|
20
|
+
OpenAI::Internal::AnyHash
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
attr_accessor :automation_id
|
|
26
|
+
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :invocation_id
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
|
|
33
|
+
automation_id: String,
|
|
34
|
+
|
|
35
|
+
invocation_id: String,
|
|
36
|
+
|
|
37
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
38
|
+
)
|
|
39
|
+
.returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
|
|
43
|
+
automation_id:,
|
|
44
|
+
|
|
45
|
+
invocation_id:,
|
|
46
|
+
|
|
47
|
+
request_options: {}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
sig do
|
|
52
|
+
override.returns(
|
|
53
|
+
{automation_id: String, invocation_id: String, request_options: OpenAI::RequestOptions}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
def to_hash
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -24,11 +24,27 @@ module OpenAI
|
|
|
24
24
|
sig { returns(String) }
|
|
25
25
|
attr_accessor :environment_id
|
|
26
26
|
|
|
27
|
+
# A file materialized in an OpenAI-hosted execution environment.
|
|
28
|
+
sig {
|
|
29
|
+
returns(
|
|
30
|
+
T.any(
|
|
31
|
+
OpenAI::Beta::HostedEnvironmentFileParam::FileID,
|
|
32
|
+
OpenAI::Beta::HostedEnvironmentFileParam::Inline
|
|
33
|
+
)
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
attr_accessor :hosted_environment_file_param
|
|
37
|
+
|
|
27
38
|
sig do
|
|
28
39
|
params(
|
|
29
40
|
|
|
30
41
|
environment_id: String,
|
|
31
42
|
|
|
43
|
+
hosted_environment_file_param: T.any(
|
|
44
|
+
OpenAI::Beta::HostedEnvironmentFileParam::FileID::OrHash,
|
|
45
|
+
OpenAI::Beta::HostedEnvironmentFileParam::Inline::OrHash
|
|
46
|
+
),
|
|
47
|
+
|
|
32
48
|
request_options: OpenAI::RequestOptions::OrHash
|
|
33
49
|
)
|
|
34
50
|
.returns(T.attached_class)
|
|
@@ -37,13 +53,23 @@ module OpenAI
|
|
|
37
53
|
|
|
38
54
|
environment_id:,
|
|
39
55
|
|
|
56
|
+
# A file materialized in an OpenAI-hosted execution environment.
|
|
57
|
+
hosted_environment_file_param:,
|
|
58
|
+
|
|
40
59
|
request_options: {}
|
|
41
60
|
)
|
|
42
61
|
end
|
|
43
62
|
|
|
44
63
|
sig do
|
|
45
64
|
override.returns(
|
|
46
|
-
{
|
|
65
|
+
{
|
|
66
|
+
environment_id: String,
|
|
67
|
+
hosted_environment_file_param: T.any(
|
|
68
|
+
OpenAI::Beta::HostedEnvironmentFileParam::FileID,
|
|
69
|
+
OpenAI::Beta::HostedEnvironmentFileParam::Inline
|
|
70
|
+
),
|
|
71
|
+
request_options: OpenAI::RequestOptions
|
|
72
|
+
}
|
|
47
73
|
)
|
|
48
74
|
end
|
|
49
75
|
def to_hash
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
class OneTimeAutomation < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
|
|
12
|
+
OrHash = T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
OpenAI::Beta::Agents::OneTimeAutomation,
|
|
15
|
+
OpenAI::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# The automation ID.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :id
|
|
22
|
+
|
|
23
|
+
# The creation time as a Unix timestamp in seconds.
|
|
24
|
+
sig { returns(Integer) }
|
|
25
|
+
attr_accessor :created_at
|
|
26
|
+
|
|
27
|
+
# Service-recorded provenance; callers cannot supply this field.
|
|
28
|
+
sig { returns(OpenAI::Beta::Agents::AutomationCreatedBy::Variants) }
|
|
29
|
+
attr_accessor :created_by
|
|
30
|
+
|
|
31
|
+
# Custom string key-value pairs attached to the automation.
|
|
32
|
+
sig { returns(T::Hash[Symbol, String]) }
|
|
33
|
+
attr_accessor :metadata
|
|
34
|
+
|
|
35
|
+
# The automation's display name.
|
|
36
|
+
sig { returns(String) }
|
|
37
|
+
attr_accessor :name
|
|
38
|
+
|
|
39
|
+
# Always `agent.automation`.
|
|
40
|
+
sig { returns(Symbol) }
|
|
41
|
+
attr_accessor :object
|
|
42
|
+
|
|
43
|
+
# The Unix timestamp, in seconds, of the scheduled occurrence.
|
|
44
|
+
sig { returns(Integer) }
|
|
45
|
+
attr_accessor :run_at
|
|
46
|
+
|
|
47
|
+
# Completion means the schedule has finished, not the agent's work.
|
|
48
|
+
sig { returns(OpenAI::Beta::Agents::OneTimeAutomation::Status::TaggedSymbol) }
|
|
49
|
+
attr_accessor :status
|
|
50
|
+
|
|
51
|
+
# The session configuration or existing session receiving invocations.
|
|
52
|
+
sig { returns(OpenAI::Beta::Agents::AutomationTarget::Variants) }
|
|
53
|
+
attr_accessor :target
|
|
54
|
+
|
|
55
|
+
# The type of the object. Always `once`.
|
|
56
|
+
sig { returns(Symbol) }
|
|
57
|
+
attr_accessor :type
|
|
58
|
+
|
|
59
|
+
# Fields shared by periodic and one-time automations.
|
|
60
|
+
sig do
|
|
61
|
+
params(
|
|
62
|
+
|
|
63
|
+
id: String,
|
|
64
|
+
|
|
65
|
+
created_at: Integer,
|
|
66
|
+
|
|
67
|
+
created_by: T.any(
|
|
68
|
+
OpenAI::Beta::Agents::AutomationCreatedBy::Developer::OrHash,
|
|
69
|
+
OpenAI::Beta::Agents::AutomationCreatedBy::Agent::OrHash
|
|
70
|
+
),
|
|
71
|
+
|
|
72
|
+
metadata: T::Hash[Symbol, String],
|
|
73
|
+
|
|
74
|
+
name: String,
|
|
75
|
+
|
|
76
|
+
run_at: Integer,
|
|
77
|
+
|
|
78
|
+
status: OpenAI::Beta::Agents::OneTimeAutomation::Status::OrSymbol,
|
|
79
|
+
|
|
80
|
+
target: T.any(
|
|
81
|
+
OpenAI::Beta::Agents::AutomationTarget::NewSession::OrHash,
|
|
82
|
+
OpenAI::Beta::Agents::AutomationTarget::ExistingSession::OrHash
|
|
83
|
+
),
|
|
84
|
+
|
|
85
|
+
object: Symbol,
|
|
86
|
+
|
|
87
|
+
type: Symbol
|
|
88
|
+
)
|
|
89
|
+
.returns(T.attached_class)
|
|
90
|
+
end
|
|
91
|
+
def self.new(
|
|
92
|
+
|
|
93
|
+
# The automation ID.
|
|
94
|
+
id:,
|
|
95
|
+
|
|
96
|
+
# The creation time as a Unix timestamp in seconds.
|
|
97
|
+
created_at:,
|
|
98
|
+
|
|
99
|
+
# Service-recorded provenance; callers cannot supply this field.
|
|
100
|
+
created_by:,
|
|
101
|
+
|
|
102
|
+
# Custom string key-value pairs attached to the automation.
|
|
103
|
+
metadata:,
|
|
104
|
+
|
|
105
|
+
# The automation's display name.
|
|
106
|
+
name:,
|
|
107
|
+
|
|
108
|
+
# The Unix timestamp, in seconds, of the scheduled occurrence.
|
|
109
|
+
run_at:,
|
|
110
|
+
|
|
111
|
+
# Completion means the schedule has finished, not the agent's work.
|
|
112
|
+
status:,
|
|
113
|
+
|
|
114
|
+
# The session configuration or existing session receiving invocations.
|
|
115
|
+
target:,
|
|
116
|
+
|
|
117
|
+
# Always `agent.automation`.
|
|
118
|
+
object: :"agent.automation",
|
|
119
|
+
|
|
120
|
+
# The type of the object. Always `once`.
|
|
121
|
+
|
|
122
|
+
type: :once
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
sig do
|
|
127
|
+
override.returns(
|
|
128
|
+
{
|
|
129
|
+
id: String,
|
|
130
|
+
created_at: Integer,
|
|
131
|
+
created_by: OpenAI::Beta::Agents::AutomationCreatedBy::Variants,
|
|
132
|
+
metadata: T::Hash[Symbol, String],
|
|
133
|
+
name: String,
|
|
134
|
+
object: Symbol,
|
|
135
|
+
run_at: Integer,
|
|
136
|
+
status: OpenAI::Beta::Agents::OneTimeAutomation::Status::TaggedSymbol,
|
|
137
|
+
target: OpenAI::Beta::Agents::AutomationTarget::Variants,
|
|
138
|
+
type: Symbol
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
def to_hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Completion means the schedule has finished, not the agent's work.
|
|
146
|
+
module Status
|
|
147
|
+
extend OpenAI::Internal::Type::Enum
|
|
148
|
+
|
|
149
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::Agents::OneTimeAutomation::Status) }
|
|
150
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
151
|
+
|
|
152
|
+
ACTIVE = T.let(:active, OpenAI::Beta::Agents::OneTimeAutomation::Status::TaggedSymbol)
|
|
153
|
+
PAUSED = T.let(:paused, OpenAI::Beta::Agents::OneTimeAutomation::Status::TaggedSymbol)
|
|
154
|
+
COMPLETED = T.let(:completed, OpenAI::Beta::Agents::OneTimeAutomation::Status::TaggedSymbol)
|
|
155
|
+
|
|
156
|
+
sig { override.returns(T::Array[OpenAI::Beta::Agents::OneTimeAutomation::Status::TaggedSymbol]) }
|
|
157
|
+
def self.values
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
end
|
|
168
|
+
end
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
class PeriodicAutomation < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
|
|
12
|
+
OrHash = T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
OpenAI::Beta::Agents::PeriodicAutomation,
|
|
15
|
+
OpenAI::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# The automation ID.
|
|
20
|
+
sig { returns(String) }
|
|
21
|
+
attr_accessor :id
|
|
22
|
+
|
|
23
|
+
# The creation time as a Unix timestamp in seconds.
|
|
24
|
+
sig { returns(Integer) }
|
|
25
|
+
attr_accessor :created_at
|
|
26
|
+
|
|
27
|
+
# Service-recorded provenance; callers cannot supply this field.
|
|
28
|
+
sig { returns(OpenAI::Beta::Agents::AutomationCreatedBy::Variants) }
|
|
29
|
+
attr_accessor :created_by
|
|
30
|
+
|
|
31
|
+
# The cron expression determining scheduled occurrences.
|
|
32
|
+
sig { returns(String) }
|
|
33
|
+
attr_accessor :expression
|
|
34
|
+
|
|
35
|
+
# Custom string key-value pairs attached to the automation.
|
|
36
|
+
sig { returns(T::Hash[Symbol, String]) }
|
|
37
|
+
attr_accessor :metadata
|
|
38
|
+
|
|
39
|
+
# The automation's display name.
|
|
40
|
+
sig { returns(String) }
|
|
41
|
+
attr_accessor :name
|
|
42
|
+
|
|
43
|
+
# Always `agent.automation`.
|
|
44
|
+
sig { returns(Symbol) }
|
|
45
|
+
attr_accessor :object
|
|
46
|
+
|
|
47
|
+
# Whether scheduled delivery is active or paused.
|
|
48
|
+
sig { returns(OpenAI::Beta::Agents::PeriodicAutomation::Status::TaggedSymbol) }
|
|
49
|
+
attr_accessor :status
|
|
50
|
+
|
|
51
|
+
# The session configuration or existing session receiving invocations.
|
|
52
|
+
sig { returns(OpenAI::Beta::Agents::AutomationTarget::Variants) }
|
|
53
|
+
attr_accessor :target
|
|
54
|
+
|
|
55
|
+
# The timezone used to interpret the expression.
|
|
56
|
+
sig { returns(String) }
|
|
57
|
+
attr_accessor :timezone
|
|
58
|
+
|
|
59
|
+
# The type of the object. Always `periodic`.
|
|
60
|
+
sig { returns(Symbol) }
|
|
61
|
+
attr_accessor :type
|
|
62
|
+
|
|
63
|
+
# Fields shared by periodic and one-time automations.
|
|
64
|
+
sig do
|
|
65
|
+
params(
|
|
66
|
+
|
|
67
|
+
id: String,
|
|
68
|
+
|
|
69
|
+
created_at: Integer,
|
|
70
|
+
|
|
71
|
+
created_by: T.any(
|
|
72
|
+
OpenAI::Beta::Agents::AutomationCreatedBy::Developer::OrHash,
|
|
73
|
+
OpenAI::Beta::Agents::AutomationCreatedBy::Agent::OrHash
|
|
74
|
+
),
|
|
75
|
+
|
|
76
|
+
expression: String,
|
|
77
|
+
|
|
78
|
+
metadata: T::Hash[Symbol, String],
|
|
79
|
+
|
|
80
|
+
name: String,
|
|
81
|
+
|
|
82
|
+
status: OpenAI::Beta::Agents::PeriodicAutomation::Status::OrSymbol,
|
|
83
|
+
|
|
84
|
+
target: T.any(
|
|
85
|
+
OpenAI::Beta::Agents::AutomationTarget::NewSession::OrHash,
|
|
86
|
+
OpenAI::Beta::Agents::AutomationTarget::ExistingSession::OrHash
|
|
87
|
+
),
|
|
88
|
+
|
|
89
|
+
timezone: String,
|
|
90
|
+
|
|
91
|
+
object: Symbol,
|
|
92
|
+
|
|
93
|
+
type: Symbol
|
|
94
|
+
)
|
|
95
|
+
.returns(T.attached_class)
|
|
96
|
+
end
|
|
97
|
+
def self.new(
|
|
98
|
+
|
|
99
|
+
# The automation ID.
|
|
100
|
+
id:,
|
|
101
|
+
|
|
102
|
+
# The creation time as a Unix timestamp in seconds.
|
|
103
|
+
created_at:,
|
|
104
|
+
|
|
105
|
+
# Service-recorded provenance; callers cannot supply this field.
|
|
106
|
+
created_by:,
|
|
107
|
+
|
|
108
|
+
# The cron expression determining scheduled occurrences.
|
|
109
|
+
expression:,
|
|
110
|
+
|
|
111
|
+
# Custom string key-value pairs attached to the automation.
|
|
112
|
+
metadata:,
|
|
113
|
+
|
|
114
|
+
# The automation's display name.
|
|
115
|
+
name:,
|
|
116
|
+
|
|
117
|
+
# Whether scheduled delivery is active or paused.
|
|
118
|
+
status:,
|
|
119
|
+
|
|
120
|
+
# The session configuration or existing session receiving invocations.
|
|
121
|
+
target:,
|
|
122
|
+
|
|
123
|
+
# The timezone used to interpret the expression.
|
|
124
|
+
timezone:,
|
|
125
|
+
|
|
126
|
+
# Always `agent.automation`.
|
|
127
|
+
object: :"agent.automation",
|
|
128
|
+
|
|
129
|
+
# The type of the object. Always `periodic`.
|
|
130
|
+
|
|
131
|
+
type: :periodic
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
sig do
|
|
136
|
+
override.returns(
|
|
137
|
+
{
|
|
138
|
+
id: String,
|
|
139
|
+
created_at: Integer,
|
|
140
|
+
created_by: OpenAI::Beta::Agents::AutomationCreatedBy::Variants,
|
|
141
|
+
expression: String,
|
|
142
|
+
metadata: T::Hash[Symbol, String],
|
|
143
|
+
name: String,
|
|
144
|
+
object: Symbol,
|
|
145
|
+
status: OpenAI::Beta::Agents::PeriodicAutomation::Status::TaggedSymbol,
|
|
146
|
+
target: OpenAI::Beta::Agents::AutomationTarget::Variants,
|
|
147
|
+
timezone: String,
|
|
148
|
+
type: Symbol
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
end
|
|
152
|
+
def to_hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Whether scheduled delivery is active or paused.
|
|
156
|
+
module Status
|
|
157
|
+
extend OpenAI::Internal::Type::Enum
|
|
158
|
+
|
|
159
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::Agents::PeriodicAutomation::Status) }
|
|
160
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
161
|
+
|
|
162
|
+
ACTIVE = T.let(:active, OpenAI::Beta::Agents::PeriodicAutomation::Status::TaggedSymbol)
|
|
163
|
+
PAUSED = T.let(:paused, OpenAI::Beta::Agents::PeriodicAutomation::Status::TaggedSymbol)
|
|
164
|
+
|
|
165
|
+
sig { override.returns(T::Array[OpenAI::Beta::Agents::PeriodicAutomation::Status::TaggedSymbol]) }
|
|
166
|
+
def self.values
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
end
|
|
@@ -1681,6 +1681,10 @@ module OpenAI
|
|
|
1681
1681
|
:"gpt-rosalind-research",
|
|
1682
1682
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1683
1683
|
)
|
|
1684
|
+
GPT_6_ROSALIND = T.let(
|
|
1685
|
+
:"gpt-6-rosalind",
|
|
1686
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1687
|
+
)
|
|
1684
1688
|
|
|
1685
1689
|
end
|
|
1686
1690
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Resources
|
|
5
|
+
|
|
6
|
+
class Beta
|
|
7
|
+
|
|
8
|
+
class Agents
|
|
9
|
+
|
|
10
|
+
class Automations
|
|
11
|
+
|
|
12
|
+
class Invocations
|
|
13
|
+
|
|
14
|
+
# Queues a manual delivery without changing the saved schedule.
|
|
15
|
+
sig {
|
|
16
|
+
params(automation_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
17
|
+
OpenAI::Beta::Agents::Automations::AutomationInvocation
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
def create(automation_id, request_options: {})
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Retrieves a delivery record for a project-owned automation.
|
|
24
|
+
sig {
|
|
25
|
+
params(invocation_id: String, automation_id: String, request_options: OpenAI::RequestOptions::OrHash)
|
|
26
|
+
.returns(OpenAI::Beta::Agents::Automations::AutomationInvocation)
|
|
27
|
+
}
|
|
28
|
+
def retrieve(invocation_id, automation_id:, request_options: {})
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Lists delivery records for a project-owned automation.
|
|
32
|
+
sig {
|
|
33
|
+
params(
|
|
34
|
+
automation_id: String,
|
|
35
|
+
after: String,
|
|
36
|
+
limit: Integer,
|
|
37
|
+
order: OpenAI::Beta::Agents::Automations::InvocationListParams::Order::OrSymbol,
|
|
38
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
39
|
+
)
|
|
40
|
+
.returns(OpenAI::Internal::CursorPage[OpenAI::Beta::Agents::Automations::AutomationInvocation])
|
|
41
|
+
}
|
|
42
|
+
def list(
|
|
43
|
+
automation_id,
|
|
44
|
+
# Return resources after this resource ID in the selected order.
|
|
45
|
+
after: nil,
|
|
46
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
47
|
+
limit: nil,
|
|
48
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
49
|
+
order: nil,
|
|
50
|
+
request_options: {}
|
|
51
|
+
)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# @api private
|
|
55
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
56
|
+
def self.new(client:)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Resources
|
|
5
|
+
|
|
6
|
+
class Beta
|
|
7
|
+
|
|
8
|
+
class Agents
|
|
9
|
+
|
|
10
|
+
class Automations
|
|
11
|
+
|
|
12
|
+
sig { returns(OpenAI::Resources::Beta::Agents::Automations::Invocations) }
|
|
13
|
+
attr_reader :invocations
|
|
14
|
+
|
|
15
|
+
# Saves an active automation without invoking it immediately.
|
|
16
|
+
sig {
|
|
17
|
+
params(
|
|
18
|
+
create_automation_params: T.any(
|
|
19
|
+
OpenAI::Beta::Agents::AutomationScheduleParam::Periodic::OrHash,
|
|
20
|
+
OpenAI::Beta::Agents::AutomationScheduleParam::Once::OrHash
|
|
21
|
+
),
|
|
22
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
23
|
+
)
|
|
24
|
+
.returns(OpenAI::Beta::Agents::Automation::Variants)
|
|
25
|
+
}
|
|
26
|
+
def create(
|
|
27
|
+
# Creates an automation without invoking it immediately.
|
|
28
|
+
create_automation_params:,
|
|
29
|
+
request_options: {}
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Retrieves a project-owned automation.
|
|
34
|
+
sig {
|
|
35
|
+
params(automation_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
36
|
+
OpenAI::Beta::Agents::Automation::Variants
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
def retrieve(automation_id, request_options: {})
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Updates supplied fields; target and metadata replace the whole field.
|
|
43
|
+
sig {
|
|
44
|
+
params(
|
|
45
|
+
automation_id: String,
|
|
46
|
+
expression: String,
|
|
47
|
+
metadata: T::Hash[Symbol, String],
|
|
48
|
+
name: String,
|
|
49
|
+
run_at: Integer,
|
|
50
|
+
target: T.any(
|
|
51
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::OrHash,
|
|
52
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession::OrHash
|
|
53
|
+
),
|
|
54
|
+
timezone: String,
|
|
55
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
56
|
+
)
|
|
57
|
+
.returns(OpenAI::Beta::Agents::Automation::Variants)
|
|
58
|
+
}
|
|
59
|
+
def update(
|
|
60
|
+
automation_id,
|
|
61
|
+
# Only accepted for periodic automations.
|
|
62
|
+
expression: nil,
|
|
63
|
+
# Replaces all metadata; omit to leave unchanged.
|
|
64
|
+
metadata: nil,
|
|
65
|
+
name: nil,
|
|
66
|
+
# A future Unix timestamp in seconds; accepted only before a one-time scheduled
|
|
67
|
+
# invocation exists.
|
|
68
|
+
run_at: nil,
|
|
69
|
+
# Replaces the complete target, retaining its type and any creator session.
|
|
70
|
+
target: nil,
|
|
71
|
+
# Only accepted for periodic automations.
|
|
72
|
+
timezone: nil,
|
|
73
|
+
request_options: {}
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Lists project-owned automations, optionally filtered by target session.
|
|
78
|
+
sig {
|
|
79
|
+
params(
|
|
80
|
+
after: String,
|
|
81
|
+
limit: Integer,
|
|
82
|
+
order: OpenAI::Beta::Agents::AutomationListParams::Order::OrSymbol,
|
|
83
|
+
session_id: String,
|
|
84
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
85
|
+
)
|
|
86
|
+
.returns(OpenAI::Internal::CursorPage[OpenAI::Beta::Agents::Automation::Variants])
|
|
87
|
+
}
|
|
88
|
+
def list(
|
|
89
|
+
# Return resources after this resource ID in the selected order.
|
|
90
|
+
after: nil,
|
|
91
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
92
|
+
limit: nil,
|
|
93
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
94
|
+
order: nil,
|
|
95
|
+
# Matches existing-session targets, including agent-created automations.
|
|
96
|
+
session_id: nil,
|
|
97
|
+
request_options: {}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Deletes the automation and prevents future invocations without deleting its
|
|
102
|
+
# target session.
|
|
103
|
+
sig {
|
|
104
|
+
params(automation_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
105
|
+
OpenAI::Beta::Agents::AutomationDeleted
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
def delete(automation_id, request_options: {})
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Pauses future scheduled delivery without stopping an active session.
|
|
112
|
+
sig {
|
|
113
|
+
params(automation_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
114
|
+
OpenAI::Beta::Agents::Automation::Variants
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
def pause(automation_id, request_options: {})
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Resumes scheduled delivery; one-time automations without a pending invocation
|
|
121
|
+
# require a future run_at.
|
|
122
|
+
sig {
|
|
123
|
+
params(automation_id: String, request_options: OpenAI::RequestOptions::OrHash).returns(
|
|
124
|
+
OpenAI::Beta::Agents::Automation::Variants
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
def resume(automation_id, request_options: {})
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# @api private
|
|
131
|
+
sig { params(client: OpenAI::Client).returns(T.attached_class) }
|
|
132
|
+
def self.new(client:)
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
end
|
|
141
|
+
end
|