openai 0.126.0 → 0.128.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 +24 -0
- data/README.md +1 -1
- data/lib/openai/helpers/agents/session_stream.rb +8 -0
- data/lib/openai/helpers/beta/agents/result.rb +14 -1
- data/lib/openai/models/beta/agent_session.rb +1 -37
- data/lib/openai/models/beta/agents/session_create_params.rb +1 -33
- data/lib/openai/models/beta/agents/session_update_params.rb +1 -33
- data/lib/openai/models/beta/session_turn_error.rb +0 -3
- data/lib/openai/models/csam_moderation.rb +131 -0
- data/lib/openai/models/csam_moderation_response.rb +27 -0
- data/lib/openai/models/live/mcp_require_approval_filter.rb +28 -0
- data/lib/openai/models/live/mcp_tool.rb +181 -0
- data/lib/openai/models/live/mcp_tool_filter.rb +28 -0
- data/lib/openai/models/live/responses_delegation_config.rb +7 -14
- data/lib/openai/models/live/responses_delegation_update_config.rb +7 -14
- data/lib/openai/models.rb +4 -0
- data/lib/openai/resources/beta/agents/sessions.rb +3 -15
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +5 -0
- data/rbi/openai/models/beta/agent_session.rbi +1 -64
- data/rbi/openai/models/beta/agents/session_create_params.rbi +0 -56
- data/rbi/openai/models/beta/agents/session_update_params.rbi +0 -56
- data/rbi/openai/models/beta/session_turn_error.rbi +0 -3
- data/rbi/openai/models/csam_moderation.rbi +248 -0
- data/rbi/openai/models/csam_moderation_response.rbi +56 -0
- data/rbi/openai/models/live/mcp_require_approval_filter.rbi +64 -0
- data/rbi/openai/models/live/mcp_tool.rbi +253 -0
- data/rbi/openai/models/live/mcp_tool_filter.rbi +58 -0
- data/rbi/openai/models/live/responses_delegation_config.rbi +7 -39
- data/rbi/openai/models/live/responses_delegation_update_config.rbi +7 -39
- data/rbi/openai/models.rbi +4 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +0 -12
- data/sig/openai/models/beta/agent_session.rbs +2 -36
- data/sig/openai/models/beta/agents/session_create_params.rbs +0 -23
- data/sig/openai/models/beta/agents/session_update_params.rbs +0 -23
- data/sig/openai/models/beta/session_turn_error.rbs +0 -4
- data/sig/openai/models/csam_moderation.rbs +113 -0
- data/sig/openai/models/csam_moderation_response.rbs +30 -0
- data/sig/openai/models/live/mcp_require_approval_filter.rbs +33 -0
- data/sig/openai/models/live/mcp_tool.rbs +159 -0
- data/sig/openai/models/live/mcp_tool_filter.rbs +27 -0
- data/sig/openai/models/live/responses_delegation_config.rbs +5 -11
- data/sig/openai/models/live/responses_delegation_update_config.rbs +5 -11
- data/sig/openai/models.rbs +4 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +0 -3
- metadata +16 -1
|
@@ -113,7 +113,7 @@ module OpenAI
|
|
|
113
113
|
OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter,
|
|
114
114
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell,
|
|
115
115
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration,
|
|
116
|
-
OpenAI::Live::
|
|
116
|
+
OpenAI::Live::McpTool,
|
|
117
117
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Custom,
|
|
118
118
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace,
|
|
119
119
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch,
|
|
@@ -137,7 +137,7 @@ module OpenAI
|
|
|
137
137
|
OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter::OrHash,
|
|
138
138
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::OrHash,
|
|
139
139
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration::OrHash,
|
|
140
|
-
OpenAI::Live::
|
|
140
|
+
OpenAI::Live::McpTool::OrHash,
|
|
141
141
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Custom::OrHash,
|
|
142
142
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace::OrHash,
|
|
143
143
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch::OrHash,
|
|
@@ -195,7 +195,7 @@ module OpenAI
|
|
|
195
195
|
OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter::OrHash,
|
|
196
196
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell::OrHash,
|
|
197
197
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration::OrHash,
|
|
198
|
-
OpenAI::Live::
|
|
198
|
+
OpenAI::Live::McpTool::OrHash,
|
|
199
199
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Custom::OrHash,
|
|
200
200
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace::OrHash,
|
|
201
201
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch::OrHash,
|
|
@@ -278,7 +278,7 @@ module OpenAI
|
|
|
278
278
|
OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter,
|
|
279
279
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell,
|
|
280
280
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration,
|
|
281
|
-
OpenAI::Live::
|
|
281
|
+
OpenAI::Live::McpTool,
|
|
282
282
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Custom,
|
|
283
283
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace,
|
|
284
284
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch,
|
|
@@ -1647,6 +1647,8 @@ module OpenAI
|
|
|
1647
1647
|
module Tool
|
|
1648
1648
|
extend OpenAI::Internal::Type::Union
|
|
1649
1649
|
|
|
1650
|
+
Mcp = ::OpenAI::Models::Live::McpTool
|
|
1651
|
+
|
|
1650
1652
|
Variants = T.type_alias {
|
|
1651
1653
|
T.any(
|
|
1652
1654
|
OpenAI::Live::FunctionTool,
|
|
@@ -1655,7 +1657,7 @@ module OpenAI
|
|
|
1655
1657
|
OpenAI::Live::ResponsesDelegationConfig::Tool::CodeInterpreter,
|
|
1656
1658
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Shell,
|
|
1657
1659
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ImageGeneration,
|
|
1658
|
-
OpenAI::Live::
|
|
1660
|
+
OpenAI::Live::McpTool,
|
|
1659
1661
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Custom,
|
|
1660
1662
|
OpenAI::Live::ResponsesDelegationConfig::Tool::Namespace,
|
|
1661
1663
|
OpenAI::Live::ResponsesDelegationConfig::Tool::ToolSearch,
|
|
@@ -2539,40 +2541,6 @@ module OpenAI
|
|
|
2539
2541
|
|
|
2540
2542
|
end
|
|
2541
2543
|
|
|
2542
|
-
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
2543
|
-
OrHash = T.type_alias do
|
|
2544
|
-
T.any(
|
|
2545
|
-
OpenAI::Live::ResponsesDelegationConfig::Tool::Mcp,
|
|
2546
|
-
OpenAI::Internal::AnyHash
|
|
2547
|
-
)
|
|
2548
|
-
end
|
|
2549
|
-
|
|
2550
|
-
sig { returns(Symbol) }
|
|
2551
|
-
attr_accessor :type
|
|
2552
|
-
|
|
2553
|
-
sig do
|
|
2554
|
-
params(
|
|
2555
|
-
|
|
2556
|
-
type: Symbol
|
|
2557
|
-
)
|
|
2558
|
-
.returns(T.attached_class)
|
|
2559
|
-
end
|
|
2560
|
-
def self.new(
|
|
2561
|
-
|
|
2562
|
-
type: :mcp
|
|
2563
|
-
)
|
|
2564
|
-
end
|
|
2565
|
-
|
|
2566
|
-
sig do
|
|
2567
|
-
override.returns(
|
|
2568
|
-
{type: Symbol}
|
|
2569
|
-
)
|
|
2570
|
-
end
|
|
2571
|
-
def to_hash
|
|
2572
|
-
end
|
|
2573
|
-
|
|
2574
|
-
end
|
|
2575
|
-
|
|
2576
2544
|
class Custom < OpenAI::Internal::Type::BaseModel
|
|
2577
2545
|
OrHash = T.type_alias do
|
|
2578
2546
|
T.any(
|
|
@@ -117,7 +117,7 @@ module OpenAI
|
|
|
117
117
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
|
|
118
118
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
|
|
119
119
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
|
|
120
|
-
OpenAI::Live::
|
|
120
|
+
OpenAI::Live::McpTool,
|
|
121
121
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
|
|
122
122
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
|
|
123
123
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
|
|
@@ -141,7 +141,7 @@ module OpenAI
|
|
|
141
141
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter::OrHash,
|
|
142
142
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::OrHash,
|
|
143
143
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration::OrHash,
|
|
144
|
-
OpenAI::Live::
|
|
144
|
+
OpenAI::Live::McpTool::OrHash,
|
|
145
145
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom::OrHash,
|
|
146
146
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace::OrHash,
|
|
147
147
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch::OrHash,
|
|
@@ -199,7 +199,7 @@ module OpenAI
|
|
|
199
199
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter::OrHash,
|
|
200
200
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell::OrHash,
|
|
201
201
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration::OrHash,
|
|
202
|
-
OpenAI::Live::
|
|
202
|
+
OpenAI::Live::McpTool::OrHash,
|
|
203
203
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom::OrHash,
|
|
204
204
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace::OrHash,
|
|
205
205
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch::OrHash,
|
|
@@ -283,7 +283,7 @@ module OpenAI
|
|
|
283
283
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
|
|
284
284
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
|
|
285
285
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
|
|
286
|
-
OpenAI::Live::
|
|
286
|
+
OpenAI::Live::McpTool,
|
|
287
287
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
|
|
288
288
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
|
|
289
289
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
|
|
@@ -1671,6 +1671,8 @@ module OpenAI
|
|
|
1671
1671
|
module Tool
|
|
1672
1672
|
extend OpenAI::Internal::Type::Union
|
|
1673
1673
|
|
|
1674
|
+
Mcp = ::OpenAI::Models::Live::McpTool
|
|
1675
|
+
|
|
1674
1676
|
Variants = T.type_alias {
|
|
1675
1677
|
T.any(
|
|
1676
1678
|
OpenAI::Live::FunctionTool,
|
|
@@ -1679,7 +1681,7 @@ module OpenAI
|
|
|
1679
1681
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::CodeInterpreter,
|
|
1680
1682
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Shell,
|
|
1681
1683
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ImageGeneration,
|
|
1682
|
-
OpenAI::Live::
|
|
1684
|
+
OpenAI::Live::McpTool,
|
|
1683
1685
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Custom,
|
|
1684
1686
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Namespace,
|
|
1685
1687
|
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::ToolSearch,
|
|
@@ -2636,40 +2638,6 @@ module OpenAI
|
|
|
2636
2638
|
|
|
2637
2639
|
end
|
|
2638
2640
|
|
|
2639
|
-
class Mcp < OpenAI::Internal::Type::BaseModel
|
|
2640
|
-
OrHash = T.type_alias do
|
|
2641
|
-
T.any(
|
|
2642
|
-
OpenAI::Live::ResponsesDelegationUpdateConfig::Tool::Mcp,
|
|
2643
|
-
OpenAI::Internal::AnyHash
|
|
2644
|
-
)
|
|
2645
|
-
end
|
|
2646
|
-
|
|
2647
|
-
sig { returns(Symbol) }
|
|
2648
|
-
attr_accessor :type
|
|
2649
|
-
|
|
2650
|
-
sig do
|
|
2651
|
-
params(
|
|
2652
|
-
|
|
2653
|
-
type: Symbol
|
|
2654
|
-
)
|
|
2655
|
-
.returns(T.attached_class)
|
|
2656
|
-
end
|
|
2657
|
-
def self.new(
|
|
2658
|
-
|
|
2659
|
-
type: :mcp
|
|
2660
|
-
)
|
|
2661
|
-
end
|
|
2662
|
-
|
|
2663
|
-
sig do
|
|
2664
|
-
override.returns(
|
|
2665
|
-
{type: Symbol}
|
|
2666
|
-
)
|
|
2667
|
-
end
|
|
2668
|
-
def to_hash
|
|
2669
|
-
end
|
|
2670
|
-
|
|
2671
|
-
end
|
|
2672
|
-
|
|
2673
2641
|
class Custom < OpenAI::Internal::Type::BaseModel
|
|
2674
2642
|
OrHash = T.type_alias do
|
|
2675
2643
|
T.any(
|
data/rbi/openai/models.rbi
CHANGED
|
@@ -66,6 +66,10 @@ module OpenAI
|
|
|
66
66
|
|
|
67
67
|
CreateEmbeddingResponse = OpenAI::Models::CreateEmbeddingResponse
|
|
68
68
|
|
|
69
|
+
CsamModeration = OpenAI::Models::CsamModeration
|
|
70
|
+
|
|
71
|
+
CsamModerationResponse = OpenAI::Models::CsamModerationResponse
|
|
72
|
+
|
|
69
73
|
CustomToolInputFormat = OpenAI::Models::CustomToolInputFormat
|
|
70
74
|
|
|
71
75
|
Decision = OpenAI::Models::Decision
|
|
@@ -46,7 +46,6 @@ module OpenAI
|
|
|
46
46
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
47
47
|
prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions::OrHash),
|
|
48
48
|
review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
|
|
49
|
-
spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
|
|
50
49
|
stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions::OrHash,
|
|
51
50
|
vault_ids: T.nilable(T::Array[String]),
|
|
52
51
|
stream: T.noreturn,
|
|
@@ -76,9 +75,6 @@ module OpenAI
|
|
|
76
75
|
prompt_cache_options: nil,
|
|
77
76
|
# Action review mode. Omit to use none.
|
|
78
77
|
review: nil,
|
|
79
|
-
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
80
|
-
# session.
|
|
81
|
-
spend_control: nil,
|
|
82
78
|
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
83
79
|
stream_options: nil,
|
|
84
80
|
# The IDs of vaults made available to the session.
|
|
@@ -111,7 +107,6 @@ module OpenAI
|
|
|
111
107
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
112
108
|
prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions::OrHash),
|
|
113
109
|
review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
|
|
114
|
-
spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
|
|
115
110
|
stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions::OrHash,
|
|
116
111
|
vault_ids: T.nilable(T::Array[String]),
|
|
117
112
|
stream: T.noreturn,
|
|
@@ -143,9 +138,6 @@ module OpenAI
|
|
|
143
138
|
prompt_cache_options: nil,
|
|
144
139
|
# Action review mode. Omit to use none.
|
|
145
140
|
review: nil,
|
|
146
|
-
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
147
|
-
# session.
|
|
148
|
-
spend_control: nil,
|
|
149
141
|
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
150
142
|
stream_options: nil,
|
|
151
143
|
# The IDs of vaults made available to the session.
|
|
@@ -182,7 +174,6 @@ module OpenAI
|
|
|
182
174
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
183
175
|
prompt_cache_options: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions::OrHash),
|
|
184
176
|
review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol,
|
|
185
|
-
spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl::OrHash),
|
|
186
177
|
request_options: OpenAI::RequestOptions::OrHash
|
|
187
178
|
)
|
|
188
179
|
.returns(OpenAI::Beta::AgentSession)
|
|
@@ -202,9 +193,6 @@ module OpenAI
|
|
|
202
193
|
# Default action review for new root turns. Existing turns and their subagents
|
|
203
194
|
# keep their review mode.
|
|
204
195
|
review: nil,
|
|
205
|
-
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
206
|
-
# spend.
|
|
207
|
-
spend_control: nil,
|
|
208
196
|
request_options: {}
|
|
209
197
|
)
|
|
210
198
|
end
|
|
@@ -16,8 +16,7 @@ module OpenAI
|
|
|
16
16
|
usage: OpenAI::Beta::TokenUsage?,
|
|
17
17
|
vault_ids: ::Array[String],
|
|
18
18
|
?prompt_cache_options: OpenAI::Beta::AgentSession::PromptCacheOptions?,
|
|
19
|
-
?review: OpenAI::Models::Beta::AgentSession::review
|
|
20
|
-
?spend_control: OpenAI::Beta::AgentSession::SpendControl
|
|
19
|
+
?review: OpenAI::Models::Beta::AgentSession::review
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
class AgentSession < OpenAI::Internal::Type::BaseModel
|
|
@@ -71,16 +70,6 @@ module OpenAI
|
|
|
71
70
|
OpenAI::Models::Beta::AgentSession::review
|
|
72
71
|
) -> OpenAI::Models::Beta::AgentSession::review
|
|
73
72
|
|
|
74
|
-
# Configured spending limit and best-effort consumption, in USD cents. Unlimited
|
|
75
|
-
# sessions omit this object.
|
|
76
|
-
attr_reader spend_control: OpenAI::Beta::AgentSession::SpendControl?
|
|
77
|
-
|
|
78
|
-
# Configured spending limit and best-effort consumption, in USD cents. Unlimited
|
|
79
|
-
# sessions omit this object.
|
|
80
|
-
def spend_control=: (
|
|
81
|
-
OpenAI::Beta::AgentSession::SpendControl
|
|
82
|
-
) -> OpenAI::Beta::AgentSession::SpendControl
|
|
83
|
-
|
|
84
73
|
# @param id
|
|
85
74
|
# The ID of the session.
|
|
86
75
|
# @param agent
|
|
@@ -109,9 +98,6 @@ module OpenAI
|
|
|
109
98
|
# @param review
|
|
110
99
|
# Review applied to eligible actions in this session. Omitted when review is none
|
|
111
100
|
# and automatic review is not enabled. Omission means none.
|
|
112
|
-
# @param spend_control
|
|
113
|
-
# Configured spending limit and best-effort consumption, in USD cents. Unlimited
|
|
114
|
-
# sessions omit this object.
|
|
115
101
|
# @param object
|
|
116
102
|
# The object type. Always `agent.session`.
|
|
117
103
|
def initialize: (
|
|
@@ -128,7 +114,6 @@ module OpenAI
|
|
|
128
114
|
vault_ids: ::Array[String],
|
|
129
115
|
?prompt_cache_options: OpenAI::Beta::AgentSession::PromptCacheOptions?,
|
|
130
116
|
?review: OpenAI::Models::Beta::AgentSession::review,
|
|
131
|
-
?spend_control: OpenAI::Beta::AgentSession::SpendControl,
|
|
132
117
|
?object: :"agent.session"
|
|
133
118
|
) -> void
|
|
134
119
|
|
|
@@ -146,8 +131,7 @@ module OpenAI
|
|
|
146
131
|
usage: OpenAI::Beta::TokenUsage?,
|
|
147
132
|
vault_ids: ::Array[String],
|
|
148
133
|
?prompt_cache_options: OpenAI::Beta::AgentSession::PromptCacheOptions?,
|
|
149
|
-
?review: OpenAI::Models::Beta::AgentSession::review
|
|
150
|
-
?spend_control: OpenAI::Beta::AgentSession::SpendControl
|
|
134
|
+
?review: OpenAI::Models::Beta::AgentSession::review
|
|
151
135
|
}
|
|
152
136
|
|
|
153
137
|
type agent =
|
|
@@ -752,24 +736,6 @@ module OpenAI
|
|
|
752
736
|
|
|
753
737
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::review]
|
|
754
738
|
end
|
|
755
|
-
|
|
756
|
-
type spend_control = { consumed: Integer?, limit: Integer }
|
|
757
|
-
|
|
758
|
-
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
759
|
-
# Best-effort recorded spend floored to whole USD cents, or null when unavailable.
|
|
760
|
-
attr_accessor consumed: Integer?
|
|
761
|
-
|
|
762
|
-
# The configured positive limit in USD cents.
|
|
763
|
-
attr_accessor limit: Integer
|
|
764
|
-
|
|
765
|
-
# @param consumed
|
|
766
|
-
# Best-effort recorded spend floored to whole USD cents, or null when unavailable.
|
|
767
|
-
# @param limit
|
|
768
|
-
# The configured positive limit in USD cents.
|
|
769
|
-
def initialize: (consumed: Integer?, limit: Integer) -> void
|
|
770
|
-
|
|
771
|
-
def to_hash: -> { consumed: Integer?, limit: Integer }
|
|
772
|
-
end
|
|
773
739
|
end
|
|
774
740
|
end
|
|
775
741
|
end
|
|
@@ -11,7 +11,6 @@ module OpenAI
|
|
|
11
11
|
?metadata: ::Hash[Symbol, String]?,
|
|
12
12
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
13
13
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
14
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
15
14
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
16
15
|
?vault_ids: ::Array[String]?,
|
|
17
16
|
?request_options: OpenAI::request_opts
|
|
@@ -64,10 +63,6 @@ module OpenAI
|
|
|
64
63
|
OpenAI::Models::Beta::Agents::SessionCreateParams::review
|
|
65
64
|
) -> OpenAI::Models::Beta::Agents::SessionCreateParams::review
|
|
66
65
|
|
|
67
|
-
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
68
|
-
# session.
|
|
69
|
-
attr_accessor spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?
|
|
70
|
-
|
|
71
66
|
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
72
67
|
attr_reader stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions?
|
|
73
68
|
|
|
@@ -100,9 +95,6 @@ module OpenAI
|
|
|
100
95
|
# default.
|
|
101
96
|
# @param review
|
|
102
97
|
# Action review mode. Omit to use none.
|
|
103
|
-
# @param spend_control
|
|
104
|
-
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
105
|
-
# session.
|
|
106
98
|
# @param stream_options
|
|
107
99
|
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
108
100
|
# @param vault_ids
|
|
@@ -115,7 +107,6 @@ module OpenAI
|
|
|
115
107
|
?metadata: ::Hash[Symbol, String]?,
|
|
116
108
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
117
109
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
118
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
119
110
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
120
111
|
?vault_ids: ::Array[String]?,
|
|
121
112
|
?request_options: OpenAI::request_opts
|
|
@@ -129,7 +120,6 @@ module OpenAI
|
|
|
129
120
|
?metadata: ::Hash[Symbol, String]?,
|
|
130
121
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions?,
|
|
131
122
|
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
132
|
-
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
133
123
|
?stream_options: OpenAI::Beta::Agents::SessionCreateParams::StreamOptions,
|
|
134
124
|
?vault_ids: ::Array[String]?,
|
|
135
125
|
?request_options: OpenAI::RequestOptions
|
|
@@ -364,19 +354,6 @@ module OpenAI
|
|
|
364
354
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionCreateParams::review]
|
|
365
355
|
end
|
|
366
356
|
|
|
367
|
-
type spend_control = { limit: Integer? }
|
|
368
|
-
|
|
369
|
-
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
370
|
-
# Positive USD cents, or null to remove the limit.
|
|
371
|
-
attr_accessor limit: Integer?
|
|
372
|
-
|
|
373
|
-
# @param limit
|
|
374
|
-
# Positive USD cents, or null to remove the limit.
|
|
375
|
-
def initialize: (limit: Integer?) -> void
|
|
376
|
-
|
|
377
|
-
def to_hash: -> { limit: Integer? }
|
|
378
|
-
end
|
|
379
|
-
|
|
380
357
|
type stream_options = { ?include_obfuscation: bool }
|
|
381
358
|
|
|
382
359
|
class StreamOptions < OpenAI::Internal::Type::BaseModel
|
|
@@ -9,7 +9,6 @@ module OpenAI
|
|
|
9
9
|
?metadata: ::Hash[Symbol, String]?,
|
|
10
10
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
|
|
11
11
|
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
12
|
-
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
13
12
|
?request_options: OpenAI::request_opts
|
|
14
13
|
}
|
|
15
14
|
|
|
@@ -46,10 +45,6 @@ module OpenAI
|
|
|
46
45
|
OpenAI::Models::Beta::Agents::SessionUpdateParams::review
|
|
47
46
|
) -> OpenAI::Models::Beta::Agents::SessionUpdateParams::review
|
|
48
47
|
|
|
49
|
-
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
50
|
-
# spend.
|
|
51
|
-
attr_accessor spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?
|
|
52
|
-
|
|
53
48
|
# @param agent
|
|
54
49
|
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
55
50
|
# @param metadata
|
|
@@ -62,16 +57,12 @@ module OpenAI
|
|
|
62
57
|
# @param review
|
|
63
58
|
# Default action review for new root turns. Existing turns and their subagents
|
|
64
59
|
# keep their review mode.
|
|
65
|
-
# @param spend_control
|
|
66
|
-
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
67
|
-
# spend.
|
|
68
60
|
def initialize: (
|
|
69
61
|
session_id: String,
|
|
70
62
|
?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
|
|
71
63
|
?metadata: ::Hash[Symbol, String]?,
|
|
72
64
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
|
|
73
65
|
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
74
|
-
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
75
66
|
?request_options: OpenAI::request_opts
|
|
76
67
|
) -> void
|
|
77
68
|
|
|
@@ -81,7 +72,6 @@ module OpenAI
|
|
|
81
72
|
?metadata: ::Hash[Symbol, String]?,
|
|
82
73
|
?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
|
|
83
74
|
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
84
|
-
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
85
75
|
?request_options: OpenAI::RequestOptions
|
|
86
76
|
}
|
|
87
77
|
|
|
@@ -254,19 +244,6 @@ module OpenAI
|
|
|
254
244
|
|
|
255
245
|
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionUpdateParams::review]
|
|
256
246
|
end
|
|
257
|
-
|
|
258
|
-
type spend_control = { limit: Integer? }
|
|
259
|
-
|
|
260
|
-
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
261
|
-
# Positive USD cents, or null to remove the limit.
|
|
262
|
-
attr_accessor limit: Integer?
|
|
263
|
-
|
|
264
|
-
# @param limit
|
|
265
|
-
# Positive USD cents, or null to remove the limit.
|
|
266
|
-
def initialize: (limit: Integer?) -> void
|
|
267
|
-
|
|
268
|
-
def to_hash: -> { limit: Integer? }
|
|
269
|
-
end
|
|
270
247
|
end
|
|
271
248
|
end
|
|
272
249
|
end
|
|
@@ -28,7 +28,6 @@ module OpenAI
|
|
|
28
28
|
type code =
|
|
29
29
|
:context_length_exceeded
|
|
30
30
|
| :max_output_tokens
|
|
31
|
-
| :session_budget_exceeded
|
|
32
31
|
| :usage_limit_exceeded
|
|
33
32
|
| :project_spend_limit_exceeded
|
|
34
33
|
| :organization_spend_limit_exceeded
|
|
@@ -60,9 +59,6 @@ module OpenAI
|
|
|
60
59
|
# The model reached its output token limit before finishing the response.
|
|
61
60
|
MAX_OUTPUT_TOKENS: :max_output_tokens
|
|
62
61
|
|
|
63
|
-
# The session has reached its usage budget.
|
|
64
|
-
SESSION_BUDGET_EXCEEDED: :session_budget_exceeded
|
|
65
|
-
|
|
66
62
|
# The organization has reached a usage, plan, or billing limit.
|
|
67
63
|
USAGE_LIMIT_EXCEEDED: :usage_limit_exceeded
|
|
68
64
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
type csam_moderation =
|
|
4
|
+
{
|
|
5
|
+
categories: OpenAI::CsamModeration::Categories,
|
|
6
|
+
category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes,
|
|
7
|
+
category_scores: OpenAI::CsamModeration::CategoryScores,
|
|
8
|
+
flagged: bool
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class CsamModeration < OpenAI::Internal::Type::BaseModel
|
|
12
|
+
# Whether the image was flagged in each category.
|
|
13
|
+
attr_accessor categories: OpenAI::CsamModeration::Categories
|
|
14
|
+
|
|
15
|
+
# The input types evaluated for each category.
|
|
16
|
+
attr_accessor category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes
|
|
17
|
+
|
|
18
|
+
# The classifier score for each category.
|
|
19
|
+
attr_accessor category_scores: OpenAI::CsamModeration::CategoryScores
|
|
20
|
+
|
|
21
|
+
# Whether either CSAM category was flagged.
|
|
22
|
+
attr_accessor flagged: bool
|
|
23
|
+
|
|
24
|
+
# @param categories
|
|
25
|
+
# Whether the image was flagged in each category.
|
|
26
|
+
# @param category_applied_input_types
|
|
27
|
+
# The input types evaluated for each category.
|
|
28
|
+
# @param category_scores
|
|
29
|
+
# The classifier score for each category.
|
|
30
|
+
# @param flagged
|
|
31
|
+
# Whether either CSAM category was flagged.
|
|
32
|
+
def initialize: (
|
|
33
|
+
categories: OpenAI::CsamModeration::Categories,
|
|
34
|
+
category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes,
|
|
35
|
+
category_scores: OpenAI::CsamModeration::CategoryScores,
|
|
36
|
+
flagged: bool
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
categories: OpenAI::CsamModeration::Categories,
|
|
41
|
+
category_applied_input_types: OpenAI::CsamModeration::CategoryAppliedInputTypes,
|
|
42
|
+
category_scores: OpenAI::CsamModeration::CategoryScores,
|
|
43
|
+
flagged: bool
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type categories = { likely_csam: bool, likely_csam_gen_ai: bool }
|
|
47
|
+
|
|
48
|
+
class Categories < OpenAI::Internal::Type::BaseModel
|
|
49
|
+
attr_accessor likely_csam: bool
|
|
50
|
+
|
|
51
|
+
attr_accessor likely_csam_gen_ai: bool
|
|
52
|
+
|
|
53
|
+
def initialize: (likely_csam: bool, likely_csam_gen_ai: bool) -> void
|
|
54
|
+
|
|
55
|
+
def to_hash: -> { likely_csam: bool, likely_csam_gen_ai: bool }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
type category_applied_input_types =
|
|
59
|
+
{
|
|
60
|
+
likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam],
|
|
61
|
+
likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
class CategoryAppliedInputTypes < OpenAI::Internal::Type::BaseModel
|
|
65
|
+
attr_accessor likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam]
|
|
66
|
+
|
|
67
|
+
attr_accessor likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
68
|
+
|
|
69
|
+
def initialize: (
|
|
70
|
+
likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam],
|
|
71
|
+
likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
72
|
+
) -> void
|
|
73
|
+
|
|
74
|
+
def to_hash: -> {
|
|
75
|
+
likely_csam: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam],
|
|
76
|
+
likely_csam_gen_ai: ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type likely_csam = :image
|
|
80
|
+
|
|
81
|
+
module LikelyCsam
|
|
82
|
+
extend OpenAI::Internal::Type::Enum
|
|
83
|
+
|
|
84
|
+
IMAGE: :image
|
|
85
|
+
|
|
86
|
+
def self?.values: -> ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
type likely_csam_gen_ai = :image
|
|
90
|
+
|
|
91
|
+
module LikelyCsamGenAi
|
|
92
|
+
extend OpenAI::Internal::Type::Enum
|
|
93
|
+
|
|
94
|
+
IMAGE: :image
|
|
95
|
+
|
|
96
|
+
def self?.values: -> ::Array[OpenAI::Models::CsamModeration::CategoryAppliedInputTypes::likely_csam_gen_ai]
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
type category_scores = { likely_csam: Float, likely_csam_gen_ai: Float }
|
|
101
|
+
|
|
102
|
+
class CategoryScores < OpenAI::Internal::Type::BaseModel
|
|
103
|
+
attr_accessor likely_csam: Float
|
|
104
|
+
|
|
105
|
+
attr_accessor likely_csam_gen_ai: Float
|
|
106
|
+
|
|
107
|
+
def initialize: (likely_csam: Float, likely_csam_gen_ai: Float) -> void
|
|
108
|
+
|
|
109
|
+
def to_hash: -> { likely_csam: Float, likely_csam_gen_ai: Float }
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
type csam_moderation_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
?model: :"omni-moderation-csam-latest",
|
|
7
|
+
results: ::Array[OpenAI::CsamModeration]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class CsamModerationResponse < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor model: :"omni-moderation-csam-latest"
|
|
14
|
+
|
|
15
|
+
attr_accessor results: ::Array[OpenAI::CsamModeration]
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
id: String,
|
|
19
|
+
results: ::Array[OpenAI::CsamModeration],
|
|
20
|
+
?model: :"omni-moderation-csam-latest"
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
id: String,
|
|
25
|
+
?model: :"omni-moderation-csam-latest",
|
|
26
|
+
results: ::Array[OpenAI::CsamModeration]
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Live
|
|
4
|
+
type mcp_require_approval_filter =
|
|
5
|
+
{
|
|
6
|
+
?always: OpenAI::Live::McpToolFilter?,
|
|
7
|
+
?never: OpenAI::Live::McpToolFilter?
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class McpRequireApprovalFilter < OpenAI::Internal::Type::BaseModel
|
|
11
|
+
# A filter that forces approval for matching tools.
|
|
12
|
+
attr_accessor always: OpenAI::Live::McpToolFilter?
|
|
13
|
+
|
|
14
|
+
# A filter that skips approval for matching tools.
|
|
15
|
+
attr_accessor never: OpenAI::Live::McpToolFilter?
|
|
16
|
+
|
|
17
|
+
# @param always
|
|
18
|
+
# A filter that forces approval for matching tools.
|
|
19
|
+
# @param never
|
|
20
|
+
# A filter that skips approval for matching tools.
|
|
21
|
+
def initialize: (
|
|
22
|
+
?always: OpenAI::Live::McpToolFilter?,
|
|
23
|
+
?never: OpenAI::Live::McpToolFilter?
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
?always: OpenAI::Live::McpToolFilter?,
|
|
28
|
+
?never: OpenAI::Live::McpToolFilter?
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|