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,122 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
class AutomationListParams < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
|
|
12
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
OrHash = T.type_alias do
|
|
16
|
+
T.any(
|
|
17
|
+
OpenAI::Beta::Agents::AutomationListParams,
|
|
18
|
+
OpenAI::Internal::AnyHash
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Return resources after this resource ID in the selected order.
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_reader :after
|
|
25
|
+
|
|
26
|
+
sig { params(after: String).void }
|
|
27
|
+
attr_writer :after
|
|
28
|
+
|
|
29
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
30
|
+
sig { returns(T.nilable(Integer)) }
|
|
31
|
+
attr_reader :limit
|
|
32
|
+
|
|
33
|
+
sig { params(limit: Integer).void }
|
|
34
|
+
attr_writer :limit
|
|
35
|
+
|
|
36
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
37
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::AutomationListParams::Order::OrSymbol)) }
|
|
38
|
+
attr_reader :order
|
|
39
|
+
|
|
40
|
+
sig { params(order: OpenAI::Beta::Agents::AutomationListParams::Order::OrSymbol).void }
|
|
41
|
+
attr_writer :order
|
|
42
|
+
|
|
43
|
+
# Matches existing-session targets, including agent-created automations.
|
|
44
|
+
sig { returns(T.nilable(String)) }
|
|
45
|
+
attr_reader :session_id
|
|
46
|
+
|
|
47
|
+
sig { params(session_id: String).void }
|
|
48
|
+
attr_writer :session_id
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
|
|
53
|
+
after: String,
|
|
54
|
+
|
|
55
|
+
limit: Integer,
|
|
56
|
+
|
|
57
|
+
order: OpenAI::Beta::Agents::AutomationListParams::Order::OrSymbol,
|
|
58
|
+
|
|
59
|
+
session_id: String,
|
|
60
|
+
|
|
61
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
62
|
+
)
|
|
63
|
+
.returns(T.attached_class)
|
|
64
|
+
end
|
|
65
|
+
def self.new(
|
|
66
|
+
|
|
67
|
+
# Return resources after this resource ID in the selected order.
|
|
68
|
+
after: nil,
|
|
69
|
+
|
|
70
|
+
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
71
|
+
limit: nil,
|
|
72
|
+
|
|
73
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
74
|
+
order: nil,
|
|
75
|
+
|
|
76
|
+
# Matches existing-session targets, including agent-created automations.
|
|
77
|
+
session_id: nil,
|
|
78
|
+
|
|
79
|
+
request_options: {}
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
sig do
|
|
84
|
+
override.returns(
|
|
85
|
+
{
|
|
86
|
+
after: String,
|
|
87
|
+
limit: Integer,
|
|
88
|
+
order: OpenAI::Beta::Agents::AutomationListParams::Order::OrSymbol,
|
|
89
|
+
session_id: String,
|
|
90
|
+
request_options: OpenAI::RequestOptions
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
def to_hash
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# The order in which resources are returned. Defaults to `desc`.
|
|
98
|
+
module Order
|
|
99
|
+
extend OpenAI::Internal::Type::Enum
|
|
100
|
+
|
|
101
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::Agents::AutomationListParams::Order) }
|
|
102
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
103
|
+
|
|
104
|
+
# Returns resources in ascending order.
|
|
105
|
+
ASC = T.let(:asc, OpenAI::Beta::Agents::AutomationListParams::Order::TaggedSymbol)
|
|
106
|
+
|
|
107
|
+
# Returns resources in descending order.
|
|
108
|
+
DESC = T.let(:desc, OpenAI::Beta::Agents::AutomationListParams::Order::TaggedSymbol)
|
|
109
|
+
|
|
110
|
+
sig { override.returns(T::Array[OpenAI::Beta::Agents::AutomationListParams::Order::TaggedSymbol]) }
|
|
111
|
+
def self.values
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
end
|
|
122
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
class AutomationPauseParams < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
|
|
12
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
OrHash = T.type_alias do
|
|
16
|
+
T.any(
|
|
17
|
+
OpenAI::Beta::Agents::AutomationPauseParams,
|
|
18
|
+
OpenAI::Internal::AnyHash
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :automation_id
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
|
|
28
|
+
automation_id: String,
|
|
29
|
+
|
|
30
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
31
|
+
)
|
|
32
|
+
.returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
|
|
36
|
+
automation_id:,
|
|
37
|
+
|
|
38
|
+
request_options: {}
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
override.returns(
|
|
44
|
+
{automation_id: String, request_options: OpenAI::RequestOptions}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
class AutomationResumeParams < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
|
|
12
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
OrHash = T.type_alias do
|
|
16
|
+
T.any(
|
|
17
|
+
OpenAI::Beta::Agents::AutomationResumeParams,
|
|
18
|
+
OpenAI::Internal::AnyHash
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :automation_id
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
|
|
28
|
+
automation_id: String,
|
|
29
|
+
|
|
30
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
31
|
+
)
|
|
32
|
+
.returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
|
|
36
|
+
automation_id:,
|
|
37
|
+
|
|
38
|
+
request_options: {}
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
override.returns(
|
|
44
|
+
{automation_id: String, request_options: OpenAI::RequestOptions}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
class AutomationRetrieveParams < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
|
|
12
|
+
extend OpenAI::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include OpenAI::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
OrHash = T.type_alias do
|
|
16
|
+
T.any(
|
|
17
|
+
OpenAI::Beta::Agents::AutomationRetrieveParams,
|
|
18
|
+
OpenAI::Internal::AnyHash
|
|
19
|
+
)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :automation_id
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
|
|
28
|
+
automation_id: String,
|
|
29
|
+
|
|
30
|
+
request_options: OpenAI::RequestOptions::OrHash
|
|
31
|
+
)
|
|
32
|
+
.returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
|
|
36
|
+
automation_id:,
|
|
37
|
+
|
|
38
|
+
request_options: {}
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
override.returns(
|
|
44
|
+
{automation_id: String, request_options: OpenAI::RequestOptions}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
def to_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Beta
|
|
7
|
+
|
|
8
|
+
module Agents
|
|
9
|
+
|
|
10
|
+
# Creates an automation without invoking it immediately.
|
|
11
|
+
module AutomationScheduleParam
|
|
12
|
+
extend OpenAI::Internal::Type::Union
|
|
13
|
+
|
|
14
|
+
Variants = T.type_alias do
|
|
15
|
+
T.any(
|
|
16
|
+
OpenAI::Beta::Agents::AutomationScheduleParam::Periodic,
|
|
17
|
+
OpenAI::Beta::Agents::AutomationScheduleParam::Once
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Periodic < OpenAI::Internal::Type::BaseModel
|
|
22
|
+
OrHash = T.type_alias do
|
|
23
|
+
T.any(
|
|
24
|
+
OpenAI::Beta::Agents::AutomationScheduleParam::Periodic,
|
|
25
|
+
OpenAI::Internal::AnyHash
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A standard five-field cron expression defining scheduled occurrences.
|
|
30
|
+
sig { returns(String) }
|
|
31
|
+
attr_accessor :expression
|
|
32
|
+
|
|
33
|
+
# A human-readable name for the automation.
|
|
34
|
+
sig { returns(String) }
|
|
35
|
+
attr_accessor :name
|
|
36
|
+
|
|
37
|
+
# The session an automation invocation targets.
|
|
38
|
+
sig {
|
|
39
|
+
returns(
|
|
40
|
+
T.any(
|
|
41
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
|
|
42
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
attr_accessor :target
|
|
47
|
+
|
|
48
|
+
# The IANA timezone used to interpret the cron expression.
|
|
49
|
+
sig { returns(String) }
|
|
50
|
+
attr_accessor :timezone
|
|
51
|
+
|
|
52
|
+
# The type of the object. Always `periodic`.
|
|
53
|
+
sig { returns(Symbol) }
|
|
54
|
+
attr_accessor :type
|
|
55
|
+
|
|
56
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
57
|
+
attr_reader :metadata
|
|
58
|
+
|
|
59
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
60
|
+
attr_writer :metadata
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
|
|
65
|
+
expression: String,
|
|
66
|
+
|
|
67
|
+
name: String,
|
|
68
|
+
|
|
69
|
+
target: T.any(
|
|
70
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::OrHash,
|
|
71
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession::OrHash
|
|
72
|
+
),
|
|
73
|
+
|
|
74
|
+
timezone: String,
|
|
75
|
+
|
|
76
|
+
metadata: T::Hash[Symbol, String],
|
|
77
|
+
|
|
78
|
+
type: Symbol
|
|
79
|
+
)
|
|
80
|
+
.returns(T.attached_class)
|
|
81
|
+
end
|
|
82
|
+
def self.new(
|
|
83
|
+
|
|
84
|
+
# A standard five-field cron expression defining scheduled occurrences.
|
|
85
|
+
expression:,
|
|
86
|
+
|
|
87
|
+
# A human-readable name for the automation.
|
|
88
|
+
name:,
|
|
89
|
+
|
|
90
|
+
# The session an automation invocation targets.
|
|
91
|
+
target:,
|
|
92
|
+
|
|
93
|
+
# The IANA timezone used to interpret the cron expression.
|
|
94
|
+
timezone:,
|
|
95
|
+
|
|
96
|
+
metadata: nil,
|
|
97
|
+
|
|
98
|
+
# The type of the object. Always `periodic`.
|
|
99
|
+
|
|
100
|
+
type: :periodic
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
sig do
|
|
105
|
+
override.returns(
|
|
106
|
+
{
|
|
107
|
+
expression: String,
|
|
108
|
+
name: String,
|
|
109
|
+
target: T.any(
|
|
110
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
|
|
111
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
|
|
112
|
+
),
|
|
113
|
+
timezone: String,
|
|
114
|
+
type: Symbol,
|
|
115
|
+
metadata: T::Hash[Symbol, String]
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
def to_hash
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
class Once < OpenAI::Internal::Type::BaseModel
|
|
125
|
+
OrHash = T.type_alias do
|
|
126
|
+
T.any(
|
|
127
|
+
OpenAI::Beta::Agents::AutomationScheduleParam::Once,
|
|
128
|
+
OpenAI::Internal::AnyHash
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# A human-readable name for the automation.
|
|
133
|
+
sig { returns(String) }
|
|
134
|
+
attr_accessor :name
|
|
135
|
+
|
|
136
|
+
# A future Unix timestamp in seconds.
|
|
137
|
+
sig { returns(Integer) }
|
|
138
|
+
attr_accessor :run_at
|
|
139
|
+
|
|
140
|
+
# The session an automation invocation targets.
|
|
141
|
+
sig {
|
|
142
|
+
returns(
|
|
143
|
+
T.any(
|
|
144
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
|
|
145
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
|
|
146
|
+
)
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
attr_accessor :target
|
|
150
|
+
|
|
151
|
+
# The type of the object. Always `once`.
|
|
152
|
+
sig { returns(Symbol) }
|
|
153
|
+
attr_accessor :type
|
|
154
|
+
|
|
155
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
156
|
+
attr_reader :metadata
|
|
157
|
+
|
|
158
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
159
|
+
attr_writer :metadata
|
|
160
|
+
|
|
161
|
+
sig do
|
|
162
|
+
params(
|
|
163
|
+
|
|
164
|
+
name: String,
|
|
165
|
+
|
|
166
|
+
run_at: Integer,
|
|
167
|
+
|
|
168
|
+
target: T.any(
|
|
169
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession::OrHash,
|
|
170
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession::OrHash
|
|
171
|
+
),
|
|
172
|
+
|
|
173
|
+
metadata: T::Hash[Symbol, String],
|
|
174
|
+
|
|
175
|
+
type: Symbol
|
|
176
|
+
)
|
|
177
|
+
.returns(T.attached_class)
|
|
178
|
+
end
|
|
179
|
+
def self.new(
|
|
180
|
+
|
|
181
|
+
# A human-readable name for the automation.
|
|
182
|
+
name:,
|
|
183
|
+
|
|
184
|
+
# A future Unix timestamp in seconds.
|
|
185
|
+
run_at:,
|
|
186
|
+
|
|
187
|
+
# The session an automation invocation targets.
|
|
188
|
+
target:,
|
|
189
|
+
|
|
190
|
+
metadata: nil,
|
|
191
|
+
|
|
192
|
+
# The type of the object. Always `once`.
|
|
193
|
+
|
|
194
|
+
type: :once
|
|
195
|
+
)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
sig do
|
|
199
|
+
override.returns(
|
|
200
|
+
{
|
|
201
|
+
name: String,
|
|
202
|
+
run_at: Integer,
|
|
203
|
+
target: T.any(
|
|
204
|
+
OpenAI::Beta::Agents::AutomationTargetParam::NewSession,
|
|
205
|
+
OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession
|
|
206
|
+
),
|
|
207
|
+
type: Symbol,
|
|
208
|
+
metadata: T::Hash[Symbol, String]
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
end
|
|
212
|
+
def to_hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
sig { override.returns(T::Array[OpenAI::Beta::Agents::AutomationScheduleParam::Variants]) }
|
|
218
|
+
def self.variants
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
end
|
|
228
|
+
end
|