openai 0.64.0 → 0.65.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/models/admin/organization/audit_log_list_params.rb +6 -0
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +231 -1
- data/lib/openai/models/chat/completion_create_params.rb +16 -0
- data/lib/openai/models/conversations/conversation_create_params.rb +2 -2
- data/lib/openai/models/conversations/conversation_item.rb +57 -1
- data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
- data/lib/openai/models/conversations/item_create_params.rb +2 -2
- data/lib/openai/models/responses/compacted_response.rb +2 -2
- data/lib/openai/models/responses/input_token_count_params.rb +41 -4
- data/lib/openai/models/responses/response.rb +21 -5
- data/lib/openai/models/responses/response_compact_params.rb +3 -3
- data/lib/openai/models/responses/response_create_params.rb +19 -3
- data/lib/openai/models/responses/response_function_web_search.rb +11 -9
- data/lib/openai/models/responses/response_input_item.rb +38 -1
- data/lib/openai/models/responses/response_item.rb +57 -1
- data/lib/openai/models/responses/response_item_list.rb +2 -2
- data/lib/openai/models/responses/response_output_item.rb +57 -1
- data/lib/openai/models/responses/response_output_item_added_event.rb +2 -2
- data/lib/openai/models/responses/response_output_item_done_event.rb +2 -2
- data/lib/openai/models/responses/responses_client_event.rb +19 -3
- data/lib/openai/resources/conversations/items.rb +3 -3
- data/lib/openai/resources/conversations.rb +1 -1
- data/lib/openai/resources/responses/input_items.rb +1 -1
- data/lib/openai/resources/responses/input_tokens.rb +4 -2
- data/lib/openai/resources/responses.rb +3 -3
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/admin/organization/audit_log_list_params.rbi +30 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +489 -3
- data/rbi/openai/models/chat/completion_create_params.rbi +24 -0
- data/rbi/openai/models/conversations/conversation_create_params.rbi +3 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +150 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +1 -0
- data/rbi/openai/models/conversations/item_create_params.rbi +3 -0
- data/rbi/openai/models/responses/compacted_response.rbi +1 -0
- data/rbi/openai/models/responses/input_token_count_params.rbi +85 -0
- data/rbi/openai/models/responses/response.rbi +25 -0
- data/rbi/openai/models/responses/response_create_params.rbi +24 -0
- data/rbi/openai/models/responses/response_function_web_search.rbi +11 -8
- data/rbi/openai/models/responses/response_input_item.rbi +120 -0
- data/rbi/openai/models/responses/response_item.rbi +150 -0
- data/rbi/openai/models/responses/response_item_list.rbi +1 -0
- data/rbi/openai/models/responses/response_output_item.rbi +150 -0
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +1 -0
- data/rbi/openai/models/responses/response_output_item_done_event.rbi +1 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +24 -0
- data/rbi/openai/resources/chat/completions.rbi +16 -0
- data/rbi/openai/resources/conversations/items.rbi +1 -0
- data/rbi/openai/resources/conversations.rbi +1 -0
- data/rbi/openai/resources/responses/input_tokens.rbi +9 -0
- data/rbi/openai/resources/responses.rbi +16 -0
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +12 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +216 -3
- data/sig/openai/models/conversations/conversation_item.rbs +58 -0
- data/sig/openai/models/responses/input_token_count_params.rbs +20 -0
- data/sig/openai/models/responses/response_function_web_search.rbs +7 -5
- data/sig/openai/models/responses/response_input_item.rbs +33 -0
- data/sig/openai/models/responses/response_item.rbs +58 -0
- data/sig/openai/models/responses/response_output_item.rbs +58 -0
- data/sig/openai/resources/responses/input_tokens.rbs +1 -0
- metadata +2 -2
|
@@ -24,6 +24,7 @@ module OpenAI
|
|
|
24
24
|
OpenAI::Responses::ResponseComputerToolCallOutputItem,
|
|
25
25
|
OpenAI::Responses::ResponseToolSearchCall,
|
|
26
26
|
OpenAI::Responses::ResponseToolSearchOutputItem,
|
|
27
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools,
|
|
27
28
|
OpenAI::Responses::ResponseReasoningItem,
|
|
28
29
|
OpenAI::Responses::ResponseCompactionItem,
|
|
29
30
|
OpenAI::Responses::ResponseCodeInterpreterToolCall,
|
|
@@ -153,6 +154,155 @@ module OpenAI
|
|
|
153
154
|
end
|
|
154
155
|
end
|
|
155
156
|
|
|
157
|
+
class AdditionalTools < OpenAI::Internal::Type::BaseModel
|
|
158
|
+
OrHash =
|
|
159
|
+
T.type_alias do
|
|
160
|
+
T.any(
|
|
161
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools,
|
|
162
|
+
OpenAI::Internal::AnyHash
|
|
163
|
+
)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# The unique ID of the additional tools item.
|
|
167
|
+
sig { returns(String) }
|
|
168
|
+
attr_accessor :id
|
|
169
|
+
|
|
170
|
+
# The role that provided the additional tools.
|
|
171
|
+
sig do
|
|
172
|
+
returns(
|
|
173
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
attr_accessor :role
|
|
177
|
+
|
|
178
|
+
# The additional tool definitions made available at this item.
|
|
179
|
+
sig { returns(T::Array[OpenAI::Responses::Tool::Variants]) }
|
|
180
|
+
attr_accessor :tools
|
|
181
|
+
|
|
182
|
+
# The type of the item. Always `additional_tools`.
|
|
183
|
+
sig { returns(Symbol) }
|
|
184
|
+
attr_accessor :type
|
|
185
|
+
|
|
186
|
+
sig do
|
|
187
|
+
params(
|
|
188
|
+
id: String,
|
|
189
|
+
role:
|
|
190
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::OrSymbol,
|
|
191
|
+
tools:
|
|
192
|
+
T::Array[
|
|
193
|
+
T.any(
|
|
194
|
+
OpenAI::Responses::FunctionTool::OrHash,
|
|
195
|
+
OpenAI::Responses::FileSearchTool::OrHash,
|
|
196
|
+
OpenAI::Responses::ComputerTool::OrHash,
|
|
197
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
198
|
+
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
199
|
+
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
200
|
+
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
201
|
+
OpenAI::Responses::Tool::LocalShell::OrHash,
|
|
202
|
+
OpenAI::Responses::FunctionShellTool::OrHash,
|
|
203
|
+
OpenAI::Responses::CustomTool::OrHash,
|
|
204
|
+
OpenAI::Responses::NamespaceTool::OrHash,
|
|
205
|
+
OpenAI::Responses::ToolSearchTool::OrHash,
|
|
206
|
+
OpenAI::Responses::ApplyPatchTool::OrHash,
|
|
207
|
+
OpenAI::Responses::WebSearchTool::OrHash,
|
|
208
|
+
OpenAI::Responses::WebSearchPreviewTool::OrHash
|
|
209
|
+
)
|
|
210
|
+
],
|
|
211
|
+
type: Symbol
|
|
212
|
+
).returns(T.attached_class)
|
|
213
|
+
end
|
|
214
|
+
def self.new(
|
|
215
|
+
# The unique ID of the additional tools item.
|
|
216
|
+
id:,
|
|
217
|
+
# The role that provided the additional tools.
|
|
218
|
+
role:,
|
|
219
|
+
# The additional tool definitions made available at this item.
|
|
220
|
+
tools:,
|
|
221
|
+
# The type of the item. Always `additional_tools`.
|
|
222
|
+
type: :additional_tools
|
|
223
|
+
)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
sig do
|
|
227
|
+
override.returns(
|
|
228
|
+
{
|
|
229
|
+
id: String,
|
|
230
|
+
role:
|
|
231
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol,
|
|
232
|
+
tools: T::Array[OpenAI::Responses::Tool::Variants],
|
|
233
|
+
type: Symbol
|
|
234
|
+
}
|
|
235
|
+
)
|
|
236
|
+
end
|
|
237
|
+
def to_hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# The role that provided the additional tools.
|
|
241
|
+
module Role
|
|
242
|
+
extend OpenAI::Internal::Type::Enum
|
|
243
|
+
|
|
244
|
+
TaggedSymbol =
|
|
245
|
+
T.type_alias do
|
|
246
|
+
T.all(
|
|
247
|
+
Symbol,
|
|
248
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role
|
|
249
|
+
)
|
|
250
|
+
end
|
|
251
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
252
|
+
|
|
253
|
+
UNKNOWN =
|
|
254
|
+
T.let(
|
|
255
|
+
:unknown,
|
|
256
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
257
|
+
)
|
|
258
|
+
USER =
|
|
259
|
+
T.let(
|
|
260
|
+
:user,
|
|
261
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
262
|
+
)
|
|
263
|
+
ASSISTANT =
|
|
264
|
+
T.let(
|
|
265
|
+
:assistant,
|
|
266
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
267
|
+
)
|
|
268
|
+
SYSTEM =
|
|
269
|
+
T.let(
|
|
270
|
+
:system,
|
|
271
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
272
|
+
)
|
|
273
|
+
CRITIC =
|
|
274
|
+
T.let(
|
|
275
|
+
:critic,
|
|
276
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
277
|
+
)
|
|
278
|
+
DISCRIMINATOR =
|
|
279
|
+
T.let(
|
|
280
|
+
:discriminator,
|
|
281
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
282
|
+
)
|
|
283
|
+
DEVELOPER =
|
|
284
|
+
T.let(
|
|
285
|
+
:developer,
|
|
286
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
287
|
+
)
|
|
288
|
+
TOOL =
|
|
289
|
+
T.let(
|
|
290
|
+
:tool,
|
|
291
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
sig do
|
|
295
|
+
override.returns(
|
|
296
|
+
T::Array[
|
|
297
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::Role::TaggedSymbol
|
|
298
|
+
]
|
|
299
|
+
)
|
|
300
|
+
end
|
|
301
|
+
def self.values
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
|
|
156
306
|
class LocalShellCall < OpenAI::Internal::Type::BaseModel
|
|
157
307
|
OrHash =
|
|
158
308
|
T.type_alias do
|
|
@@ -52,6 +52,7 @@ module OpenAI
|
|
|
52
52
|
OpenAI::Responses::ResponseComputerToolCallOutputItem::OrHash,
|
|
53
53
|
OpenAI::Responses::ResponseToolSearchCall::OrHash,
|
|
54
54
|
OpenAI::Responses::ResponseToolSearchOutputItem::OrHash,
|
|
55
|
+
OpenAI::Conversations::ConversationItem::AdditionalTools::OrHash,
|
|
55
56
|
OpenAI::Responses::ResponseReasoningItem::OrHash,
|
|
56
57
|
OpenAI::Responses::ResponseCompactionItem::OrHash,
|
|
57
58
|
OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
|
|
@@ -34,6 +34,7 @@ module OpenAI
|
|
|
34
34
|
OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
|
|
35
35
|
OpenAI::Responses::ResponseInputItem::ToolSearchCall,
|
|
36
36
|
OpenAI::Responses::ResponseToolSearchOutputItemParam,
|
|
37
|
+
OpenAI::Responses::ResponseInputItem::AdditionalTools,
|
|
37
38
|
OpenAI::Responses::ResponseReasoningItem,
|
|
38
39
|
OpenAI::Responses::ResponseCompactionItemParam,
|
|
39
40
|
OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
|
|
@@ -92,6 +93,7 @@ module OpenAI
|
|
|
92
93
|
OpenAI::Responses::ResponseInputItem::FunctionCallOutput::OrHash,
|
|
93
94
|
OpenAI::Responses::ResponseInputItem::ToolSearchCall::OrHash,
|
|
94
95
|
OpenAI::Responses::ResponseToolSearchOutputItemParam::OrHash,
|
|
96
|
+
OpenAI::Responses::ResponseInputItem::AdditionalTools::OrHash,
|
|
95
97
|
OpenAI::Responses::ResponseReasoningItem::OrHash,
|
|
96
98
|
OpenAI::Responses::ResponseCompactionItemParam::OrHash,
|
|
97
99
|
OpenAI::Responses::ResponseInputItem::ImageGenerationCall::OrHash,
|
|
@@ -146,6 +148,7 @@ module OpenAI
|
|
|
146
148
|
OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
|
|
147
149
|
OpenAI::Responses::ResponseInputItem::ToolSearchCall,
|
|
148
150
|
OpenAI::Responses::ResponseToolSearchOutputItemParam,
|
|
151
|
+
OpenAI::Responses::ResponseInputItem::AdditionalTools,
|
|
149
152
|
OpenAI::Responses::ResponseReasoningItem,
|
|
150
153
|
OpenAI::Responses::ResponseCompactionItemParam,
|
|
151
154
|
OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
|
|
@@ -56,6 +56,7 @@ module OpenAI
|
|
|
56
56
|
OpenAI::Responses::ResponseReasoningItem::OrHash,
|
|
57
57
|
OpenAI::Responses::ResponseToolSearchCall::OrHash,
|
|
58
58
|
OpenAI::Responses::ResponseToolSearchOutputItem::OrHash,
|
|
59
|
+
OpenAI::Responses::ResponseOutputItem::AdditionalTools::OrHash,
|
|
59
60
|
OpenAI::Responses::ResponseCompactionItem::OrHash,
|
|
60
61
|
OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::OrHash,
|
|
61
62
|
OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
|
|
@@ -55,6 +55,32 @@ module OpenAI
|
|
|
55
55
|
sig { returns(T.nilable(T::Boolean)) }
|
|
56
56
|
attr_accessor :parallel_tool_calls
|
|
57
57
|
|
|
58
|
+
# A model-owned style preset to apply to this request. Omit this parameter to use
|
|
59
|
+
# the model's default style. Supported values may expand over time. Values must be
|
|
60
|
+
# at most 64 characters.
|
|
61
|
+
sig do
|
|
62
|
+
returns(
|
|
63
|
+
T.nilable(
|
|
64
|
+
T.any(
|
|
65
|
+
String,
|
|
66
|
+
OpenAI::Responses::InputTokenCountParams::Personality::OrSymbol
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
attr_reader :personality
|
|
72
|
+
|
|
73
|
+
sig do
|
|
74
|
+
params(
|
|
75
|
+
personality:
|
|
76
|
+
T.any(
|
|
77
|
+
String,
|
|
78
|
+
OpenAI::Responses::InputTokenCountParams::Personality::OrSymbol
|
|
79
|
+
)
|
|
80
|
+
).void
|
|
81
|
+
end
|
|
82
|
+
attr_writer :personality
|
|
83
|
+
|
|
58
84
|
# The unique ID of the previous response to the model. Use this to create
|
|
59
85
|
# multi-turn conversations. Learn more about
|
|
60
86
|
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
@@ -174,6 +200,11 @@ module OpenAI
|
|
|
174
200
|
instructions: T.nilable(String),
|
|
175
201
|
model: T.nilable(String),
|
|
176
202
|
parallel_tool_calls: T.nilable(T::Boolean),
|
|
203
|
+
personality:
|
|
204
|
+
T.any(
|
|
205
|
+
String,
|
|
206
|
+
OpenAI::Responses::InputTokenCountParams::Personality::OrSymbol
|
|
207
|
+
),
|
|
177
208
|
previous_response_id: T.nilable(String),
|
|
178
209
|
reasoning: T.nilable(OpenAI::Reasoning::OrHash),
|
|
179
210
|
text:
|
|
@@ -239,6 +270,10 @@ module OpenAI
|
|
|
239
270
|
model: nil,
|
|
240
271
|
# Whether to allow the model to run tool calls in parallel.
|
|
241
272
|
parallel_tool_calls: nil,
|
|
273
|
+
# A model-owned style preset to apply to this request. Omit this parameter to use
|
|
274
|
+
# the model's default style. Supported values may expand over time. Values must be
|
|
275
|
+
# at most 64 characters.
|
|
276
|
+
personality: nil,
|
|
242
277
|
# The unique ID of the previous response to the model. Use this to create
|
|
243
278
|
# multi-turn conversations. Learn more about
|
|
244
279
|
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
@@ -282,6 +317,11 @@ module OpenAI
|
|
|
282
317
|
instructions: T.nilable(String),
|
|
283
318
|
model: T.nilable(String),
|
|
284
319
|
parallel_tool_calls: T.nilable(T::Boolean),
|
|
320
|
+
personality:
|
|
321
|
+
T.any(
|
|
322
|
+
String,
|
|
323
|
+
OpenAI::Responses::InputTokenCountParams::Personality::OrSymbol
|
|
324
|
+
),
|
|
285
325
|
previous_response_id: T.nilable(String),
|
|
286
326
|
reasoning: T.nilable(OpenAI::Reasoning),
|
|
287
327
|
text: T.nilable(OpenAI::Responses::InputTokenCountParams::Text),
|
|
@@ -383,6 +423,51 @@ module OpenAI
|
|
|
383
423
|
)
|
|
384
424
|
end
|
|
385
425
|
|
|
426
|
+
# A model-owned style preset to apply to this request. Omit this parameter to use
|
|
427
|
+
# the model's default style. Supported values may expand over time. Values must be
|
|
428
|
+
# at most 64 characters.
|
|
429
|
+
module Personality
|
|
430
|
+
extend OpenAI::Internal::Type::Union
|
|
431
|
+
|
|
432
|
+
Variants =
|
|
433
|
+
T.type_alias do
|
|
434
|
+
T.any(
|
|
435
|
+
String,
|
|
436
|
+
OpenAI::Responses::InputTokenCountParams::Personality::TaggedSymbol
|
|
437
|
+
)
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
sig do
|
|
441
|
+
override.returns(
|
|
442
|
+
T::Array[
|
|
443
|
+
OpenAI::Responses::InputTokenCountParams::Personality::Variants
|
|
444
|
+
]
|
|
445
|
+
)
|
|
446
|
+
end
|
|
447
|
+
def self.variants
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
TaggedSymbol =
|
|
451
|
+
T.type_alias do
|
|
452
|
+
T.all(
|
|
453
|
+
Symbol,
|
|
454
|
+
OpenAI::Responses::InputTokenCountParams::Personality
|
|
455
|
+
)
|
|
456
|
+
end
|
|
457
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
458
|
+
|
|
459
|
+
FRIENDLY =
|
|
460
|
+
T.let(
|
|
461
|
+
:friendly,
|
|
462
|
+
OpenAI::Responses::InputTokenCountParams::Personality::TaggedSymbol
|
|
463
|
+
)
|
|
464
|
+
PRAGMATIC =
|
|
465
|
+
T.let(
|
|
466
|
+
:pragmatic,
|
|
467
|
+
OpenAI::Responses::InputTokenCountParams::Personality::TaggedSymbol
|
|
468
|
+
)
|
|
469
|
+
end
|
|
470
|
+
|
|
386
471
|
class Text < OpenAI::Internal::Type::BaseModel
|
|
387
472
|
OrHash =
|
|
388
473
|
T.type_alias do
|
|
@@ -202,6 +202,14 @@ module OpenAI
|
|
|
202
202
|
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
203
203
|
# of 24 hours.
|
|
204
204
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
205
|
+
# For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
|
|
206
|
+
#
|
|
207
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
208
|
+
# your organization's data retention policy:
|
|
209
|
+
#
|
|
210
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
211
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
212
|
+
# `prompt_cache_retention` is not specified.
|
|
205
213
|
sig do
|
|
206
214
|
returns(
|
|
207
215
|
T.nilable(
|
|
@@ -345,6 +353,7 @@ module OpenAI
|
|
|
345
353
|
OpenAI::Responses::ResponseReasoningItem::OrHash,
|
|
346
354
|
OpenAI::Responses::ResponseToolSearchCall::OrHash,
|
|
347
355
|
OpenAI::Responses::ResponseToolSearchOutputItem::OrHash,
|
|
356
|
+
OpenAI::Responses::ResponseOutputItem::AdditionalTools::OrHash,
|
|
348
357
|
OpenAI::Responses::ResponseCompactionItem::OrHash,
|
|
349
358
|
OpenAI::Responses::ResponseOutputItem::ImageGenerationCall::OrHash,
|
|
350
359
|
OpenAI::Responses::ResponseCodeInterpreterToolCall::OrHash,
|
|
@@ -530,6 +539,14 @@ module OpenAI
|
|
|
530
539
|
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
531
540
|
# of 24 hours.
|
|
532
541
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
542
|
+
# For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
|
|
543
|
+
#
|
|
544
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
545
|
+
# your organization's data retention policy:
|
|
546
|
+
#
|
|
547
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
548
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
549
|
+
# `prompt_cache_retention` is not specified.
|
|
533
550
|
prompt_cache_retention: nil,
|
|
534
551
|
# **gpt-5 and o-series models only**
|
|
535
552
|
#
|
|
@@ -828,6 +845,14 @@ module OpenAI
|
|
|
828
845
|
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
829
846
|
# of 24 hours.
|
|
830
847
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
848
|
+
# For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
|
|
849
|
+
#
|
|
850
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
851
|
+
# your organization's data retention policy:
|
|
852
|
+
#
|
|
853
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
854
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
855
|
+
# `prompt_cache_retention` is not specified.
|
|
831
856
|
module PromptCacheRetention
|
|
832
857
|
extend OpenAI::Internal::Type::Enum
|
|
833
858
|
|
|
@@ -189,6 +189,14 @@ module OpenAI
|
|
|
189
189
|
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
190
190
|
# of 24 hours.
|
|
191
191
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
192
|
+
# For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
|
|
193
|
+
#
|
|
194
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
195
|
+
# your organization's data retention policy:
|
|
196
|
+
#
|
|
197
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
198
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
199
|
+
# `prompt_cache_retention` is not specified.
|
|
192
200
|
sig do
|
|
193
201
|
returns(
|
|
194
202
|
T.nilable(
|
|
@@ -623,6 +631,14 @@ module OpenAI
|
|
|
623
631
|
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
624
632
|
# of 24 hours.
|
|
625
633
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
634
|
+
# For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
|
|
635
|
+
#
|
|
636
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
637
|
+
# your organization's data retention policy:
|
|
638
|
+
#
|
|
639
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
640
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
641
|
+
# `prompt_cache_retention` is not specified.
|
|
626
642
|
prompt_cache_retention: nil,
|
|
627
643
|
# **gpt-5 and o-series models only**
|
|
628
644
|
#
|
|
@@ -910,6 +926,14 @@ module OpenAI
|
|
|
910
926
|
# prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
911
927
|
# of 24 hours.
|
|
912
928
|
# [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
929
|
+
# For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported.
|
|
930
|
+
#
|
|
931
|
+
# For older models that support both `in_memory` and `24h`, the default depends on
|
|
932
|
+
# your organization's data retention policy:
|
|
933
|
+
#
|
|
934
|
+
# - Organizations without ZDR enabled default to `24h`.
|
|
935
|
+
# - Organizations with ZDR enabled default to `in_memory` when
|
|
936
|
+
# `prompt_cache_retention` is not specified.
|
|
913
937
|
module PromptCacheRetention
|
|
914
938
|
extend OpenAI::Internal::Type::Enum
|
|
915
939
|
|
|
@@ -113,10 +113,6 @@ module OpenAI
|
|
|
113
113
|
)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
-
# [DEPRECATED] The search query.
|
|
117
|
-
sig { returns(String) }
|
|
118
|
-
attr_accessor :query
|
|
119
|
-
|
|
120
116
|
# The action type.
|
|
121
117
|
sig { returns(Symbol) }
|
|
122
118
|
attr_accessor :type
|
|
@@ -128,6 +124,13 @@ module OpenAI
|
|
|
128
124
|
sig { params(queries: T::Array[String]).void }
|
|
129
125
|
attr_writer :queries
|
|
130
126
|
|
|
127
|
+
# The search query.
|
|
128
|
+
sig { returns(T.nilable(String)) }
|
|
129
|
+
attr_reader :query
|
|
130
|
+
|
|
131
|
+
sig { params(query: String).void }
|
|
132
|
+
attr_writer :query
|
|
133
|
+
|
|
131
134
|
# The sources used in the search.
|
|
132
135
|
sig do
|
|
133
136
|
returns(
|
|
@@ -153,8 +156,8 @@ module OpenAI
|
|
|
153
156
|
# Action type "search" - Performs a web search query.
|
|
154
157
|
sig do
|
|
155
158
|
params(
|
|
156
|
-
query: String,
|
|
157
159
|
queries: T::Array[String],
|
|
160
|
+
query: String,
|
|
158
161
|
sources:
|
|
159
162
|
T::Array[
|
|
160
163
|
OpenAI::Responses::ResponseFunctionWebSearch::Action::Search::Source::OrHash
|
|
@@ -163,10 +166,10 @@ module OpenAI
|
|
|
163
166
|
).returns(T.attached_class)
|
|
164
167
|
end
|
|
165
168
|
def self.new(
|
|
166
|
-
# [DEPRECATED] The search query.
|
|
167
|
-
query:,
|
|
168
169
|
# The search queries.
|
|
169
170
|
queries: nil,
|
|
171
|
+
# The search query.
|
|
172
|
+
query: nil,
|
|
170
173
|
# The sources used in the search.
|
|
171
174
|
sources: nil,
|
|
172
175
|
# The action type.
|
|
@@ -177,9 +180,9 @@ module OpenAI
|
|
|
177
180
|
sig do
|
|
178
181
|
override.returns(
|
|
179
182
|
{
|
|
180
|
-
query: String,
|
|
181
183
|
type: Symbol,
|
|
182
184
|
queries: T::Array[String],
|
|
185
|
+
query: String,
|
|
183
186
|
sources:
|
|
184
187
|
T::Array[
|
|
185
188
|
OpenAI::Responses::ResponseFunctionWebSearch::Action::Search::Source
|
|
@@ -25,6 +25,7 @@ module OpenAI
|
|
|
25
25
|
OpenAI::Responses::ResponseInputItem::FunctionCallOutput,
|
|
26
26
|
OpenAI::Responses::ResponseInputItem::ToolSearchCall,
|
|
27
27
|
OpenAI::Responses::ResponseToolSearchOutputItemParam,
|
|
28
|
+
OpenAI::Responses::ResponseInputItem::AdditionalTools,
|
|
28
29
|
OpenAI::Responses::ResponseReasoningItem,
|
|
29
30
|
OpenAI::Responses::ResponseCompactionItemParam,
|
|
30
31
|
OpenAI::Responses::ResponseInputItem::ImageGenerationCall,
|
|
@@ -834,6 +835,125 @@ module OpenAI
|
|
|
834
835
|
end
|
|
835
836
|
end
|
|
836
837
|
|
|
838
|
+
class AdditionalTools < OpenAI::Internal::Type::BaseModel
|
|
839
|
+
OrHash =
|
|
840
|
+
T.type_alias do
|
|
841
|
+
T.any(
|
|
842
|
+
OpenAI::Responses::ResponseInputItem::AdditionalTools,
|
|
843
|
+
OpenAI::Internal::AnyHash
|
|
844
|
+
)
|
|
845
|
+
end
|
|
846
|
+
|
|
847
|
+
# The role that provided the additional tools. Only `developer` is supported.
|
|
848
|
+
sig { returns(Symbol) }
|
|
849
|
+
attr_accessor :role
|
|
850
|
+
|
|
851
|
+
# A list of additional tools made available at this item.
|
|
852
|
+
sig do
|
|
853
|
+
returns(
|
|
854
|
+
T::Array[
|
|
855
|
+
T.any(
|
|
856
|
+
OpenAI::Responses::FunctionTool,
|
|
857
|
+
OpenAI::Responses::FileSearchTool,
|
|
858
|
+
OpenAI::Responses::ComputerTool,
|
|
859
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
860
|
+
OpenAI::Responses::Tool::Mcp,
|
|
861
|
+
OpenAI::Responses::Tool::CodeInterpreter,
|
|
862
|
+
OpenAI::Responses::Tool::ImageGeneration,
|
|
863
|
+
OpenAI::Responses::Tool::LocalShell,
|
|
864
|
+
OpenAI::Responses::FunctionShellTool,
|
|
865
|
+
OpenAI::Responses::CustomTool,
|
|
866
|
+
OpenAI::Responses::NamespaceTool,
|
|
867
|
+
OpenAI::Responses::ToolSearchTool,
|
|
868
|
+
OpenAI::Responses::ApplyPatchTool,
|
|
869
|
+
OpenAI::Responses::WebSearchTool,
|
|
870
|
+
OpenAI::Responses::WebSearchPreviewTool
|
|
871
|
+
)
|
|
872
|
+
]
|
|
873
|
+
)
|
|
874
|
+
end
|
|
875
|
+
attr_accessor :tools
|
|
876
|
+
|
|
877
|
+
# The item type. Always `additional_tools`.
|
|
878
|
+
sig { returns(Symbol) }
|
|
879
|
+
attr_accessor :type
|
|
880
|
+
|
|
881
|
+
# The unique ID of this additional tools item.
|
|
882
|
+
sig { returns(T.nilable(String)) }
|
|
883
|
+
attr_accessor :id
|
|
884
|
+
|
|
885
|
+
sig do
|
|
886
|
+
params(
|
|
887
|
+
tools:
|
|
888
|
+
T::Array[
|
|
889
|
+
T.any(
|
|
890
|
+
OpenAI::Responses::FunctionTool::OrHash,
|
|
891
|
+
OpenAI::Responses::FileSearchTool::OrHash,
|
|
892
|
+
OpenAI::Responses::ComputerTool::OrHash,
|
|
893
|
+
OpenAI::Responses::ComputerUsePreviewTool::OrHash,
|
|
894
|
+
OpenAI::Responses::Tool::Mcp::OrHash,
|
|
895
|
+
OpenAI::Responses::Tool::CodeInterpreter::OrHash,
|
|
896
|
+
OpenAI::Responses::Tool::ImageGeneration::OrHash,
|
|
897
|
+
OpenAI::Responses::Tool::LocalShell::OrHash,
|
|
898
|
+
OpenAI::Responses::FunctionShellTool::OrHash,
|
|
899
|
+
OpenAI::Responses::CustomTool::OrHash,
|
|
900
|
+
OpenAI::Responses::NamespaceTool::OrHash,
|
|
901
|
+
OpenAI::Responses::ToolSearchTool::OrHash,
|
|
902
|
+
OpenAI::Responses::ApplyPatchTool::OrHash,
|
|
903
|
+
OpenAI::Responses::WebSearchTool::OrHash,
|
|
904
|
+
OpenAI::Responses::WebSearchPreviewTool::OrHash
|
|
905
|
+
)
|
|
906
|
+
],
|
|
907
|
+
id: T.nilable(String),
|
|
908
|
+
role: Symbol,
|
|
909
|
+
type: Symbol
|
|
910
|
+
).returns(T.attached_class)
|
|
911
|
+
end
|
|
912
|
+
def self.new(
|
|
913
|
+
# A list of additional tools made available at this item.
|
|
914
|
+
tools:,
|
|
915
|
+
# The unique ID of this additional tools item.
|
|
916
|
+
id: nil,
|
|
917
|
+
# The role that provided the additional tools. Only `developer` is supported.
|
|
918
|
+
role: :developer,
|
|
919
|
+
# The item type. Always `additional_tools`.
|
|
920
|
+
type: :additional_tools
|
|
921
|
+
)
|
|
922
|
+
end
|
|
923
|
+
|
|
924
|
+
sig do
|
|
925
|
+
override.returns(
|
|
926
|
+
{
|
|
927
|
+
role: Symbol,
|
|
928
|
+
tools:
|
|
929
|
+
T::Array[
|
|
930
|
+
T.any(
|
|
931
|
+
OpenAI::Responses::FunctionTool,
|
|
932
|
+
OpenAI::Responses::FileSearchTool,
|
|
933
|
+
OpenAI::Responses::ComputerTool,
|
|
934
|
+
OpenAI::Responses::ComputerUsePreviewTool,
|
|
935
|
+
OpenAI::Responses::Tool::Mcp,
|
|
936
|
+
OpenAI::Responses::Tool::CodeInterpreter,
|
|
937
|
+
OpenAI::Responses::Tool::ImageGeneration,
|
|
938
|
+
OpenAI::Responses::Tool::LocalShell,
|
|
939
|
+
OpenAI::Responses::FunctionShellTool,
|
|
940
|
+
OpenAI::Responses::CustomTool,
|
|
941
|
+
OpenAI::Responses::NamespaceTool,
|
|
942
|
+
OpenAI::Responses::ToolSearchTool,
|
|
943
|
+
OpenAI::Responses::ApplyPatchTool,
|
|
944
|
+
OpenAI::Responses::WebSearchTool,
|
|
945
|
+
OpenAI::Responses::WebSearchPreviewTool
|
|
946
|
+
)
|
|
947
|
+
],
|
|
948
|
+
type: Symbol,
|
|
949
|
+
id: T.nilable(String)
|
|
950
|
+
}
|
|
951
|
+
)
|
|
952
|
+
end
|
|
953
|
+
def to_hash
|
|
954
|
+
end
|
|
955
|
+
end
|
|
956
|
+
|
|
837
957
|
class ImageGenerationCall < OpenAI::Internal::Type::BaseModel
|
|
838
958
|
OrHash =
|
|
839
959
|
T.type_alias do
|