openai 0.120.0 → 0.122.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 +20 -0
- data/README.md +1 -1
- data/lib/openai/models/beta/agent_tool.rb +10 -1
- data/lib/openai/models/beta/agent_tool_param.rb +12 -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/persisted_agent_tool.rb +10 -1
- data/lib/openai/models/beta/persisted_agent_tool_param.rb +12 -1
- 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/agent_tool.rbi +14 -1
- data/rbi/openai/models/beta/agent_tool_param.rbi +15 -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/persisted_agent_tool.rbi +14 -1
- data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +15 -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/agent_tool.rbs +13 -2
- data/sig/openai/models/beta/agent_tool_param.rbs +14 -0
- 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/persisted_agent_tool.rbs +13 -2
- data/sig/openai/models/beta/persisted_agent_tool_param.rbs +14 -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
|
|
|
@@ -49,6 +49,13 @@ module OpenAI
|
|
|
49
49
|
sig { returns(Symbol) }
|
|
50
50
|
attr_accessor :type
|
|
51
51
|
|
|
52
|
+
# Whether the agent continues without waiting for the function result.
|
|
53
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
54
|
+
attr_reader :async
|
|
55
|
+
|
|
56
|
+
sig { params(async: T::Boolean).void }
|
|
57
|
+
attr_writer :async
|
|
58
|
+
|
|
52
59
|
# A function defined by the application.
|
|
53
60
|
sig do
|
|
54
61
|
params(
|
|
@@ -61,6 +68,8 @@ module OpenAI
|
|
|
61
68
|
|
|
62
69
|
parameters: T::Hash[Symbol, T.anything],
|
|
63
70
|
|
|
71
|
+
async: T::Boolean,
|
|
72
|
+
|
|
64
73
|
type: Symbol
|
|
65
74
|
)
|
|
66
75
|
.returns(T.attached_class)
|
|
@@ -79,6 +88,9 @@ module OpenAI
|
|
|
79
88
|
# A JSON Schema object describing the function's arguments.
|
|
80
89
|
parameters:,
|
|
81
90
|
|
|
91
|
+
# Whether the agent continues without waiting for the function result.
|
|
92
|
+
async: nil,
|
|
93
|
+
|
|
82
94
|
# The type of the object. Always `function`.
|
|
83
95
|
|
|
84
96
|
type: :function
|
|
@@ -92,7 +104,8 @@ module OpenAI
|
|
|
92
104
|
description: String,
|
|
93
105
|
name: String,
|
|
94
106
|
parameters: T::Hash[Symbol, T.anything],
|
|
95
|
-
type: Symbol
|
|
107
|
+
type: Symbol,
|
|
108
|
+
async: T::Boolean
|
|
96
109
|
}
|
|
97
110
|
)
|
|
98
111
|
end
|
|
@@ -45,6 +45,14 @@ module OpenAI
|
|
|
45
45
|
sig { returns(Symbol) }
|
|
46
46
|
attr_accessor :type
|
|
47
47
|
|
|
48
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
49
|
+
# `false`.
|
|
50
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
51
|
+
attr_reader :async
|
|
52
|
+
|
|
53
|
+
sig { params(async: T::Boolean).void }
|
|
54
|
+
attr_writer :async
|
|
55
|
+
|
|
48
56
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
49
57
|
# to `false`.
|
|
50
58
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -63,6 +71,8 @@ module OpenAI
|
|
|
63
71
|
|
|
64
72
|
parameters: T::Hash[Symbol, T.anything],
|
|
65
73
|
|
|
74
|
+
async: T::Boolean,
|
|
75
|
+
|
|
66
76
|
defer_loading: T::Boolean,
|
|
67
77
|
|
|
68
78
|
type: Symbol
|
|
@@ -80,6 +90,10 @@ module OpenAI
|
|
|
80
90
|
# A JSON Schema object describing the function's arguments.
|
|
81
91
|
parameters:,
|
|
82
92
|
|
|
93
|
+
# Whether the agent continues without waiting for the function result. Defaults to
|
|
94
|
+
# `false`.
|
|
95
|
+
async: nil,
|
|
96
|
+
|
|
83
97
|
# Whether this function is deferred and discovered through tool search. Defaults
|
|
84
98
|
# to `false`.
|
|
85
99
|
defer_loading: nil,
|
|
@@ -97,6 +111,7 @@ module OpenAI
|
|
|
97
111
|
name: String,
|
|
98
112
|
parameters: T::Hash[Symbol, T.anything],
|
|
99
113
|
type: Symbol,
|
|
114
|
+
async: T::Boolean,
|
|
100
115
|
defer_loading: T::Boolean
|
|
101
116
|
}
|
|
102
117
|
)
|
|
@@ -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
|