openai 0.124.0 → 0.125.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 +8 -0
- data/README.md +1 -1
- data/lib/openai/internal/stream.rb +1 -1
- data/lib/openai/internal/transport/base_client.rb +11 -2
- data/lib/openai/internal/type/base_stream.rb +10 -0
- data/lib/openai/models/beta/agent.rb +2 -2
- data/lib/openai/models/beta/agent_create_params.rb +9 -9
- data/lib/openai/models/beta/agent_session.rb +2 -2
- data/lib/openai/models/beta/agent_update_params.rb +9 -12
- data/lib/openai/models/beta/agents/automation_agent_config.rb +2 -2
- data/lib/openai/models/beta/agents/automation_target_param.rb +9 -12
- data/lib/openai/models/beta/agents/one_time_automation.rb +28 -1
- data/lib/openai/models/beta/agents/periodic_automation.rb +28 -1
- data/lib/openai/models/beta/agents/session_create_params.rb +9 -12
- data/lib/openai/models/live/session_config.rb +12 -1
- data/lib/openai/models/live/session_resource.rb +12 -1
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -0
- data/lib/openai/resources/beta/agents/sessions.rb +1 -0
- data/lib/openai/resources/beta/agents.rb +2 -3
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/internal/transport/base_client.rbi +4 -1
- data/rbi/openai/internal/type/base_stream.rbi +5 -0
- data/rbi/openai/models/beta/agent.rbi +2 -2
- data/rbi/openai/models/beta/agent_create_params.rbi +9 -9
- data/rbi/openai/models/beta/agent_session.rbi +2 -2
- data/rbi/openai/models/beta/agent_update_params.rbi +9 -12
- data/rbi/openai/models/beta/agents/automation_agent_config.rbi +2 -2
- data/rbi/openai/models/beta/agents/automation_target_param.rbi +9 -12
- data/rbi/openai/models/beta/agents/one_time_automation.rbi +28 -1
- data/rbi/openai/models/beta/agents/periodic_automation.rbi +28 -1
- data/rbi/openai/models/beta/agents/session_create_params.rbi +9 -12
- data/rbi/openai/models/live/session_config.rbi +12 -0
- data/rbi/openai/models/live/session_resource.rbi +12 -0
- data/rbi/openai/resources/beta/agents.rbi +2 -3
- data/sig/openai/internal/transport/base_client.rbs +1 -0
- data/sig/openai/internal/type/base_stream.rbs +2 -0
- data/sig/openai/models/beta/agent.rbs +2 -2
- data/sig/openai/models/beta/agent_create_params.rbs +8 -8
- data/sig/openai/models/beta/agent_session.rbs +2 -2
- data/sig/openai/models/beta/agent_update_params.rbs +8 -10
- data/sig/openai/models/beta/agents/automation_agent_config.rbs +2 -2
- data/sig/openai/models/beta/agents/automation_target_param.rbs +8 -10
- data/sig/openai/models/beta/agents/one_time_automation.rbs +20 -2
- data/sig/openai/models/beta/agents/periodic_automation.rbs +20 -2
- data/sig/openai/models/beta/agents/session_create_params.rbs +8 -10
- data/sig/openai/models/live/session_config.rbs +10 -0
- data/sig/openai/models/live/session_resource.rbs +10 -0
- metadata +1 -1
|
@@ -99,8 +99,7 @@ module OpenAI
|
|
|
99
99
|
|
|
100
100
|
class Agent < OpenAI::Internal::Type::BaseModel
|
|
101
101
|
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
102
|
-
# object replaces the settings; null or an empty object
|
|
103
|
-
# compaction.
|
|
102
|
+
# object replaces the settings; null or an empty object uses blocking compaction.
|
|
104
103
|
attr_accessor compaction: OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction?
|
|
105
104
|
|
|
106
105
|
# Experimental settings to merge by key. Omitted settings keep their current
|
|
@@ -143,8 +142,7 @@ module OpenAI
|
|
|
143
142
|
|
|
144
143
|
# @param compaction
|
|
145
144
|
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
146
|
-
# object replaces the settings; null or an empty object
|
|
147
|
-
# compaction.
|
|
145
|
+
# object replaces the settings; null or an empty object uses blocking compaction.
|
|
148
146
|
# @param experimental
|
|
149
147
|
# Experimental settings to merge by key. Omitted settings keep their current
|
|
150
148
|
# values.
|
|
@@ -193,15 +191,15 @@ module OpenAI
|
|
|
193
191
|
type compaction = { ?async: bool? }
|
|
194
192
|
|
|
195
193
|
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
196
|
-
# Whether to compact context in the background. Omission or null defaults to
|
|
197
|
-
# Set to
|
|
198
|
-
# token usage.
|
|
194
|
+
# Whether to compact context in the background. Omission or null defaults to
|
|
195
|
+
# false. Set to true to enable background compaction. Background compaction may
|
|
196
|
+
# increase token usage.
|
|
199
197
|
attr_accessor async: bool?
|
|
200
198
|
|
|
201
199
|
# @param async
|
|
202
|
-
# Whether to compact context in the background. Omission or null defaults to
|
|
203
|
-
# Set to
|
|
204
|
-
# token usage.
|
|
200
|
+
# Whether to compact context in the background. Omission or null defaults to
|
|
201
|
+
# false. Set to true to enable background compaction. Background compaction may
|
|
202
|
+
# increase token usage.
|
|
205
203
|
def initialize: (?async: bool?) -> void
|
|
206
204
|
|
|
207
205
|
def to_hash: -> { ?async: bool? }
|
|
@@ -13,7 +13,8 @@ module OpenAI
|
|
|
13
13
|
run_at: Integer,
|
|
14
14
|
status: OpenAI::Models::Beta::Agents::OneTimeAutomation::status,
|
|
15
15
|
target: OpenAI::Models::Beta::Agents::automation_target,
|
|
16
|
-
?type: :once
|
|
16
|
+
?type: :once,
|
|
17
|
+
?pause_reason: OpenAI::Models::Beta::Agents::OneTimeAutomation::pause_reason?
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
class OneTimeAutomation < OpenAI::Internal::Type::BaseModel
|
|
@@ -47,6 +48,9 @@ module OpenAI
|
|
|
47
48
|
# The type of the object. Always `once`.
|
|
48
49
|
attr_accessor type: :once
|
|
49
50
|
|
|
51
|
+
# Why the service paused this schedule, or null for other schedules.
|
|
52
|
+
attr_accessor pause_reason: OpenAI::Models::Beta::Agents::OneTimeAutomation::pause_reason?
|
|
53
|
+
|
|
50
54
|
# @param id
|
|
51
55
|
# The automation ID.
|
|
52
56
|
# @param created_at
|
|
@@ -63,6 +67,8 @@ module OpenAI
|
|
|
63
67
|
# Completion means the schedule has finished, not the agent's work.
|
|
64
68
|
# @param target
|
|
65
69
|
# The session configuration or existing session receiving invocations.
|
|
70
|
+
# @param pause_reason
|
|
71
|
+
# Why the service paused this schedule, or null for other schedules.
|
|
66
72
|
# @param object
|
|
67
73
|
# Always `agent.automation`.
|
|
68
74
|
# @param type
|
|
@@ -76,6 +82,7 @@ module OpenAI
|
|
|
76
82
|
run_at: Integer,
|
|
77
83
|
status: OpenAI::Models::Beta::Agents::OneTimeAutomation::status,
|
|
78
84
|
target: OpenAI::Models::Beta::Agents::automation_target,
|
|
85
|
+
?pause_reason: OpenAI::Models::Beta::Agents::OneTimeAutomation::pause_reason?,
|
|
79
86
|
?object: :"agent.automation",
|
|
80
87
|
?type: :once
|
|
81
88
|
) -> void
|
|
@@ -90,7 +97,8 @@ module OpenAI
|
|
|
90
97
|
run_at: Integer,
|
|
91
98
|
status: OpenAI::Models::Beta::Agents::OneTimeAutomation::status,
|
|
92
99
|
target: OpenAI::Models::Beta::Agents::automation_target,
|
|
93
|
-
?type: :once
|
|
100
|
+
?type: :once,
|
|
101
|
+
?pause_reason: OpenAI::Models::Beta::Agents::OneTimeAutomation::pause_reason?
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
type status = :active | :paused | :completed
|
|
@@ -104,6 +112,16 @@ module OpenAI
|
|
|
104
112
|
|
|
105
113
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::OneTimeAutomation::status]
|
|
106
114
|
end
|
|
115
|
+
|
|
116
|
+
type pause_reason = :target_session_failed
|
|
117
|
+
|
|
118
|
+
module PauseReason
|
|
119
|
+
extend OpenAI::Internal::Type::Enum
|
|
120
|
+
|
|
121
|
+
TARGET_SESSION_FAILED: :target_session_failed
|
|
122
|
+
|
|
123
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::OneTimeAutomation::pause_reason]
|
|
124
|
+
end
|
|
107
125
|
end
|
|
108
126
|
end
|
|
109
127
|
end
|
|
@@ -14,7 +14,8 @@ module OpenAI
|
|
|
14
14
|
status: OpenAI::Models::Beta::Agents::PeriodicAutomation::status,
|
|
15
15
|
target: OpenAI::Models::Beta::Agents::automation_target,
|
|
16
16
|
timezone: String,
|
|
17
|
-
?type: :periodic
|
|
17
|
+
?type: :periodic,
|
|
18
|
+
?pause_reason: OpenAI::Models::Beta::Agents::PeriodicAutomation::pause_reason?
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
class PeriodicAutomation < OpenAI::Internal::Type::BaseModel
|
|
@@ -51,6 +52,9 @@ module OpenAI
|
|
|
51
52
|
# The type of the object. Always `periodic`.
|
|
52
53
|
attr_accessor type: :periodic
|
|
53
54
|
|
|
55
|
+
# Why the service paused this schedule, or null for other schedules.
|
|
56
|
+
attr_accessor pause_reason: OpenAI::Models::Beta::Agents::PeriodicAutomation::pause_reason?
|
|
57
|
+
|
|
54
58
|
# @param id
|
|
55
59
|
# The automation ID.
|
|
56
60
|
# @param created_at
|
|
@@ -69,6 +73,8 @@ module OpenAI
|
|
|
69
73
|
# The session configuration or existing session receiving invocations.
|
|
70
74
|
# @param timezone
|
|
71
75
|
# The timezone used to interpret the expression.
|
|
76
|
+
# @param pause_reason
|
|
77
|
+
# Why the service paused this schedule, or null for other schedules.
|
|
72
78
|
# @param object
|
|
73
79
|
# Always `agent.automation`.
|
|
74
80
|
# @param type
|
|
@@ -83,6 +89,7 @@ module OpenAI
|
|
|
83
89
|
status: OpenAI::Models::Beta::Agents::PeriodicAutomation::status,
|
|
84
90
|
target: OpenAI::Models::Beta::Agents::automation_target,
|
|
85
91
|
timezone: String,
|
|
92
|
+
?pause_reason: OpenAI::Models::Beta::Agents::PeriodicAutomation::pause_reason?,
|
|
86
93
|
?object: :"agent.automation",
|
|
87
94
|
?type: :periodic
|
|
88
95
|
) -> void
|
|
@@ -98,7 +105,8 @@ module OpenAI
|
|
|
98
105
|
status: OpenAI::Models::Beta::Agents::PeriodicAutomation::status,
|
|
99
106
|
target: OpenAI::Models::Beta::Agents::automation_target,
|
|
100
107
|
timezone: String,
|
|
101
|
-
?type: :periodic
|
|
108
|
+
?type: :periodic,
|
|
109
|
+
?pause_reason: OpenAI::Models::Beta::Agents::PeriodicAutomation::pause_reason?
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
type status = :active | :paused
|
|
@@ -111,6 +119,16 @@ module OpenAI
|
|
|
111
119
|
|
|
112
120
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::PeriodicAutomation::status]
|
|
113
121
|
end
|
|
122
|
+
|
|
123
|
+
type pause_reason = :target_session_failed
|
|
124
|
+
|
|
125
|
+
module PauseReason
|
|
126
|
+
extend OpenAI::Internal::Type::Enum
|
|
127
|
+
|
|
128
|
+
TARGET_SESSION_FAILED: :target_session_failed
|
|
129
|
+
|
|
130
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::PeriodicAutomation::pause_reason]
|
|
131
|
+
end
|
|
114
132
|
end
|
|
115
133
|
end
|
|
116
134
|
end
|
|
@@ -150,8 +150,7 @@ module OpenAI
|
|
|
150
150
|
|
|
151
151
|
class Agent < OpenAI::Internal::Type::BaseModel
|
|
152
152
|
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
153
|
-
# object replaces the settings; null or an empty object
|
|
154
|
-
# compaction.
|
|
153
|
+
# object replaces the settings; null or an empty object uses blocking compaction.
|
|
155
154
|
attr_accessor compaction: OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction?
|
|
156
155
|
|
|
157
156
|
# Experimental settings to merge by key. Omitted settings keep their current
|
|
@@ -194,8 +193,7 @@ module OpenAI
|
|
|
194
193
|
|
|
195
194
|
# @param compaction
|
|
196
195
|
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
197
|
-
# object replaces the settings; null or an empty object
|
|
198
|
-
# compaction.
|
|
196
|
+
# object replaces the settings; null or an empty object uses blocking compaction.
|
|
199
197
|
# @param experimental
|
|
200
198
|
# Experimental settings to merge by key. Omitted settings keep their current
|
|
201
199
|
# values.
|
|
@@ -244,15 +242,15 @@ module OpenAI
|
|
|
244
242
|
type compaction = { ?async: bool? }
|
|
245
243
|
|
|
246
244
|
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
247
|
-
# Whether to compact context in the background. Omission or null defaults to
|
|
248
|
-
# Set to
|
|
249
|
-
# token usage.
|
|
245
|
+
# Whether to compact context in the background. Omission or null defaults to
|
|
246
|
+
# false. Set to true to enable background compaction. Background compaction may
|
|
247
|
+
# increase token usage.
|
|
250
248
|
attr_accessor async: bool?
|
|
251
249
|
|
|
252
250
|
# @param async
|
|
253
|
-
# Whether to compact context in the background. Omission or null defaults to
|
|
254
|
-
# Set to
|
|
255
|
-
# token usage.
|
|
251
|
+
# Whether to compact context in the background. Omission or null defaults to
|
|
252
|
+
# false. Set to true to enable background compaction. Background compaction may
|
|
253
|
+
# increase token usage.
|
|
256
254
|
def initialize: (?async: bool?) -> void
|
|
257
255
|
|
|
258
256
|
def to_hash: -> { ?async: bool? }
|
|
@@ -9,6 +9,7 @@ module OpenAI
|
|
|
9
9
|
?delegation: OpenAI::Models::Live::SessionConfig::delegation?,
|
|
10
10
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
11
11
|
?instructions: String?,
|
|
12
|
+
?safety_identifier: String?,
|
|
12
13
|
?store: bool,
|
|
13
14
|
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
14
15
|
}
|
|
@@ -64,6 +65,10 @@ module OpenAI
|
|
|
64
65
|
# server defaults. Immutable after startup.
|
|
65
66
|
attr_accessor instructions: String?
|
|
66
67
|
|
|
68
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
69
|
+
# detection.
|
|
70
|
+
attr_accessor safety_identifier: String?
|
|
71
|
+
|
|
67
72
|
# Whether to store the session for later forking and recording download. Defaults
|
|
68
73
|
# to false for new sessions.
|
|
69
74
|
attr_reader store: bool?
|
|
@@ -112,6 +117,9 @@ module OpenAI
|
|
|
112
117
|
# [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt).
|
|
113
118
|
# Limited to 16,384 client-supplied tokens. Omitted or blank instructions use
|
|
114
119
|
# server defaults. Immutable after startup.
|
|
120
|
+
# @param safety_identifier
|
|
121
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
122
|
+
# detection.
|
|
115
123
|
# @param store
|
|
116
124
|
# Whether to store the session for later forking and recording download. Defaults
|
|
117
125
|
# to false for new sessions.
|
|
@@ -127,6 +135,7 @@ module OpenAI
|
|
|
127
135
|
?delegation: OpenAI::Models::Live::SessionConfig::delegation?,
|
|
128
136
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
129
137
|
?instructions: String?,
|
|
138
|
+
?safety_identifier: String?,
|
|
130
139
|
?store: bool,
|
|
131
140
|
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
132
141
|
) -> void
|
|
@@ -138,6 +147,7 @@ module OpenAI
|
|
|
138
147
|
?delegation: OpenAI::Models::Live::SessionConfig::delegation?,
|
|
139
148
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
140
149
|
?instructions: String?,
|
|
150
|
+
?safety_identifier: String?,
|
|
141
151
|
?store: bool,
|
|
142
152
|
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
143
153
|
}
|
|
@@ -12,6 +12,7 @@ module OpenAI
|
|
|
12
12
|
?delegation: OpenAI::Models::Live::SessionResource::delegation?,
|
|
13
13
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
14
14
|
?instructions: String?,
|
|
15
|
+
?safety_identifier: String?,
|
|
15
16
|
?store: bool,
|
|
16
17
|
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
17
18
|
}
|
|
@@ -79,6 +80,10 @@ module OpenAI
|
|
|
79
80
|
# server defaults. Immutable after startup.
|
|
80
81
|
attr_accessor instructions: String?
|
|
81
82
|
|
|
83
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
84
|
+
# detection.
|
|
85
|
+
attr_accessor safety_identifier: String?
|
|
86
|
+
|
|
82
87
|
# Whether to store the session for later forking and recording download. Defaults
|
|
83
88
|
# to false for new sessions.
|
|
84
89
|
attr_reader store: bool?
|
|
@@ -132,6 +137,9 @@ module OpenAI
|
|
|
132
137
|
# [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt).
|
|
133
138
|
# Limited to 16,384 client-supplied tokens. Omitted or blank instructions use
|
|
134
139
|
# server defaults. Immutable after startup.
|
|
140
|
+
# @param safety_identifier
|
|
141
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
142
|
+
# detection.
|
|
135
143
|
# @param store
|
|
136
144
|
# Whether to store the session for later forking and recording download. Defaults
|
|
137
145
|
# to false for new sessions.
|
|
@@ -153,6 +161,7 @@ module OpenAI
|
|
|
153
161
|
?delegation: OpenAI::Models::Live::SessionResource::delegation?,
|
|
154
162
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
155
163
|
?instructions: String?,
|
|
164
|
+
?safety_identifier: String?,
|
|
156
165
|
?store: bool,
|
|
157
166
|
?triggers: ::Array[OpenAI::Live::DecisionTrigger],
|
|
158
167
|
?status: :active
|
|
@@ -168,6 +177,7 @@ module OpenAI
|
|
|
168
177
|
?delegation: OpenAI::Models::Live::SessionResource::delegation?,
|
|
169
178
|
?input: ::Array[OpenAI::Models::Live::initial_item],
|
|
170
179
|
?instructions: String?,
|
|
180
|
+
?safety_identifier: String?,
|
|
171
181
|
?store: bool,
|
|
172
182
|
?triggers: ::Array[OpenAI::Live::DecisionTrigger]
|
|
173
183
|
}
|