openai 0.118.0 → 0.119.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 +10 -0
- data/README.md +1 -1
- data/lib/openai/client.rb +1 -1
- data/lib/openai/helpers/data_residency.rb +4 -1
- data/lib/openai/models/all_models.rb +1 -0
- data/lib/openai/models/beta/beta_compacted_response.rb +34 -1
- data/lib/openai/models/beta/beta_response.rb +34 -1
- data/lib/openai/models/beta/beta_response_input_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_output_item.rb +45 -1
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +186 -13
- data/lib/openai/models/beta/beta_responses_client_event.rb +48 -1
- data/lib/openai/models/beta/beta_tool.rb +164 -13
- data/lib/openai/models/beta/response_compact_params.rb +44 -1
- data/lib/openai/models/beta/response_create_params.rb +44 -1
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/conversations/conversation_item.rb +45 -1
- data/lib/openai/models/image_edit_params.rb +72 -16
- data/lib/openai/models/image_generate_params.rb +160 -8
- data/lib/openai/models/image_model.rb +2 -0
- data/lib/openai/models/images_response.rb +55 -4
- data/lib/openai/models/realtime/realtime_audio_config_input.rb +14 -1
- data/lib/openai/models/realtime/realtime_session_create_response.rb +14 -1
- data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +14 -1
- data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +14 -1
- data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +14 -1
- data/lib/openai/models/responses/compacted_response.rb +37 -1
- data/lib/openai/models/responses/response.rb +34 -1
- data/lib/openai/models/responses/response_compact_params.rb +50 -1
- data/lib/openai/models/responses/response_create_params.rb +47 -1
- data/lib/openai/models/responses/response_input_item.rb +45 -1
- data/lib/openai/models/responses/response_item.rb +45 -1
- data/lib/openai/models/responses/response_output_item.rb +45 -1
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +186 -13
- data/lib/openai/models/responses/responses_client_event.rb +48 -1
- data/lib/openai/models/responses/tool.rb +164 -13
- data/lib/openai/models/responses_model.rb +1 -0
- data/lib/openai/resources/admin/organization/projects.rb +6 -6
- data/lib/openai/resources/admin/organization.rb +6 -6
- data/lib/openai/resources/beta/responses.rb +12 -3
- data/lib/openai/resources/images.rb +102 -18
- data/lib/openai/resources/responses.rb +12 -3
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/all_models.rbi +1 -0
- data/rbi/openai/models/beta/beta_compacted_response.rbi +67 -1
- data/rbi/openai/models/beta/beta_response.rbi +62 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_output_item.rbi +82 -1
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +338 -13
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +105 -0
- data/rbi/openai/models/beta/beta_tool.rbi +245 -13
- data/rbi/openai/models/beta/response_compact_params.rbi +81 -0
- data/rbi/openai/models/beta/response_create_params.rbi +81 -0
- data/rbi/openai/models/beta/session_turn_error.rbi +3 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +84 -1
- data/rbi/openai/models/image_edit_params.rbi +76 -14
- data/rbi/openai/models/image_generate_params.rbi +218 -6
- data/rbi/openai/models/image_model.rbi +2 -0
- data/rbi/openai/models/images_response.rbi +90 -3
- data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +17 -1
- data/rbi/openai/models/realtime/realtime_translation_session.rbi +19 -3
- data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +19 -3
- data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +19 -3
- data/rbi/openai/models/responses/compacted_response.rbi +67 -1
- data/rbi/openai/models/responses/response.rbi +62 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +88 -0
- data/rbi/openai/models/responses/response_create_params.rbi +87 -0
- data/rbi/openai/models/responses/response_input_item.rbi +82 -1
- data/rbi/openai/models/responses/response_item.rbi +82 -1
- data/rbi/openai/models/responses/response_output_item.rbi +82 -1
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +340 -13
- data/rbi/openai/models/responses/responses_client_event.rbi +105 -0
- data/rbi/openai/models/responses/tool.rbi +248 -13
- data/rbi/openai/models/responses_model.rbi +1 -0
- data/rbi/openai/resources/admin/organization/projects.rbi +3 -3
- data/rbi/openai/resources/admin/organization.rbi +3 -3
- data/rbi/openai/resources/beta/responses.rbi +9 -0
- data/rbi/openai/resources/images.rbi +98 -14
- data/rbi/openai/resources/responses.rbi +11 -0
- data/sig/openai/models/all_models.rbs +2 -0
- data/sig/openai/models/beta/beta_compacted_response.rbs +42 -2
- data/sig/openai/models/beta/beta_response.rbs +40 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_output_item.rbs +51 -3
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +188 -15
- data/sig/openai/models/beta/beta_responses_client_event.rbs +56 -0
- data/sig/openai/models/beta/beta_tool.rbs +188 -15
- data/sig/openai/models/beta/response_compact_params.rbs +56 -0
- data/sig/openai/models/beta/response_create_params.rbs +56 -0
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/conversations/conversation_item.rbs +51 -3
- data/sig/openai/models/image_edit_params.rbs +63 -12
- data/sig/openai/models/image_generate_params.rbs +150 -5
- data/sig/openai/models/image_model.rbs +4 -0
- data/sig/openai/models/images_response.rbs +59 -4
- data/sig/openai/models/realtime/realtime_audio_config_input.rbs +20 -1
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +20 -1
- data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +20 -1
- data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +20 -1
- data/sig/openai/models/realtime/realtime_translation_session.rbs +22 -3
- data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +22 -3
- data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +22 -3
- data/sig/openai/models/responses/compacted_response.rbs +42 -2
- data/sig/openai/models/responses/response.rbs +40 -0
- data/sig/openai/models/responses/response_compact_params.rbs +58 -0
- data/sig/openai/models/responses/response_create_params.rbs +56 -0
- data/sig/openai/models/responses/response_input_item.rbs +51 -3
- data/sig/openai/models/responses/response_item.rbs +51 -3
- data/sig/openai/models/responses/response_output_item.rbs +51 -3
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +188 -15
- data/sig/openai/models/responses/responses_client_event.rbs +56 -0
- data/sig/openai/models/responses/tool.rbs +188 -15
- data/sig/openai/models/responses_model.rbs +2 -0
- data/sig/openai/resources/admin/organization/projects.rbs +2 -2
- data/sig/openai/resources/admin/organization.rbs +2 -2
- data/sig/openai/resources/beta/responses.rbs +3 -0
- data/sig/openai/resources/images.rbs +14 -0
- data/sig/openai/resources/responses.rbs +4 -0
- metadata +1 -1
|
@@ -20,6 +20,9 @@ module OpenAI
|
|
|
20
20
|
# @return [OpenAI::Resources::Admin::Organization::Projects::ModelPermissions]
|
|
21
21
|
attr_reader :model_permissions
|
|
22
22
|
|
|
23
|
+
# @return [OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings]
|
|
24
|
+
attr_reader :service_tier_settings
|
|
25
|
+
|
|
23
26
|
# @return [OpenAI::Resources::Admin::Organization::Projects::HostedToolPermissions]
|
|
24
27
|
attr_reader :hosted_tool_permissions
|
|
25
28
|
|
|
@@ -41,9 +44,6 @@ module OpenAI
|
|
|
41
44
|
# @return [OpenAI::Resources::Admin::Organization::Projects::Certificates]
|
|
42
45
|
attr_reader :certificates
|
|
43
46
|
|
|
44
|
-
# @return [OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings]
|
|
45
|
-
attr_reader :service_tier_settings
|
|
46
|
-
|
|
47
47
|
# Create a new project in the organization. Projects can be created and archived,
|
|
48
48
|
# but cannot be deleted.
|
|
49
49
|
#
|
|
@@ -212,6 +212,9 @@ module OpenAI
|
|
|
212
212
|
@api_keys = OpenAI::Resources::Admin::Organization::Projects::APIKeys.new(client: client)
|
|
213
213
|
@rate_limits = OpenAI::Resources::Admin::Organization::Projects::RateLimits.new(client: client)
|
|
214
214
|
@model_permissions = OpenAI::Resources::Admin::Organization::Projects::ModelPermissions.new(client: client)
|
|
215
|
+
@service_tier_settings = OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings.new(
|
|
216
|
+
client: client
|
|
217
|
+
)
|
|
215
218
|
@hosted_tool_permissions = OpenAI::Resources::Admin::Organization::Projects::HostedToolPermissions.new(
|
|
216
219
|
client: client
|
|
217
220
|
)
|
|
@@ -221,9 +224,6 @@ module OpenAI
|
|
|
221
224
|
@spend_limit = OpenAI::Resources::Admin::Organization::Projects::SpendLimit.new(client: client)
|
|
222
225
|
@spend_alerts = OpenAI::Resources::Admin::Organization::Projects::SpendAlerts.new(client: client)
|
|
223
226
|
@certificates = OpenAI::Resources::Admin::Organization::Projects::Certificates.new(client: client)
|
|
224
|
-
@service_tier_settings = OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings.new(
|
|
225
|
-
client: client
|
|
226
|
-
)
|
|
227
227
|
end
|
|
228
228
|
end
|
|
229
229
|
end
|
|
@@ -32,6 +32,9 @@ module OpenAI
|
|
|
32
32
|
# @return [OpenAI::Resources::Admin::Organization::ExternalKeys]
|
|
33
33
|
attr_reader :external_keys
|
|
34
34
|
|
|
35
|
+
# @return [OpenAI::Resources::Admin::Organization::WorkloadIdentityProviders]
|
|
36
|
+
attr_reader :workload_identity_providers
|
|
37
|
+
|
|
35
38
|
# @return [OpenAI::Resources::Admin::Organization::ExternalStorage]
|
|
36
39
|
attr_reader :external_storage
|
|
37
40
|
|
|
@@ -47,9 +50,6 @@ module OpenAI
|
|
|
47
50
|
# @return [OpenAI::Resources::Admin::Organization::Projects]
|
|
48
51
|
attr_reader :projects
|
|
49
52
|
|
|
50
|
-
# @return [OpenAI::Resources::Admin::Organization::WorkloadIdentityProviders]
|
|
51
|
-
attr_reader :workload_identity_providers
|
|
52
|
-
|
|
53
53
|
# @api private
|
|
54
54
|
#
|
|
55
55
|
# @param client [OpenAI::Client]
|
|
@@ -64,14 +64,14 @@ module OpenAI
|
|
|
64
64
|
@roles = OpenAI::Resources::Admin::Organization::Roles.new(client: client)
|
|
65
65
|
@data_retention = OpenAI::Resources::Admin::Organization::DataRetention.new(client: client)
|
|
66
66
|
@external_keys = OpenAI::Resources::Admin::Organization::ExternalKeys.new(client: client)
|
|
67
|
+
@workload_identity_providers = OpenAI::Resources::Admin::Organization::WorkloadIdentityProviders.new(
|
|
68
|
+
client: client
|
|
69
|
+
)
|
|
67
70
|
@external_storage = OpenAI::Resources::Admin::Organization::ExternalStorage.new(client: client)
|
|
68
71
|
@spend_limit = OpenAI::Resources::Admin::Organization::SpendLimit.new(client: client)
|
|
69
72
|
@spend_alerts = OpenAI::Resources::Admin::Organization::SpendAlerts.new(client: client)
|
|
70
73
|
@certificates = OpenAI::Resources::Admin::Organization::Certificates.new(client: client)
|
|
71
74
|
@projects = OpenAI::Resources::Admin::Organization::Projects.new(client: client)
|
|
72
|
-
@workload_identity_providers = OpenAI::Resources::Admin::Organization::WorkloadIdentityProviders.new(
|
|
73
|
-
client: client
|
|
74
|
-
)
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
end
|
|
@@ -46,7 +46,7 @@ module OpenAI
|
|
|
46
46
|
# [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
47
47
|
# to use your own data as input for the model's response.
|
|
48
48
|
#
|
|
49
|
-
# @overload create(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
|
|
49
|
+
# @overload create(access_programs: nil, background: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
|
|
50
50
|
#
|
|
51
51
|
# @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms]
|
|
52
52
|
# Body param: Domain-specific access programs to use for this request.
|
|
@@ -64,6 +64,9 @@ module OpenAI
|
|
|
64
64
|
# items and output items from this response are automatically added to this
|
|
65
65
|
# conversation after this response completes.
|
|
66
66
|
#
|
|
67
|
+
# @param image [OpenAI::Models::Beta::ResponseCreateParams::Image]
|
|
68
|
+
# Body param: Request level image options.
|
|
69
|
+
#
|
|
67
70
|
# @param include [Array<Symbol, OpenAI::Models::Beta::BetaResponseIncludable>, nil]
|
|
68
71
|
# Body param: Specify additional output data to include in the model response.
|
|
69
72
|
# Currently supported values are:
|
|
@@ -347,7 +350,7 @@ module OpenAI
|
|
|
347
350
|
# [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
348
351
|
# to use your own data as input for the model's response.
|
|
349
352
|
#
|
|
350
|
-
# @overload stream_raw(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
|
|
353
|
+
# @overload stream_raw(access_programs: nil, background: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, multi_agent: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, betas: nil, request_options: {})
|
|
351
354
|
#
|
|
352
355
|
# @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms]
|
|
353
356
|
# Body param: Domain-specific access programs to use for this request.
|
|
@@ -365,6 +368,9 @@ module OpenAI
|
|
|
365
368
|
# items and output items from this response are automatically added to this
|
|
366
369
|
# conversation after this response completes.
|
|
367
370
|
#
|
|
371
|
+
# @param image [OpenAI::Models::Beta::ResponseCreateParams::Image]
|
|
372
|
+
# Body param: Request level image options.
|
|
373
|
+
#
|
|
368
374
|
# @param include [Array<Symbol, OpenAI::Models::Beta::BetaResponseIncludable>, nil]
|
|
369
375
|
# Body param: Specify additional output data to include in the model response.
|
|
370
376
|
# Currently supported values are:
|
|
@@ -820,7 +826,7 @@ module OpenAI
|
|
|
820
826
|
# For ZDR-compatible compaction details, see
|
|
821
827
|
# [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).
|
|
822
828
|
#
|
|
823
|
-
# @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, betas: nil, request_options: {})
|
|
829
|
+
# @overload compact(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, betas: nil, request_options: {})
|
|
824
830
|
#
|
|
825
831
|
# @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil]
|
|
826
832
|
# Body param: Model ID used to generate the response, like `gpt-6-astra`. OpenAI
|
|
@@ -829,6 +835,9 @@ module OpenAI
|
|
|
829
835
|
# [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
830
836
|
# compare available models.
|
|
831
837
|
#
|
|
838
|
+
# @param image [OpenAI::Models::Beta::ResponseCompactParams::Image]
|
|
839
|
+
# Body param: Request level image options.
|
|
840
|
+
#
|
|
832
841
|
# @param input [String, Array<OpenAI::Models::Beta::BetaEasyInputMessage, OpenAI::Models::Beta::BetaResponseInputItem::Message, OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseInputItem::ComputerCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseInputItem::FunctionCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseInputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::ToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItemParam, OpenAI::Models::Beta::BetaResponseInputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseConfigurationUpdateItemParam, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseCompactionItemParam, OpenAI::Models::Beta::BetaResponseInputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseInputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::ShellCall, OpenAI::Models::Beta::BetaResponseInputItem::ShellCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCall, OpenAI::Models::Beta::BetaResponseInputItem::ApplyPatchCallOutput, OpenAI::Models::Beta::BetaResponseInputItem::McpListTools, OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseInputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseInputItem::McpCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutput, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseInputItem::CompactionTrigger, OpenAI::Models::Beta::BetaResponseInputItem::ItemReference, OpenAI::Models::Beta::BetaResponseInputItem::Program, OpenAI::Models::Beta::BetaResponseInputItem::ProgramOutput>, nil]
|
|
833
842
|
# Body param: Text, image, or file inputs to the model, used to generate a
|
|
834
843
|
# response
|
|
@@ -72,7 +72,7 @@ module OpenAI
|
|
|
72
72
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
73
73
|
# content type.
|
|
74
74
|
#
|
|
75
|
-
# @overload edit(image:, prompt:, background: nil, input_fidelity: nil, markup: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, user: nil, request_options: {})
|
|
75
|
+
# @overload edit(image:, prompt:, background: nil, complexity: nil, frame_count: nil, frame_duration_ms: nil, input_fidelity: nil, markup: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, user: nil, request_options: {})
|
|
76
76
|
#
|
|
77
77
|
# @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array<Pathname, StringIO, IO, String, OpenAI::FilePart>]
|
|
78
78
|
# The image(s) to edit. Must be a supported image file or an array of images.
|
|
@@ -103,6 +103,23 @@ module OpenAI
|
|
|
103
103
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
104
104
|
# set the output format to `png` or `webp`.
|
|
105
105
|
#
|
|
106
|
+
# @param complexity [Symbol, OpenAI::Models::ImageEditParams::Complexity, nil]
|
|
107
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
108
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
109
|
+
# reference image, independently of the SVG author's reasoning.
|
|
110
|
+
#
|
|
111
|
+
# @param frame_count [Integer, nil]
|
|
112
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
113
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
114
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
115
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
116
|
+
# to the GIF preview for the selected model.
|
|
117
|
+
#
|
|
118
|
+
# @param frame_duration_ms [Integer, nil]
|
|
119
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
120
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
121
|
+
# per frame. Only supported with output_format=gif.
|
|
122
|
+
#
|
|
106
123
|
# @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil]
|
|
107
124
|
# Control how much effort the model will exert to match the style and features,
|
|
108
125
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -112,7 +129,7 @@ module OpenAI
|
|
|
112
129
|
# @param markup [Pathname, StringIO, IO, String, OpenAI::FilePart]
|
|
113
130
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
114
131
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
115
|
-
# GPT Image 2.5
|
|
132
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
116
133
|
#
|
|
117
134
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
118
135
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -132,8 +149,8 @@ module OpenAI
|
|
|
132
149
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
133
150
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
134
151
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
135
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
136
|
-
# `chatgpt-image-latest`).
|
|
152
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
153
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
137
154
|
#
|
|
138
155
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
139
156
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -148,8 +165,7 @@ module OpenAI
|
|
|
148
165
|
#
|
|
149
166
|
# @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil]
|
|
150
167
|
# The format in which the generated images are returned. This parameter is only
|
|
151
|
-
# supported for the GPT image models.
|
|
152
|
-
# default value is `png`.
|
|
168
|
+
# supported for the GPT image models. The default value is `png`.
|
|
153
169
|
#
|
|
154
170
|
# @param partial_images [Integer, nil]
|
|
155
171
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -229,7 +245,7 @@ module OpenAI
|
|
|
229
245
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
230
246
|
# content type.
|
|
231
247
|
#
|
|
232
|
-
# @overload edit_stream_raw(image:, prompt:, background: nil, input_fidelity: nil, markup: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, user: nil, request_options: {})
|
|
248
|
+
# @overload edit_stream_raw(image:, prompt:, background: nil, complexity: nil, frame_count: nil, frame_duration_ms: nil, input_fidelity: nil, markup: nil, mask: nil, model: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, user: nil, request_options: {})
|
|
233
249
|
#
|
|
234
250
|
# @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array<Pathname, StringIO, IO, String, OpenAI::FilePart>]
|
|
235
251
|
# The image(s) to edit. Must be a supported image file or an array of images.
|
|
@@ -260,6 +276,23 @@ module OpenAI
|
|
|
260
276
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
261
277
|
# set the output format to `png` or `webp`.
|
|
262
278
|
#
|
|
279
|
+
# @param complexity [Symbol, OpenAI::Models::ImageEditParams::Complexity, nil]
|
|
280
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
281
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
282
|
+
# reference image, independently of the SVG author's reasoning.
|
|
283
|
+
#
|
|
284
|
+
# @param frame_count [Integer, nil]
|
|
285
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
286
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
287
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
288
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
289
|
+
# to the GIF preview for the selected model.
|
|
290
|
+
#
|
|
291
|
+
# @param frame_duration_ms [Integer, nil]
|
|
292
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
293
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
294
|
+
# per frame. Only supported with output_format=gif.
|
|
295
|
+
#
|
|
263
296
|
# @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil]
|
|
264
297
|
# Control how much effort the model will exert to match the style and features,
|
|
265
298
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -269,7 +302,7 @@ module OpenAI
|
|
|
269
302
|
# @param markup [Pathname, StringIO, IO, String, OpenAI::FilePart]
|
|
270
303
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
271
304
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
272
|
-
# GPT Image 2.5
|
|
305
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
273
306
|
#
|
|
274
307
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
275
308
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -289,8 +322,8 @@ module OpenAI
|
|
|
289
322
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
290
323
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
291
324
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
292
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
293
|
-
# `chatgpt-image-latest`).
|
|
325
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
326
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
294
327
|
#
|
|
295
328
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
296
329
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -305,8 +338,7 @@ module OpenAI
|
|
|
305
338
|
#
|
|
306
339
|
# @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil]
|
|
307
340
|
# The format in which the generated images are returned. This parameter is only
|
|
308
|
-
# supported for the GPT image models.
|
|
309
|
-
# default value is `png`.
|
|
341
|
+
# supported for the GPT image models. The default value is `png`.
|
|
310
342
|
#
|
|
311
343
|
# @param partial_images [Integer, nil]
|
|
312
344
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -388,7 +420,7 @@ module OpenAI
|
|
|
388
420
|
# Creates an image given a prompt using a GPT Image model.
|
|
389
421
|
# [Learn more](https://developers.openai.com/api/docs/guides/images-vision).
|
|
390
422
|
#
|
|
391
|
-
# @overload generate(prompt:, background: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, style: nil, user: nil, request_options: {})
|
|
423
|
+
# @overload generate(prompt:, background: nil, complexity: nil, frame_count: nil, frame_duration_ms: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, style: nil, svg: nil, user: nil, request_options: {})
|
|
392
424
|
#
|
|
393
425
|
# @param prompt [String]
|
|
394
426
|
# A text description of the desired image(s). The maximum length is 32000
|
|
@@ -405,12 +437,30 @@ module OpenAI
|
|
|
405
437
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
406
438
|
# set the output format to `png` or `webp`.
|
|
407
439
|
#
|
|
440
|
+
# @param complexity [Symbol, OpenAI::Models::ImageGenerateParams::Complexity, nil]
|
|
441
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
442
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
443
|
+
# reference image, independently of the SVG author's reasoning.
|
|
444
|
+
#
|
|
445
|
+
# @param frame_count [Integer, nil]
|
|
446
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
447
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
448
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
449
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
450
|
+
# to the GIF preview for the selected model.
|
|
451
|
+
#
|
|
452
|
+
# @param frame_duration_ms [Integer, nil]
|
|
453
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
454
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
455
|
+
# per frame. Only supported with output_format=gif.
|
|
456
|
+
#
|
|
408
457
|
# @param model [String, Symbol, OpenAI::Models::ImageModel, nil]
|
|
409
458
|
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
410
459
|
# Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
411
460
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
412
461
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
413
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
462
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
463
|
+
# `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
|
|
414
464
|
#
|
|
415
465
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
416
466
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -430,7 +480,7 @@ module OpenAI
|
|
|
430
480
|
#
|
|
431
481
|
# @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil]
|
|
432
482
|
# The format in which the generated images are returned. This parameter is only
|
|
433
|
-
# supported for the GPT image models.
|
|
483
|
+
# supported for the GPT image models.
|
|
434
484
|
#
|
|
435
485
|
# @param partial_images [Integer, nil]
|
|
436
486
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -477,6 +527,14 @@ module OpenAI
|
|
|
477
527
|
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
478
528
|
# models; describe the desired style in the prompt instead.
|
|
479
529
|
#
|
|
530
|
+
# @param svg [OpenAI::Models::ImageGenerateParams::Svg, nil]
|
|
531
|
+
# Selects the model and reasoning effort used to author SVG output. Requires
|
|
532
|
+
# output_format=svg and access to SVG model selection. When model selection is
|
|
533
|
+
# enabled, supply svg.model. When model selection is disabled, omit this object.
|
|
534
|
+
# The top-level model selects the image model that creates the reference image.
|
|
535
|
+
# SVG generation requires n=1 and does not support streaming, partial images,
|
|
536
|
+
# prompt_rewriter, or output_compression. SVG edits are not supported.
|
|
537
|
+
#
|
|
480
538
|
# @param user [String]
|
|
481
539
|
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
482
540
|
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
@@ -510,7 +568,7 @@ module OpenAI
|
|
|
510
568
|
# Creates an image given a prompt using a GPT Image model.
|
|
511
569
|
# [Learn more](https://developers.openai.com/api/docs/guides/images-vision).
|
|
512
570
|
#
|
|
513
|
-
# @overload generate_stream_raw(prompt:, background: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, style: nil, user: nil, request_options: {})
|
|
571
|
+
# @overload generate_stream_raw(prompt:, background: nil, complexity: nil, frame_count: nil, frame_duration_ms: nil, model: nil, moderation: nil, n: nil, output_compression: nil, output_format: nil, partial_images: nil, quality: nil, response_format: nil, safety_identifier: nil, size: nil, style: nil, svg: nil, user: nil, request_options: {})
|
|
514
572
|
#
|
|
515
573
|
# @param prompt [String]
|
|
516
574
|
# A text description of the desired image(s). The maximum length is 32000
|
|
@@ -527,12 +585,30 @@ module OpenAI
|
|
|
527
585
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
528
586
|
# set the output format to `png` or `webp`.
|
|
529
587
|
#
|
|
588
|
+
# @param complexity [Symbol, OpenAI::Models::ImageGenerateParams::Complexity, nil]
|
|
589
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
590
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
591
|
+
# reference image, independently of the SVG author's reasoning.
|
|
592
|
+
#
|
|
593
|
+
# @param frame_count [Integer, nil]
|
|
594
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
595
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
596
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
597
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
598
|
+
# to the GIF preview for the selected model.
|
|
599
|
+
#
|
|
600
|
+
# @param frame_duration_ms [Integer, nil]
|
|
601
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
602
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
603
|
+
# per frame. Only supported with output_format=gif.
|
|
604
|
+
#
|
|
530
605
|
# @param model [String, Symbol, OpenAI::Models::ImageModel, nil]
|
|
531
606
|
# The GPT image model to use for image generation. Specify a model explicitly.
|
|
532
607
|
# Supported models include `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
533
608
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
534
609
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
535
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
610
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
611
|
+
# `gpt-image-2.6-flare`, and `chatgpt-image-latest`.
|
|
536
612
|
#
|
|
537
613
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
538
614
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -552,7 +628,7 @@ module OpenAI
|
|
|
552
628
|
#
|
|
553
629
|
# @param output_format [Symbol, OpenAI::Models::ImageGenerateParams::OutputFormat, nil]
|
|
554
630
|
# The format in which the generated images are returned. This parameter is only
|
|
555
|
-
# supported for the GPT image models.
|
|
631
|
+
# supported for the GPT image models.
|
|
556
632
|
#
|
|
557
633
|
# @param partial_images [Integer, nil]
|
|
558
634
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -599,6 +675,14 @@ module OpenAI
|
|
|
599
675
|
# Legacy style parameter for retired image models. Unsupported for GPT image
|
|
600
676
|
# models; describe the desired style in the prompt instead.
|
|
601
677
|
#
|
|
678
|
+
# @param svg [OpenAI::Models::ImageGenerateParams::Svg, nil]
|
|
679
|
+
# Selects the model and reasoning effort used to author SVG output. Requires
|
|
680
|
+
# output_format=svg and access to SVG model selection. When model selection is
|
|
681
|
+
# enabled, supply svg.model. When model selection is disabled, omit this object.
|
|
682
|
+
# The top-level model selects the image model that creates the reference image.
|
|
683
|
+
# SVG generation requires n=1 and does not support streaming, partial images,
|
|
684
|
+
# prompt_rewriter, or output_compression. SVG edits are not supported.
|
|
685
|
+
#
|
|
602
686
|
# @param user [String]
|
|
603
687
|
# Deprecated: use `safety_identifier` instead. This parameter remains accepted for
|
|
604
688
|
# backward compatibility and is used when `safety_identifier` is omitted, null, or
|
|
@@ -47,7 +47,7 @@ module OpenAI
|
|
|
47
47
|
# [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
48
48
|
# to use your own data as input for the model's response.
|
|
49
49
|
#
|
|
50
|
-
# @overload create(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {})
|
|
50
|
+
# @overload create(access_programs: nil, background: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {})
|
|
51
51
|
#
|
|
52
52
|
# @param access_programs [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms]
|
|
53
53
|
# Domain-specific access programs to use for this request.
|
|
@@ -65,6 +65,9 @@ module OpenAI
|
|
|
65
65
|
# items from this response are automatically added to this conversation after this
|
|
66
66
|
# response completes.
|
|
67
67
|
#
|
|
68
|
+
# @param image [OpenAI::Models::Responses::ResponseCreateParams::Image]
|
|
69
|
+
# Request level image options.
|
|
70
|
+
#
|
|
68
71
|
# @param include [Array<Symbol, OpenAI::Models::Responses::ResponseIncludable>, nil]
|
|
69
72
|
# Specify additional output data to include in the model response. Currently
|
|
70
73
|
# supported values are:
|
|
@@ -340,7 +343,7 @@ module OpenAI
|
|
|
340
343
|
# [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
341
344
|
# to use your own data as input for the model's response.
|
|
342
345
|
#
|
|
343
|
-
# @overload stream_raw(access_programs: nil, background: nil, context_management: nil, conversation: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {})
|
|
346
|
+
# @overload stream_raw(access_programs: nil, background: nil, context_management: nil, conversation: nil, image: nil, include: nil, input: nil, instructions: nil, max_output_tokens: nil, max_tool_calls: nil, metadata: nil, model: nil, moderation: nil, parallel_tool_calls: nil, previous_response_id: nil, prompt: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, store: nil, stream_options: nil, temperature: nil, text: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, truncation: nil, user: nil, request_options: {})
|
|
344
347
|
#
|
|
345
348
|
# @param access_programs [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms]
|
|
346
349
|
# Domain-specific access programs to use for this request.
|
|
@@ -358,6 +361,9 @@ module OpenAI
|
|
|
358
361
|
# items from this response are automatically added to this conversation after this
|
|
359
362
|
# response completes.
|
|
360
363
|
#
|
|
364
|
+
# @param image [OpenAI::Models::Responses::ResponseCreateParams::Image]
|
|
365
|
+
# Request level image options.
|
|
366
|
+
#
|
|
361
367
|
# @param include [Array<Symbol, OpenAI::Models::Responses::ResponseIncludable>, nil]
|
|
362
368
|
# Specify additional output data to include in the model response. Currently
|
|
363
369
|
# supported values are:
|
|
@@ -785,7 +791,7 @@ module OpenAI
|
|
|
785
791
|
# For ZDR-compatible compaction details, see
|
|
786
792
|
# [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).
|
|
787
793
|
#
|
|
788
|
-
# @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, request_options: {})
|
|
794
|
+
# @overload compact(model:, image: nil, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, service_tier: nil, request_options: {})
|
|
789
795
|
#
|
|
790
796
|
# @param model [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil]
|
|
791
797
|
# Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
@@ -794,6 +800,9 @@ module OpenAI
|
|
|
794
800
|
# [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
795
801
|
# compare available models.
|
|
796
802
|
#
|
|
803
|
+
# @param image [OpenAI::Models::Responses::ResponseCompactParams::Image]
|
|
804
|
+
# Request level image options.
|
|
805
|
+
#
|
|
797
806
|
# @param input [String, Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseInputItem::ToolSearchCall, OpenAI::Models::Responses::ResponseToolSearchOutputItemParam, OpenAI::Models::Responses::ResponseInputItem::AdditionalTools, OpenAI::Models::Responses::ResponseConfigurationUpdateItemParam, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseCompactionItemParam, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::ShellCall, OpenAI::Models::Responses::ResponseInputItem::ShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCall, OpenAI::Models::Responses::ResponseInputItem::ApplyPatchCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::CompactionTrigger, OpenAI::Models::Responses::ResponseInputItem::ItemReference, OpenAI::Models::Responses::ResponseInputItem::Program, OpenAI::Models::Responses::ResponseInputItem::ProgramOutput>, nil]
|
|
798
807
|
# Text, image, or file inputs to the model, used to generate a response
|
|
799
808
|
#
|
data/lib/openai/version.rb
CHANGED
|
@@ -52,6 +52,7 @@ module OpenAI
|
|
|
52
52
|
GPT_DAYBREAK_RED_LATEST = T.let(:"gpt-daybreak-red-latest", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
53
53
|
GPT_5_6_CYBER = T.let(:"gpt-5.6-cyber", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
54
54
|
GPT_ROSALIND_RESEARCH = T.let(:"gpt-rosalind-research", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
55
|
+
GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
55
56
|
|
|
56
57
|
sig { override.returns(T::Array[OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol]) }
|
|
57
58
|
def self.values
|
|
@@ -41,6 +41,12 @@ module OpenAI
|
|
|
41
41
|
sig { params(usage: OpenAI::Beta::BetaResponseUsage::OrHash).void }
|
|
42
42
|
attr_writer :usage
|
|
43
43
|
|
|
44
|
+
sig { returns(T.nilable(OpenAI::Beta::BetaCompactedResponse::Image)) }
|
|
45
|
+
attr_reader :image
|
|
46
|
+
|
|
47
|
+
sig { params(image: OpenAI::Beta::BetaCompactedResponse::Image::OrHash).void }
|
|
48
|
+
attr_writer :image
|
|
49
|
+
|
|
44
50
|
sig do
|
|
45
51
|
params(
|
|
46
52
|
|
|
@@ -86,6 +92,8 @@ module OpenAI
|
|
|
86
92
|
|
|
87
93
|
usage: OpenAI::Beta::BetaResponseUsage::OrHash,
|
|
88
94
|
|
|
95
|
+
image: OpenAI::Beta::BetaCompactedResponse::Image::OrHash,
|
|
96
|
+
|
|
89
97
|
object: Symbol
|
|
90
98
|
)
|
|
91
99
|
.returns(T.attached_class)
|
|
@@ -106,6 +114,8 @@ module OpenAI
|
|
|
106
114
|
# tokens.
|
|
107
115
|
usage:,
|
|
108
116
|
|
|
117
|
+
image: nil,
|
|
118
|
+
|
|
109
119
|
# The object type. Always `response.compaction`.
|
|
110
120
|
|
|
111
121
|
object: :"response.compaction"
|
|
@@ -119,13 +129,69 @@ module OpenAI
|
|
|
119
129
|
created_at: Integer,
|
|
120
130
|
object: Symbol,
|
|
121
131
|
output: T::Array[OpenAI::Beta::BetaResponseOutputItem::Variants],
|
|
122
|
-
usage: OpenAI::Beta::BetaResponseUsage
|
|
132
|
+
usage: OpenAI::Beta::BetaResponseUsage,
|
|
133
|
+
image: OpenAI::Beta::BetaCompactedResponse::Image
|
|
123
134
|
}
|
|
124
135
|
)
|
|
125
136
|
end
|
|
126
137
|
def to_hash
|
|
127
138
|
end
|
|
128
139
|
|
|
140
|
+
class Image < OpenAI::Internal::Type::BaseModel
|
|
141
|
+
OrHash = T.type_alias do
|
|
142
|
+
T.any(
|
|
143
|
+
OpenAI::Beta::BetaCompactedResponse::Image,
|
|
144
|
+
OpenAI::Internal::AnyHash
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Effective image context optimization policy.
|
|
149
|
+
sig { returns(OpenAI::Beta::BetaCompactedResponse::Image::ContextCompression::TaggedSymbol) }
|
|
150
|
+
attr_accessor :context_compression
|
|
151
|
+
|
|
152
|
+
sig do
|
|
153
|
+
params(
|
|
154
|
+
|
|
155
|
+
context_compression: OpenAI::Beta::BetaCompactedResponse::Image::ContextCompression::OrSymbol
|
|
156
|
+
)
|
|
157
|
+
.returns(T.attached_class)
|
|
158
|
+
end
|
|
159
|
+
def self.new(
|
|
160
|
+
|
|
161
|
+
# Effective image context optimization policy.
|
|
162
|
+
|
|
163
|
+
context_compression:
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
sig do
|
|
168
|
+
override.returns(
|
|
169
|
+
{context_compression: OpenAI::Beta::BetaCompactedResponse::Image::ContextCompression::TaggedSymbol}
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
def to_hash
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Effective image context optimization policy.
|
|
176
|
+
module ContextCompression
|
|
177
|
+
extend OpenAI::Internal::Type::Enum
|
|
178
|
+
|
|
179
|
+
TaggedSymbol = T.type_alias {
|
|
180
|
+
T.all(Symbol, OpenAI::Beta::BetaCompactedResponse::Image::ContextCompression)
|
|
181
|
+
}
|
|
182
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
183
|
+
|
|
184
|
+
ENABLED = T.let(:enabled, OpenAI::Beta::BetaCompactedResponse::Image::ContextCompression::TaggedSymbol)
|
|
185
|
+
DISABLED = T.let(:disabled, OpenAI::Beta::BetaCompactedResponse::Image::ContextCompression::TaggedSymbol)
|
|
186
|
+
|
|
187
|
+
sig {
|
|
188
|
+
override.returns(T::Array[OpenAI::Beta::BetaCompactedResponse::Image::ContextCompression::TaggedSymbol])
|
|
189
|
+
}
|
|
190
|
+
def self.values
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
129
195
|
end
|
|
130
196
|
|
|
131
197
|
end
|