openai 0.66.1 → 0.68.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 +23 -0
- data/README.md +1 -1
- data/lib/openai/internal/transport/base_client.rb +4 -1
- data/lib/openai/models/admin/organization/admin_api_key.rb +9 -1
- data/lib/openai/models/admin/organization/admin_api_key_create_params.rb +14 -1
- data/lib/openai/models/admin/organization/audit_log_list_params.rb +16 -2
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +241 -1
- data/lib/openai/models/admin/organization/projects/spend_alert_retrieve_params.rb +32 -0
- data/lib/openai/models/admin/organization/spend_alert_retrieve_params.rb +24 -0
- data/lib/openai/models/realtime/realtime_response_create_mcp_tool.rb +17 -8
- data/lib/openai/models/realtime/realtime_session_create_response.rb +17 -8
- data/lib/openai/models/realtime/realtime_tools_config_union.rb +17 -8
- data/lib/openai/models/reasoning.rb +27 -1
- data/lib/openai/models/responses/input_token_count_params.rb +4 -0
- data/lib/openai/models/responses/response_create_params.rb +4 -0
- data/lib/openai/models/responses/responses_client_event.rb +4 -0
- data/lib/openai/models/responses/tool.rb +17 -8
- data/lib/openai/models/video_create_params.rb +1 -0
- data/lib/openai/models/video_edit_params.rb +2 -2
- data/lib/openai/resources/admin/organization/admin_api_keys.rb +7 -1
- data/lib/openai/resources/admin/organization/audit_logs.rb +3 -1
- data/lib/openai/resources/admin/organization/projects/spend_alerts.rb +28 -0
- data/lib/openai/resources/admin/organization/spend_alerts.rb +21 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +2 -0
- data/rbi/openai/models/admin/organization/admin_api_key.rbi +8 -0
- data/rbi/openai/models/admin/organization/admin_api_key_create_params.rbi +21 -2
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +31 -2
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +468 -0
- data/rbi/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbi +52 -0
- data/rbi/openai/models/admin/organization/spend_alert_retrieve_params.rbi +42 -0
- data/rbi/openai/models/realtime/realtime_response_create_mcp_tool.rbi +24 -11
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +24 -11
- data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +24 -11
- data/rbi/openai/models/reasoning.rbi +34 -0
- data/rbi/openai/models/responses/tool.rbi +24 -11
- data/rbi/openai/models/video_edit_params.rbi +1 -1
- data/rbi/openai/resources/admin/organization/admin_api_keys.rbi +8 -1
- data/rbi/openai/resources/admin/organization/audit_logs.rbi +8 -1
- data/rbi/openai/resources/admin/organization/projects/spend_alerts.rbi +19 -0
- data/rbi/openai/resources/admin/organization/spend_alerts.rbi +14 -0
- data/sig/openai/models/admin/organization/admin_api_key.rbs +5 -0
- data/sig/openai/models/admin/organization/admin_api_key_create_params.rbs +8 -1
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +12 -1
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +228 -0
- data/sig/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbs +34 -0
- data/sig/openai/models/admin/organization/spend_alert_retrieve_params.rbs +27 -0
- data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +9 -2
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +9 -2
- data/sig/openai/models/realtime/realtime_tools_config_union.rbs +9 -2
- data/sig/openai/models/reasoning.rbs +17 -0
- data/sig/openai/models/responses/tool.rbs +9 -2
- data/sig/openai/resources/admin/organization/admin_api_keys.rbs +1 -0
- data/sig/openai/resources/admin/organization/audit_logs.rbs +1 -0
- data/sig/openai/resources/admin/organization/projects/spend_alerts.rbs +6 -0
- data/sig/openai/resources/admin/organization/spend_alerts.rbs +5 -0
- metadata +8 -2
|
@@ -48,8 +48,8 @@ module OpenAI
|
|
|
48
48
|
|
|
49
49
|
# @!attribute connector_id
|
|
50
50
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
51
|
-
# `server_url` or `
|
|
52
|
-
# connectors
|
|
51
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
52
|
+
# service connectors
|
|
53
53
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
54
54
|
#
|
|
55
55
|
# Currently supported `connector_id` values are:
|
|
@@ -94,13 +94,20 @@ module OpenAI
|
|
|
94
94
|
optional :server_description, String
|
|
95
95
|
|
|
96
96
|
# @!attribute server_url
|
|
97
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
98
|
-
# provided.
|
|
97
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
98
|
+
# must be provided.
|
|
99
99
|
#
|
|
100
100
|
# @return [String, nil]
|
|
101
101
|
optional :server_url, String
|
|
102
102
|
|
|
103
|
-
# @!
|
|
103
|
+
# @!attribute tunnel_id
|
|
104
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
105
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
106
|
+
#
|
|
107
|
+
# @return [String, nil]
|
|
108
|
+
optional :tunnel_id, String
|
|
109
|
+
|
|
110
|
+
# @!method initialize(server_label:, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp)
|
|
104
111
|
# Some parameter documentations has been truncated, see
|
|
105
112
|
# {OpenAI::Models::Realtime::RealtimeToolsConfigUnion::Mcp} for more details.
|
|
106
113
|
#
|
|
@@ -124,7 +131,9 @@ module OpenAI
|
|
|
124
131
|
#
|
|
125
132
|
# @param server_description [String] Optional description of the MCP server, used to provide more context.
|
|
126
133
|
#
|
|
127
|
-
# @param server_url [String] The URL for the MCP server. One of `server_url
|
|
134
|
+
# @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or
|
|
135
|
+
#
|
|
136
|
+
# @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
128
137
|
#
|
|
129
138
|
# @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`.
|
|
130
139
|
|
|
@@ -176,8 +185,8 @@ module OpenAI
|
|
|
176
185
|
end
|
|
177
186
|
|
|
178
187
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
179
|
-
# `server_url` or `
|
|
180
|
-
# connectors
|
|
188
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
189
|
+
# service connectors
|
|
181
190
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
182
191
|
#
|
|
183
192
|
# Currently supported `connector_id` values are:
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
module OpenAI
|
|
4
4
|
module Models
|
|
5
5
|
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute context
|
|
7
|
+
# Controls which reasoning items are rendered back to the model on later turns.
|
|
8
|
+
# When returned on a response, this is the effective reasoning context mode used
|
|
9
|
+
# for the response.
|
|
10
|
+
#
|
|
11
|
+
# @return [Symbol, OpenAI::Models::Reasoning::Context, nil]
|
|
12
|
+
optional :context, enum: -> { OpenAI::Reasoning::Context }, nil?: true
|
|
13
|
+
|
|
6
14
|
# @!attribute effort
|
|
7
15
|
# Constrains effort on reasoning for
|
|
8
16
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
|
|
@@ -44,7 +52,7 @@ module OpenAI
|
|
|
44
52
|
# @return [Symbol, OpenAI::Models::Reasoning::Summary, nil]
|
|
45
53
|
optional :summary, enum: -> { OpenAI::Reasoning::Summary }, nil?: true
|
|
46
54
|
|
|
47
|
-
# @!method initialize(effort: nil, generate_summary: nil, summary: nil)
|
|
55
|
+
# @!method initialize(context: nil, effort: nil, generate_summary: nil, summary: nil)
|
|
48
56
|
# Some parameter documentations has been truncated, see
|
|
49
57
|
# {OpenAI::Models::Reasoning} for more details.
|
|
50
58
|
#
|
|
@@ -53,12 +61,30 @@ module OpenAI
|
|
|
53
61
|
# Configuration options for
|
|
54
62
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
55
63
|
#
|
|
64
|
+
# @param context [Symbol, OpenAI::Models::Reasoning::Context, nil] Controls which reasoning items are rendered back to the model on later turns.
|
|
65
|
+
#
|
|
56
66
|
# @param effort [Symbol, OpenAI::Models::ReasoningEffort, nil] Constrains effort on reasoning for
|
|
57
67
|
#
|
|
58
68
|
# @param generate_summary [Symbol, OpenAI::Models::Reasoning::GenerateSummary, nil] **Deprecated:** use `summary` instead.
|
|
59
69
|
#
|
|
60
70
|
# @param summary [Symbol, OpenAI::Models::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be
|
|
61
71
|
|
|
72
|
+
# Controls which reasoning items are rendered back to the model on later turns.
|
|
73
|
+
# When returned on a response, this is the effective reasoning context mode used
|
|
74
|
+
# for the response.
|
|
75
|
+
#
|
|
76
|
+
# @see OpenAI::Models::Reasoning#context
|
|
77
|
+
module Context
|
|
78
|
+
extend OpenAI::Internal::Type::Enum
|
|
79
|
+
|
|
80
|
+
AUTO = :auto
|
|
81
|
+
CURRENT_TURN = :current_turn
|
|
82
|
+
ALL_TURNS = :all_turns
|
|
83
|
+
|
|
84
|
+
# @!method self.values
|
|
85
|
+
# @return [Array<Symbol>]
|
|
86
|
+
end
|
|
87
|
+
|
|
62
88
|
# @deprecated
|
|
63
89
|
#
|
|
64
90
|
# **Deprecated:** use `summary` instead.
|
|
@@ -100,6 +100,8 @@ module OpenAI
|
|
|
100
100
|
optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] }, nil?: true
|
|
101
101
|
|
|
102
102
|
# @!attribute truncation
|
|
103
|
+
# @deprecated
|
|
104
|
+
#
|
|
103
105
|
# The truncation strategy to use for the model response. - `auto`: If the input to
|
|
104
106
|
# this Response exceeds the model's context window size, the model will truncate
|
|
105
107
|
# the response to fit the context window by dropping items from the beginning of
|
|
@@ -303,6 +305,8 @@ module OpenAI
|
|
|
303
305
|
# @return [Array(Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell)]
|
|
304
306
|
end
|
|
305
307
|
|
|
308
|
+
# @deprecated
|
|
309
|
+
#
|
|
306
310
|
# The truncation strategy to use for the model response. - `auto`: If the input to
|
|
307
311
|
# this Response exceeds the model's context window size, the model will truncate
|
|
308
312
|
# the response to fit the context window by dropping items from the beginning of
|
|
@@ -311,6 +311,8 @@ module OpenAI
|
|
|
311
311
|
optional :top_p, Float, nil?: true
|
|
312
312
|
|
|
313
313
|
# @!attribute truncation
|
|
314
|
+
# @deprecated
|
|
315
|
+
#
|
|
314
316
|
# The truncation strategy to use for the model response.
|
|
315
317
|
#
|
|
316
318
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
@@ -590,6 +592,8 @@ module OpenAI
|
|
|
590
592
|
# @return [Array(Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell)]
|
|
591
593
|
end
|
|
592
594
|
|
|
595
|
+
# @deprecated
|
|
596
|
+
#
|
|
593
597
|
# The truncation strategy to use for the model response.
|
|
594
598
|
#
|
|
595
599
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
@@ -316,6 +316,8 @@ module OpenAI
|
|
|
316
316
|
optional :top_p, Float, nil?: true
|
|
317
317
|
|
|
318
318
|
# @!attribute truncation
|
|
319
|
+
# @deprecated
|
|
320
|
+
#
|
|
319
321
|
# The truncation strategy to use for the model response.
|
|
320
322
|
#
|
|
321
323
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
@@ -609,6 +611,8 @@ module OpenAI
|
|
|
609
611
|
# @return [Array(Symbol, OpenAI::Models::Responses::ToolChoiceOptions, OpenAI::Models::Responses::ToolChoiceAllowed, OpenAI::Models::Responses::ToolChoiceTypes, OpenAI::Models::Responses::ToolChoiceFunction, OpenAI::Models::Responses::ToolChoiceMcp, OpenAI::Models::Responses::ToolChoiceCustom, OpenAI::Models::Responses::ToolChoiceApplyPatch, OpenAI::Models::Responses::ToolChoiceShell)]
|
|
610
612
|
end
|
|
611
613
|
|
|
614
|
+
# @deprecated
|
|
615
|
+
#
|
|
612
616
|
# The truncation strategy to use for the model response.
|
|
613
617
|
#
|
|
614
618
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
@@ -87,8 +87,8 @@ module OpenAI
|
|
|
87
87
|
|
|
88
88
|
# @!attribute connector_id
|
|
89
89
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
90
|
-
# `server_url` or `
|
|
91
|
-
# connectors
|
|
90
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
91
|
+
# service connectors
|
|
92
92
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
93
93
|
#
|
|
94
94
|
# Currently supported `connector_id` values are:
|
|
@@ -131,13 +131,20 @@ module OpenAI
|
|
|
131
131
|
optional :server_description, String
|
|
132
132
|
|
|
133
133
|
# @!attribute server_url
|
|
134
|
-
# The URL for the MCP server. One of `server_url` or `
|
|
135
|
-
# provided.
|
|
134
|
+
# The URL for the MCP server. One of `server_url`, `connector_id`, or `tunnel_id`
|
|
135
|
+
# must be provided.
|
|
136
136
|
#
|
|
137
137
|
# @return [String, nil]
|
|
138
138
|
optional :server_url, String
|
|
139
139
|
|
|
140
|
-
# @!
|
|
140
|
+
# @!attribute tunnel_id
|
|
141
|
+
# The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
142
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided.
|
|
143
|
+
#
|
|
144
|
+
# @return [String, nil]
|
|
145
|
+
optional :tunnel_id, String
|
|
146
|
+
|
|
147
|
+
# @!method initialize(server_label:, allowed_tools: nil, authorization: nil, connector_id: nil, defer_loading: nil, headers: nil, require_approval: nil, server_description: nil, server_url: nil, tunnel_id: nil, type: :mcp)
|
|
141
148
|
# Some parameter documentations has been truncated, see
|
|
142
149
|
# {OpenAI::Models::Responses::Tool::Mcp} for more details.
|
|
143
150
|
#
|
|
@@ -161,7 +168,9 @@ module OpenAI
|
|
|
161
168
|
#
|
|
162
169
|
# @param server_description [String] Optional description of the MCP server, used to provide more context.
|
|
163
170
|
#
|
|
164
|
-
# @param server_url [String] The URL for the MCP server. One of `server_url
|
|
171
|
+
# @param server_url [String] The URL for the MCP server. One of `server_url`, `connector_id`, or
|
|
172
|
+
#
|
|
173
|
+
# @param tunnel_id [String] The Secure MCP Tunnel ID to use instead of a direct server URL. One of
|
|
165
174
|
#
|
|
166
175
|
# @param type [Symbol, :mcp] The type of the MCP tool. Always `mcp`.
|
|
167
176
|
|
|
@@ -213,8 +222,8 @@ module OpenAI
|
|
|
213
222
|
end
|
|
214
223
|
|
|
215
224
|
# Identifier for service connectors, like those available in ChatGPT. One of
|
|
216
|
-
# `server_url` or `
|
|
217
|
-
# connectors
|
|
225
|
+
# `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
226
|
+
# service connectors
|
|
218
227
|
# [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors).
|
|
219
228
|
#
|
|
220
229
|
# Currently supported `connector_id` values are:
|
|
@@ -62,6 +62,7 @@ module OpenAI
|
|
|
62
62
|
# Optional reference asset upload or reference object that guides generation.
|
|
63
63
|
variant OpenAI::Internal::Type::FileInput
|
|
64
64
|
|
|
65
|
+
# Optional reference asset upload or reference object that guides generation. Provide exactly one of `image_url` or `file_id` when using an object.
|
|
65
66
|
variant -> { OpenAI::ImageInputReferenceParam }
|
|
66
67
|
|
|
67
68
|
# @!method self.variants
|
|
@@ -33,7 +33,7 @@ module OpenAI
|
|
|
33
33
|
# Reference to the completed video to edit.
|
|
34
34
|
variant OpenAI::Internal::Type::FileInput
|
|
35
35
|
|
|
36
|
-
# Reference to the completed video.
|
|
36
|
+
# Reference to the completed video to edit.
|
|
37
37
|
variant -> { OpenAI::VideoEditParams::Video::VideoReferenceInputParam }
|
|
38
38
|
|
|
39
39
|
class VideoReferenceInputParam < OpenAI::Internal::Type::BaseModel
|
|
@@ -44,7 +44,7 @@ module OpenAI
|
|
|
44
44
|
required :id, String
|
|
45
45
|
|
|
46
46
|
# @!method initialize(id:)
|
|
47
|
-
# Reference to the completed video.
|
|
47
|
+
# Reference to the completed video to edit.
|
|
48
48
|
#
|
|
49
49
|
# @param id [String] The identifier of the completed video.
|
|
50
50
|
end
|
|
@@ -5,11 +5,17 @@ module OpenAI
|
|
|
5
5
|
class Admin
|
|
6
6
|
class Organization
|
|
7
7
|
class AdminAPIKeys
|
|
8
|
+
# Some parameter documentations has been truncated, see
|
|
9
|
+
# {OpenAI::Models::Admin::Organization::AdminAPIKeyCreateParams} for more details.
|
|
10
|
+
#
|
|
8
11
|
# Create an organization admin API key
|
|
9
12
|
#
|
|
10
|
-
# @overload create(name:, request_options: {})
|
|
13
|
+
# @overload create(name:, expires_in_seconds: nil, request_options: {})
|
|
11
14
|
#
|
|
12
15
|
# @param name [String]
|
|
16
|
+
#
|
|
17
|
+
# @param expires_in_seconds [Integer] The number of seconds until the API key expires. Omit this field for a key that
|
|
18
|
+
#
|
|
13
19
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
14
20
|
#
|
|
15
21
|
# @return [OpenAI::Models::Admin::Organization::AdminAPIKeyCreateResponse]
|
|
@@ -11,7 +11,7 @@ module OpenAI
|
|
|
11
11
|
#
|
|
12
12
|
# List user actions and configuration changes within this organization.
|
|
13
13
|
#
|
|
14
|
-
# @overload list(actor_emails: nil, actor_ids: nil, after: nil, before: nil, effective_at: nil, event_types: nil, limit: nil, project_ids: nil, resource_ids: nil, request_options: {})
|
|
14
|
+
# @overload list(actor_emails: nil, actor_ids: nil, after: nil, before: nil, effective_at: nil, event_types: nil, limit: nil, project_ids: nil, resource_ids: nil, tenant_only: nil, request_options: {})
|
|
15
15
|
#
|
|
16
16
|
# @param actor_emails [Array<String>] Return only events performed by users with these emails.
|
|
17
17
|
#
|
|
@@ -31,6 +31,8 @@ module OpenAI
|
|
|
31
31
|
#
|
|
32
32
|
# @param resource_ids [Array<String>] Return only events performed on these targets. For example, a project ID updated
|
|
33
33
|
#
|
|
34
|
+
# @param tenant_only [Boolean] Return only tenant-scoped events associated with this organization. Required for
|
|
35
|
+
#
|
|
34
36
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
35
37
|
#
|
|
36
38
|
# @return [OpenAI::Internal::ConversationCursorPage<OpenAI::Models::Admin::Organization::AuditLogListResponse>]
|
|
@@ -37,6 +37,34 @@ module OpenAI
|
|
|
37
37
|
)
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# Retrieves a project spend alert.
|
|
41
|
+
#
|
|
42
|
+
# @overload retrieve(alert_id, project_id:, request_options: {})
|
|
43
|
+
#
|
|
44
|
+
# @param alert_id [String] The ID of the spend alert to retrieve.
|
|
45
|
+
#
|
|
46
|
+
# @param project_id [String] The ID of the project.
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
49
|
+
#
|
|
50
|
+
# @return [OpenAI::Models::Admin::Organization::Projects::ProjectSpendAlert]
|
|
51
|
+
#
|
|
52
|
+
# @see OpenAI::Models::Admin::Organization::Projects::SpendAlertRetrieveParams
|
|
53
|
+
def retrieve(alert_id, params)
|
|
54
|
+
parsed, options = OpenAI::Admin::Organization::Projects::SpendAlertRetrieveParams.dump_request(params)
|
|
55
|
+
project_id =
|
|
56
|
+
parsed.delete(:project_id) do
|
|
57
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
58
|
+
end
|
|
59
|
+
@client.request(
|
|
60
|
+
method: :get,
|
|
61
|
+
path: ["organization/projects/%1$s/spend_alerts/%2$s", project_id, alert_id],
|
|
62
|
+
model: OpenAI::Admin::Organization::Projects::ProjectSpendAlert,
|
|
63
|
+
security: {admin_api_key_auth: true},
|
|
64
|
+
options: options
|
|
65
|
+
)
|
|
66
|
+
end
|
|
67
|
+
|
|
40
68
|
# Updates a project spend alert.
|
|
41
69
|
#
|
|
42
70
|
# @overload update(alert_id, project_id:, currency:, interval:, notification_channel:, threshold_amount:, request_options: {})
|
|
@@ -34,6 +34,27 @@ module OpenAI
|
|
|
34
34
|
)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
# Retrieves an organization spend alert.
|
|
38
|
+
#
|
|
39
|
+
# @overload retrieve(alert_id, request_options: {})
|
|
40
|
+
#
|
|
41
|
+
# @param alert_id [String] The ID of the spend alert to retrieve.
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
44
|
+
#
|
|
45
|
+
# @return [OpenAI::Models::Admin::Organization::OrganizationSpendAlert]
|
|
46
|
+
#
|
|
47
|
+
# @see OpenAI::Models::Admin::Organization::SpendAlertRetrieveParams
|
|
48
|
+
def retrieve(alert_id, params = {})
|
|
49
|
+
@client.request(
|
|
50
|
+
method: :get,
|
|
51
|
+
path: ["organization/spend_alerts/%1$s", alert_id],
|
|
52
|
+
model: OpenAI::Admin::Organization::OrganizationSpendAlert,
|
|
53
|
+
security: {admin_api_key_auth: true},
|
|
54
|
+
options: params[:request_options]
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
|
|
37
58
|
# Updates an organization spend alert.
|
|
38
59
|
#
|
|
39
60
|
# @overload update(alert_id, currency:, interval:, notification_channel:, threshold_amount:, request_options: {})
|
data/lib/openai/version.rb
CHANGED
data/lib/openai.rb
CHANGED
|
@@ -206,6 +206,7 @@ require_relative "openai/models/admin/organization/projects/service_account_upda
|
|
|
206
206
|
require_relative "openai/models/admin/organization/projects/spend_alert_create_params"
|
|
207
207
|
require_relative "openai/models/admin/organization/projects/spend_alert_delete_params"
|
|
208
208
|
require_relative "openai/models/admin/organization/projects/spend_alert_list_params"
|
|
209
|
+
require_relative "openai/models/admin/organization/projects/spend_alert_retrieve_params"
|
|
209
210
|
require_relative "openai/models/admin/organization/projects/spend_alert_update_params"
|
|
210
211
|
require_relative "openai/models/admin/organization/projects/user_create_params"
|
|
211
212
|
require_relative "openai/models/admin/organization/projects/user_delete_params"
|
|
@@ -232,6 +233,7 @@ require_relative "openai/models/admin/organization/role_update_params"
|
|
|
232
233
|
require_relative "openai/models/admin/organization/spend_alert_create_params"
|
|
233
234
|
require_relative "openai/models/admin/organization/spend_alert_delete_params"
|
|
234
235
|
require_relative "openai/models/admin/organization/spend_alert_list_params"
|
|
236
|
+
require_relative "openai/models/admin/organization/spend_alert_retrieve_params"
|
|
235
237
|
require_relative "openai/models/admin/organization/spend_alert_update_params"
|
|
236
238
|
require_relative "openai/models/admin/organization/usage_audio_speeches_params"
|
|
237
239
|
require_relative "openai/models/admin/organization/usage_audio_speeches_response"
|
|
@@ -21,6 +21,10 @@ module OpenAI
|
|
|
21
21
|
sig { returns(Integer) }
|
|
22
22
|
attr_accessor :created_at
|
|
23
23
|
|
|
24
|
+
# The Unix timestamp (in seconds) of when the API key expires
|
|
25
|
+
sig { returns(T.nilable(Integer)) }
|
|
26
|
+
attr_accessor :expires_at
|
|
27
|
+
|
|
24
28
|
# The object type, which is always `organization.admin_api_key`
|
|
25
29
|
sig { returns(Symbol) }
|
|
26
30
|
attr_accessor :object
|
|
@@ -52,6 +56,7 @@ module OpenAI
|
|
|
52
56
|
params(
|
|
53
57
|
id: String,
|
|
54
58
|
created_at: Integer,
|
|
59
|
+
expires_at: T.nilable(Integer),
|
|
55
60
|
owner: OpenAI::Admin::Organization::AdminAPIKey::Owner::OrHash,
|
|
56
61
|
redacted_value: String,
|
|
57
62
|
last_used_at: T.nilable(Integer),
|
|
@@ -64,6 +69,8 @@ module OpenAI
|
|
|
64
69
|
id:,
|
|
65
70
|
# The Unix timestamp (in seconds) of when the API key was created
|
|
66
71
|
created_at:,
|
|
72
|
+
# The Unix timestamp (in seconds) of when the API key expires
|
|
73
|
+
expires_at:,
|
|
67
74
|
owner:,
|
|
68
75
|
# The redacted value of the API key
|
|
69
76
|
redacted_value:,
|
|
@@ -81,6 +88,7 @@ module OpenAI
|
|
|
81
88
|
{
|
|
82
89
|
id: String,
|
|
83
90
|
created_at: Integer,
|
|
91
|
+
expires_at: T.nilable(Integer),
|
|
84
92
|
object: Symbol,
|
|
85
93
|
owner: OpenAI::Admin::Organization::AdminAPIKey::Owner,
|
|
86
94
|
redacted_value: String,
|
|
@@ -19,18 +19,37 @@ module OpenAI
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :name
|
|
21
21
|
|
|
22
|
+
# The number of seconds until the API key expires. Omit this field for a key that
|
|
23
|
+
# does not expire.
|
|
24
|
+
sig { returns(T.nilable(Integer)) }
|
|
25
|
+
attr_reader :expires_in_seconds
|
|
26
|
+
|
|
27
|
+
sig { params(expires_in_seconds: Integer).void }
|
|
28
|
+
attr_writer :expires_in_seconds
|
|
29
|
+
|
|
22
30
|
sig do
|
|
23
31
|
params(
|
|
24
32
|
name: String,
|
|
33
|
+
expires_in_seconds: Integer,
|
|
25
34
|
request_options: OpenAI::RequestOptions::OrHash
|
|
26
35
|
).returns(T.attached_class)
|
|
27
36
|
end
|
|
28
|
-
def self.new(
|
|
37
|
+
def self.new(
|
|
38
|
+
name:,
|
|
39
|
+
# The number of seconds until the API key expires. Omit this field for a key that
|
|
40
|
+
# does not expire.
|
|
41
|
+
expires_in_seconds: nil,
|
|
42
|
+
request_options: {}
|
|
43
|
+
)
|
|
29
44
|
end
|
|
30
45
|
|
|
31
46
|
sig do
|
|
32
47
|
override.returns(
|
|
33
|
-
{
|
|
48
|
+
{
|
|
49
|
+
name: String,
|
|
50
|
+
expires_in_seconds: Integer,
|
|
51
|
+
request_options: OpenAI::RequestOptions
|
|
52
|
+
}
|
|
34
53
|
)
|
|
35
54
|
end
|
|
36
55
|
def to_hash
|
|
@@ -109,13 +109,24 @@ module OpenAI
|
|
|
109
109
|
attr_writer :project_ids
|
|
110
110
|
|
|
111
111
|
# Return only events performed on these targets. For example, a project ID
|
|
112
|
-
# updated.
|
|
112
|
+
# updated. For ChatGPT connector role events, use the workspace connector resource
|
|
113
|
+
# ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.
|
|
113
114
|
sig { returns(T.nilable(T::Array[String])) }
|
|
114
115
|
attr_reader :resource_ids
|
|
115
116
|
|
|
116
117
|
sig { params(resource_ids: T::Array[String]).void }
|
|
117
118
|
attr_writer :resource_ids
|
|
118
119
|
|
|
120
|
+
# Return only tenant-scoped events associated with this organization. Required for
|
|
121
|
+
# tenant-scoped events such as `role.bound_to_resource` and
|
|
122
|
+
# `role.unbound_from_resource`. When `true`, all supplied event types must be
|
|
123
|
+
# tenant-scoped.
|
|
124
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
125
|
+
attr_reader :tenant_only
|
|
126
|
+
|
|
127
|
+
sig { params(tenant_only: T::Boolean).void }
|
|
128
|
+
attr_writer :tenant_only
|
|
129
|
+
|
|
119
130
|
sig do
|
|
120
131
|
params(
|
|
121
132
|
actor_emails: T::Array[String],
|
|
@@ -131,6 +142,7 @@ module OpenAI
|
|
|
131
142
|
limit: Integer,
|
|
132
143
|
project_ids: T::Array[String],
|
|
133
144
|
resource_ids: T::Array[String],
|
|
145
|
+
tenant_only: T::Boolean,
|
|
134
146
|
request_options: OpenAI::RequestOptions::OrHash
|
|
135
147
|
).returns(T.attached_class)
|
|
136
148
|
end
|
|
@@ -162,8 +174,14 @@ module OpenAI
|
|
|
162
174
|
# Return only events for these projects.
|
|
163
175
|
project_ids: nil,
|
|
164
176
|
# Return only events performed on these targets. For example, a project ID
|
|
165
|
-
# updated.
|
|
177
|
+
# updated. For ChatGPT connector role events, use the workspace connector resource
|
|
178
|
+
# ID shown in `details.id`, such as `<workspace_id>__<connector_id>`.
|
|
166
179
|
resource_ids: nil,
|
|
180
|
+
# Return only tenant-scoped events associated with this organization. Required for
|
|
181
|
+
# tenant-scoped events such as `role.bound_to_resource` and
|
|
182
|
+
# `role.unbound_from_resource`. When `true`, all supplied event types must be
|
|
183
|
+
# tenant-scoped.
|
|
184
|
+
tenant_only: nil,
|
|
167
185
|
request_options: {}
|
|
168
186
|
)
|
|
169
187
|
end
|
|
@@ -184,6 +202,7 @@ module OpenAI
|
|
|
184
202
|
limit: Integer,
|
|
185
203
|
project_ids: T::Array[String],
|
|
186
204
|
resource_ids: T::Array[String],
|
|
205
|
+
tenant_only: T::Boolean,
|
|
187
206
|
request_options: OpenAI::RequestOptions
|
|
188
207
|
}
|
|
189
208
|
)
|
|
@@ -522,6 +541,16 @@ module OpenAI
|
|
|
522
541
|
:"role.assignment.deleted",
|
|
523
542
|
OpenAI::Admin::Organization::AuditLogListParams::EventType::TaggedSymbol
|
|
524
543
|
)
|
|
544
|
+
ROLE_BOUND_TO_RESOURCE =
|
|
545
|
+
T.let(
|
|
546
|
+
:"role.bound_to_resource",
|
|
547
|
+
OpenAI::Admin::Organization::AuditLogListParams::EventType::TaggedSymbol
|
|
548
|
+
)
|
|
549
|
+
ROLE_UNBOUND_FROM_RESOURCE =
|
|
550
|
+
T.let(
|
|
551
|
+
:"role.unbound_from_resource",
|
|
552
|
+
OpenAI::Admin::Organization::AuditLogListParams::EventType::TaggedSymbol
|
|
553
|
+
)
|
|
525
554
|
SCIM_ENABLED =
|
|
526
555
|
T.let(
|
|
527
556
|
:"scim.enabled",
|