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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/all_models.rb +1 -0
  5. data/lib/openai/models/beta/agents/automation.rb +27 -0
  6. data/lib/openai/models/beta/agents/automation_agent_config.rb +142 -0
  7. data/lib/openai/models/beta/agents/automation_create_params.rb +27 -0
  8. data/lib/openai/models/beta/agents/automation_created_by.rb +65 -0
  9. data/lib/openai/models/beta/agents/automation_delete_params.rb +24 -0
  10. data/lib/openai/models/beta/agents/automation_deleted.rb +40 -0
  11. data/lib/openai/models/beta/agents/automation_environment.rb +484 -0
  12. data/lib/openai/models/beta/agents/automation_list_params.rb +68 -0
  13. data/lib/openai/models/beta/agents/automation_pause_params.rb +24 -0
  14. data/lib/openai/models/beta/agents/automation_resume_params.rb +24 -0
  15. data/lib/openai/models/beta/agents/automation_retrieve_params.rb +24 -0
  16. data/lib/openai/models/beta/agents/automation_schedule_param.rb +124 -0
  17. data/lib/openai/models/beta/agents/automation_target.rb +153 -0
  18. data/lib/openai/models/beta/agents/automation_target_param.rb +312 -0
  19. data/lib/openai/models/beta/agents/automation_update_params.rb +79 -0
  20. data/lib/openai/models/beta/agents/automations/automation_invocation.rb +148 -0
  21. data/lib/openai/models/beta/agents/automations/automation_invocation_source.rb +59 -0
  22. data/lib/openai/models/beta/agents/automations/invocation_create_params.rb +26 -0
  23. data/lib/openai/models/beta/agents/automations/invocation_list_params.rb +68 -0
  24. data/lib/openai/models/beta/agents/automations/invocation_retrieve_params.rb +32 -0
  25. data/lib/openai/models/beta/agents/environments/file_create_params.rb +11 -1
  26. data/lib/openai/models/beta/agents/one_time_automation.rb +118 -0
  27. data/lib/openai/models/beta/agents/periodic_automation.rb +126 -0
  28. data/lib/openai/models/beta/beta_response.rb +3 -0
  29. data/lib/openai/models/beta/beta_responses_client_event.rb +6 -0
  30. data/lib/openai/models/beta/response_compact_params.rb +6 -0
  31. data/lib/openai/models/beta/response_create_params.rb +6 -0
  32. data/lib/openai/models/responses/response_compact_params.rb +3 -0
  33. data/lib/openai/models/responses_model.rb +1 -0
  34. data/lib/openai/resources/beta/agents/automations/invocations.rb +103 -0
  35. data/lib/openai/resources/beta/agents/automations.rb +211 -0
  36. data/lib/openai/resources/beta/agents.rb +4 -0
  37. data/lib/openai/version.rb +1 -1
  38. data/lib/openai.rb +24 -0
  39. data/rbi/openai/models/all_models.rbi +1 -0
  40. data/rbi/openai/models/beta/agents/automation.rbi +32 -0
  41. data/rbi/openai/models/beta/agents/automation_agent_config.rbi +255 -0
  42. data/rbi/openai/models/beta/agents/automation_create_params.rbi +75 -0
  43. data/rbi/openai/models/beta/agents/automation_created_by.rbi +124 -0
  44. data/rbi/openai/models/beta/agents/automation_delete_params.rbi +57 -0
  45. data/rbi/openai/models/beta/agents/automation_deleted.rbi +71 -0
  46. data/rbi/openai/models/beta/agents/automation_environment.rbi +795 -0
  47. data/rbi/openai/models/beta/agents/automation_list_params.rbi +122 -0
  48. data/rbi/openai/models/beta/agents/automation_pause_params.rbi +57 -0
  49. data/rbi/openai/models/beta/agents/automation_resume_params.rbi +57 -0
  50. data/rbi/openai/models/beta/agents/automation_retrieve_params.rbi +57 -0
  51. data/rbi/openai/models/beta/agents/automation_schedule_param.rbi +228 -0
  52. data/rbi/openai/models/beta/agents/automation_target.rbi +250 -0
  53. data/rbi/openai/models/beta/agents/automation_target_param.rbi +564 -0
  54. data/rbi/openai/models/beta/agents/automation_update_params.rbi +161 -0
  55. data/rbi/openai/models/beta/agents/automations/automation_invocation.rbi +233 -0
  56. data/rbi/openai/models/beta/agents/automations/automation_invocation_source.rbi +123 -0
  57. data/rbi/openai/models/beta/agents/automations/invocation_create_params.rbi +61 -0
  58. data/rbi/openai/models/beta/agents/automations/invocation_list_params.rbi +125 -0
  59. data/rbi/openai/models/beta/agents/automations/invocation_retrieve_params.rbi +68 -0
  60. data/rbi/openai/models/beta/agents/environments/file_create_params.rbi +27 -1
  61. data/rbi/openai/models/beta/agents/one_time_automation.rbi +168 -0
  62. data/rbi/openai/models/beta/agents/periodic_automation.rbi +177 -0
  63. data/rbi/openai/models/beta/beta_response.rbi +1 -0
  64. data/rbi/openai/models/beta/beta_responses_client_event.rbi +8 -0
  65. data/rbi/openai/models/beta/response_compact_params.rbi +2 -0
  66. data/rbi/openai/models/beta/response_create_params.rbi +2 -0
  67. data/rbi/openai/models/responses/response_compact_params.rbi +1 -0
  68. data/rbi/openai/models/responses_model.rbi +1 -0
  69. data/rbi/openai/resources/beta/agents/automations/invocations.rbi +67 -0
  70. data/rbi/openai/resources/beta/agents/automations.rbi +141 -0
  71. data/rbi/openai/resources/beta/agents.rbi +3 -0
  72. data/sig/openai/models/all_models.rbs +2 -0
  73. data/sig/openai/models/beta/agent_session_turn_reasoning_summary_part_done_event.rbs +1 -4
  74. data/sig/openai/models/beta/agents/automation.rbs +17 -0
  75. data/sig/openai/models/beta/agents/automation_agent_config.rbs +143 -0
  76. data/sig/openai/models/beta/agents/automation_create_params.rbs +33 -0
  77. data/sig/openai/models/beta/agents/automation_created_by.rbs +62 -0
  78. data/sig/openai/models/beta/agents/automation_delete_params.rbs +27 -0
  79. data/sig/openai/models/beta/agents/automation_deleted.rbs +39 -0
  80. data/sig/openai/models/beta/agents/automation_environment.rbs +428 -0
  81. data/sig/openai/models/beta/agents/automation_list_params.rbs +85 -0
  82. data/sig/openai/models/beta/agents/automation_pause_params.rbs +27 -0
  83. data/sig/openai/models/beta/agents/automation_resume_params.rbs +27 -0
  84. data/sig/openai/models/beta/agents/automation_retrieve_params.rbs +27 -0
  85. data/sig/openai/models/beta/agents/automation_schedule_param.rbs +127 -0
  86. data/sig/openai/models/beta/agents/automation_target.rbs +157 -0
  87. data/sig/openai/models/beta/agents/automation_target_param.rbs +299 -0
  88. data/sig/openai/models/beta/agents/automation_update_params.rbs +97 -0
  89. data/sig/openai/models/beta/agents/automations/automation_invocation.rbs +134 -0
  90. data/sig/openai/models/beta/agents/automations/automation_invocation_source.rbs +62 -0
  91. data/sig/openai/models/beta/agents/automations/invocation_create_params.rbs +29 -0
  92. data/sig/openai/models/beta/agents/automations/invocation_list_params.rbs +81 -0
  93. data/sig/openai/models/beta/agents/automations/invocation_retrieve_params.rbs +37 -0
  94. data/sig/openai/models/beta/agents/environments/file_create_params.rbs +12 -1
  95. data/sig/openai/models/beta/agents/one_time_automation.rbs +111 -0
  96. data/sig/openai/models/beta/agents/periodic_automation.rbs +118 -0
  97. data/sig/openai/models/beta/beta_response.rbs +2 -0
  98. data/sig/openai/models/beta/beta_responses_client_event.rbs +4 -0
  99. data/sig/openai/models/beta/response_compact_params.rbs +4 -0
  100. data/sig/openai/models/beta/response_create_params.rbs +4 -0
  101. data/sig/openai/models/responses/response_compact_params.rbs +2 -0
  102. data/sig/openai/models/responses_model.rbs +2 -0
  103. data/sig/openai/resources/beta/agents/automations/invocations.rbs +32 -0
  104. data/sig/openai/resources/beta/agents/automations.rbs +57 -0
  105. data/sig/openai/resources/beta/agents.rbs +2 -0
  106. 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