openai 0.118.0 → 0.120.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/client.rb +1 -1
- data/lib/openai/helpers/data_residency.rb +4 -1
- data/lib/openai/models/all_models.rb +2 -0
- data/lib/openai/models/beta/beta_compacted_response.rb +34 -1
- data/lib/openai/models/beta/beta_response.rb +37 -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 +51 -1
- data/lib/openai/models/beta/beta_tool.rb +164 -13
- data/lib/openai/models/beta/response_compact_params.rb +47 -1
- data/lib/openai/models/beta/response_create_params.rb +47 -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 +53 -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 +2 -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 +2 -0
- data/rbi/openai/models/beta/beta_compacted_response.rbi +67 -1
- data/rbi/openai/models/beta/beta_response.rbi +63 -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 +109 -0
- data/rbi/openai/models/beta/beta_tool.rbi +245 -13
- data/rbi/openai/models/beta/response_compact_params.rbi +82 -0
- data/rbi/openai/models/beta/response_create_params.rbi +82 -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 +89 -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 +2 -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 +4 -0
- data/sig/openai/models/beta/beta_compacted_response.rbs +42 -2
- data/sig/openai/models/beta/beta_response.rbs +42 -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 +58 -0
- data/sig/openai/models/beta/beta_tool.rbs +188 -15
- data/sig/openai/models/beta/response_compact_params.rbs +58 -0
- data/sig/openai/models/beta/response_create_params.rbs +58 -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 +60 -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 +4 -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
|
@@ -18,6 +18,12 @@ module OpenAI
|
|
|
18
18
|
# @return [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil]
|
|
19
19
|
required :model, union: -> { OpenAI::Beta::ResponseCompactParams::Model }, nil?: true
|
|
20
20
|
|
|
21
|
+
# @!attribute image
|
|
22
|
+
# Request level image options.
|
|
23
|
+
#
|
|
24
|
+
# @return [OpenAI::Models::Beta::ResponseCompactParams::Image, nil]
|
|
25
|
+
optional :image, -> { OpenAI::Beta::ResponseCompactParams::Image }
|
|
26
|
+
|
|
21
27
|
# @!attribute input
|
|
22
28
|
# Text, image, or file inputs to the model, used to generate a response
|
|
23
29
|
#
|
|
@@ -106,7 +112,7 @@ module OpenAI
|
|
|
106
112
|
# @return [Array<Symbol, OpenAI::Models::Beta::ResponseCompactParams::Beta>, nil]
|
|
107
113
|
optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCompactParams::Beta] }
|
|
108
114
|
|
|
109
|
-
# @!method initialize(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: {})
|
|
115
|
+
# @!method initialize(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: {})
|
|
110
116
|
# @param model [Symbol, String, OpenAI::Models::Beta::ResponseCompactParams::Model, nil]
|
|
111
117
|
# Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
112
118
|
# range of models with different capabilities, performance characteristics, and
|
|
@@ -114,6 +120,9 @@ module OpenAI
|
|
|
114
120
|
# [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
115
121
|
# compare available models.
|
|
116
122
|
#
|
|
123
|
+
# @param image [OpenAI::Models::Beta::ResponseCompactParams::Image]
|
|
124
|
+
# Request level image options.
|
|
125
|
+
#
|
|
117
126
|
# @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]
|
|
118
127
|
# Text, image, or file inputs to the model, used to generate a response
|
|
119
128
|
#
|
|
@@ -398,6 +407,8 @@ module OpenAI
|
|
|
398
407
|
|
|
399
408
|
variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_5_6_CYBER }
|
|
400
409
|
|
|
410
|
+
variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_6_CYBER }
|
|
411
|
+
|
|
401
412
|
variant const: -> { OpenAI::Models::Beta::ResponseCompactParams::Model::GPT_ROSALIND_RESEARCH }
|
|
402
413
|
|
|
403
414
|
variant String
|
|
@@ -779,11 +790,46 @@ module OpenAI
|
|
|
779
790
|
GPT_DAYBREAK_BLUE_LATEST = :"gpt-daybreak-blue-latest"
|
|
780
791
|
GPT_DAYBREAK_RED_LATEST = :"gpt-daybreak-red-latest"
|
|
781
792
|
GPT_5_6_CYBER = :"gpt-5.6-cyber"
|
|
793
|
+
GPT_6_CYBER = :"gpt-6-cyber"
|
|
782
794
|
GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
|
|
783
795
|
|
|
784
796
|
# @!endgroup
|
|
785
797
|
end
|
|
786
798
|
|
|
799
|
+
class Image < OpenAI::Internal::Type::BaseModel
|
|
800
|
+
# @!attribute context_compression
|
|
801
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
802
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
803
|
+
# support or `disabled` to turn it off.
|
|
804
|
+
#
|
|
805
|
+
# @return [Symbol, OpenAI::Models::Beta::ResponseCompactParams::Image::ContextCompression, nil]
|
|
806
|
+
optional :context_compression, enum: -> { OpenAI::Beta::ResponseCompactParams::Image::ContextCompression }
|
|
807
|
+
|
|
808
|
+
# @!method initialize(context_compression: nil)
|
|
809
|
+
# Request level image options.
|
|
810
|
+
#
|
|
811
|
+
# @param context_compression [Symbol, OpenAI::Models::Beta::ResponseCompactParams::Image::ContextCompression]
|
|
812
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
813
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
814
|
+
# support or `disabled` to turn it off.
|
|
815
|
+
|
|
816
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
817
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
818
|
+
# support or `disabled` to turn it off.
|
|
819
|
+
#
|
|
820
|
+
# @see OpenAI::Models::Beta::ResponseCompactParams::Image#context_compression
|
|
821
|
+
module ContextCompression
|
|
822
|
+
extend OpenAI::Internal::Type::Enum
|
|
823
|
+
|
|
824
|
+
AUTO = :auto
|
|
825
|
+
ENABLED = :enabled
|
|
826
|
+
DISABLED = :disabled
|
|
827
|
+
|
|
828
|
+
# @!method self.values
|
|
829
|
+
# @return [Array<Symbol>]
|
|
830
|
+
end
|
|
831
|
+
end
|
|
832
|
+
|
|
787
833
|
# Text, image, or file inputs to the model, used to generate a response
|
|
788
834
|
module Input
|
|
789
835
|
extend OpenAI::Internal::Type::Union
|
|
@@ -44,6 +44,12 @@ module OpenAI
|
|
|
44
44
|
# @return [String, OpenAI::Models::Beta::BetaResponseConversationParam, nil]
|
|
45
45
|
optional :conversation, union: -> { OpenAI::Beta::ResponseCreateParams::Conversation }, nil?: true
|
|
46
46
|
|
|
47
|
+
# @!attribute image
|
|
48
|
+
# Request level image options.
|
|
49
|
+
#
|
|
50
|
+
# @return [OpenAI::Models::Beta::ResponseCreateParams::Image, nil]
|
|
51
|
+
optional :image, -> { OpenAI::Beta::ResponseCreateParams::Image }
|
|
52
|
+
|
|
47
53
|
# @!attribute include
|
|
48
54
|
# Specify additional output data to include in the model response. Currently
|
|
49
55
|
# supported values are:
|
|
@@ -382,7 +388,7 @@ module OpenAI
|
|
|
382
388
|
# @return [Array<Symbol, OpenAI::Models::Beta::ResponseCreateParams::Beta>, nil]
|
|
383
389
|
optional :betas, -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Beta::ResponseCreateParams::Beta] }
|
|
384
390
|
|
|
385
|
-
# @!method initialize(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: {})
|
|
391
|
+
# @!method initialize(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: {})
|
|
386
392
|
# @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms]
|
|
387
393
|
# Domain-specific access programs to use for this request.
|
|
388
394
|
#
|
|
@@ -399,6 +405,9 @@ module OpenAI
|
|
|
399
405
|
# items from this response are automatically added to this conversation after this
|
|
400
406
|
# response completes.
|
|
401
407
|
#
|
|
408
|
+
# @param image [OpenAI::Models::Beta::ResponseCreateParams::Image]
|
|
409
|
+
# Request level image options.
|
|
410
|
+
#
|
|
402
411
|
# @param include [Array<Symbol, OpenAI::Models::Beta::BetaResponseIncludable>, nil]
|
|
403
412
|
# Specify additional output data to include in the model response. Currently
|
|
404
413
|
# supported values are:
|
|
@@ -731,6 +740,40 @@ module OpenAI
|
|
|
731
740
|
# @return [Array(String, OpenAI::Models::Beta::BetaResponseConversationParam)]
|
|
732
741
|
end
|
|
733
742
|
|
|
743
|
+
class Image < OpenAI::Internal::Type::BaseModel
|
|
744
|
+
# @!attribute context_compression
|
|
745
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
746
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
747
|
+
# support or `disabled` to turn it off.
|
|
748
|
+
#
|
|
749
|
+
# @return [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Image::ContextCompression, nil]
|
|
750
|
+
optional :context_compression, enum: -> { OpenAI::Beta::ResponseCreateParams::Image::ContextCompression }
|
|
751
|
+
|
|
752
|
+
# @!method initialize(context_compression: nil)
|
|
753
|
+
# Request level image options.
|
|
754
|
+
#
|
|
755
|
+
# @param context_compression [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Image::ContextCompression]
|
|
756
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
757
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
758
|
+
# support or `disabled` to turn it off.
|
|
759
|
+
|
|
760
|
+
# Controls image context optimization. Defaults to `auto`, which uses the model,
|
|
761
|
+
# transport, and input to select a policy. Use `enabled` to require compression
|
|
762
|
+
# support or `disabled` to turn it off.
|
|
763
|
+
#
|
|
764
|
+
# @see OpenAI::Models::Beta::ResponseCreateParams::Image#context_compression
|
|
765
|
+
module ContextCompression
|
|
766
|
+
extend OpenAI::Internal::Type::Enum
|
|
767
|
+
|
|
768
|
+
AUTO = :auto
|
|
769
|
+
ENABLED = :enabled
|
|
770
|
+
DISABLED = :disabled
|
|
771
|
+
|
|
772
|
+
# @!method self.values
|
|
773
|
+
# @return [Array<Symbol>]
|
|
774
|
+
end
|
|
775
|
+
end
|
|
776
|
+
|
|
734
777
|
# Text, image, or file inputs to the model, used to generate a response.
|
|
735
778
|
#
|
|
736
779
|
# Learn more:
|
|
@@ -983,6 +1026,8 @@ module OpenAI
|
|
|
983
1026
|
|
|
984
1027
|
variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_5_6_CYBER }
|
|
985
1028
|
|
|
1029
|
+
variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_6_CYBER }
|
|
1030
|
+
|
|
986
1031
|
variant const: -> { OpenAI::Models::Beta::ResponseCreateParams::Model::GPT_ROSALIND_RESEARCH }
|
|
987
1032
|
|
|
988
1033
|
variant String
|
|
@@ -1364,6 +1409,7 @@ module OpenAI
|
|
|
1364
1409
|
GPT_DAYBREAK_BLUE_LATEST = :"gpt-daybreak-blue-latest"
|
|
1365
1410
|
GPT_DAYBREAK_RED_LATEST = :"gpt-daybreak-red-latest"
|
|
1366
1411
|
GPT_5_6_CYBER = :"gpt-5.6-cyber"
|
|
1412
|
+
GPT_6_CYBER = :"gpt-6-cyber"
|
|
1367
1413
|
GPT_ROSALIND_RESEARCH = :"gpt-rosalind-research"
|
|
1368
1414
|
|
|
1369
1415
|
# @!endgroup
|
|
@@ -34,6 +34,9 @@ module OpenAI
|
|
|
34
34
|
# The request exceeds the model's context window.
|
|
35
35
|
CONTEXT_LENGTH_EXCEEDED = :context_length_exceeded
|
|
36
36
|
|
|
37
|
+
# The model reached its output token limit before finishing the response.
|
|
38
|
+
MAX_OUTPUT_TOKENS = :max_output_tokens
|
|
39
|
+
|
|
37
40
|
# The session has reached its usage budget.
|
|
38
41
|
SESSION_BUDGET_EXCEEDED = :session_budget_exceeded
|
|
39
42
|
|
|
@@ -189,7 +189,12 @@ module OpenAI
|
|
|
189
189
|
nil?: true
|
|
190
190
|
)
|
|
191
191
|
|
|
192
|
-
# @!
|
|
192
|
+
# @!attribute svg_usage
|
|
193
|
+
#
|
|
194
|
+
# @return [OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::SvgUsage, nil]
|
|
195
|
+
optional :svg_usage, -> { OpenAI::Conversations::ConversationItem::ImageGenerationCall::SvgUsage }
|
|
196
|
+
|
|
197
|
+
# @!method initialize(id:, result:, status:, action: nil, background: nil, error: nil, output_format: nil, quality: nil, revised_prompt: nil, size: nil, svg_usage: nil, type: :image_generation_call)
|
|
193
198
|
# An image generation request made by the model.
|
|
194
199
|
#
|
|
195
200
|
# @param id [String]
|
|
@@ -223,6 +228,8 @@ module OpenAI
|
|
|
223
228
|
# @param size [String, Symbol, OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::Size, nil]
|
|
224
229
|
# The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
225
230
|
#
|
|
231
|
+
# @param svg_usage [OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall::SvgUsage]
|
|
232
|
+
#
|
|
226
233
|
# @param type [Symbol, :image_generation_call]
|
|
227
234
|
# The type of the image generation call. Always `image_generation_call`.
|
|
228
235
|
|
|
@@ -375,6 +382,8 @@ module OpenAI
|
|
|
375
382
|
PNG = :png
|
|
376
383
|
WEBP = :webp
|
|
377
384
|
JPEG = :jpeg
|
|
385
|
+
GIF = :gif
|
|
386
|
+
SVG = :svg
|
|
378
387
|
|
|
379
388
|
# @!method self.values
|
|
380
389
|
# @return [Array<Symbol>]
|
|
@@ -435,6 +444,41 @@ module OpenAI
|
|
|
435
444
|
|
|
436
445
|
# @!endgroup
|
|
437
446
|
end
|
|
447
|
+
|
|
448
|
+
# @see OpenAI::Models::Conversations::ConversationItem::ImageGenerationCall#svg_usage
|
|
449
|
+
class SvgUsage < OpenAI::Internal::Type::BaseModel
|
|
450
|
+
# @!attribute input_tokens
|
|
451
|
+
#
|
|
452
|
+
# @return [Integer]
|
|
453
|
+
required :input_tokens, Integer
|
|
454
|
+
|
|
455
|
+
# @!attribute model
|
|
456
|
+
#
|
|
457
|
+
# @return [String]
|
|
458
|
+
required :model, String
|
|
459
|
+
|
|
460
|
+
# @!attribute output_tokens
|
|
461
|
+
#
|
|
462
|
+
# @return [Integer]
|
|
463
|
+
required :output_tokens, Integer
|
|
464
|
+
|
|
465
|
+
# @!attribute reasoning_tokens
|
|
466
|
+
#
|
|
467
|
+
# @return [Integer]
|
|
468
|
+
required :reasoning_tokens, Integer
|
|
469
|
+
|
|
470
|
+
# @!attribute total_tokens
|
|
471
|
+
#
|
|
472
|
+
# @return [Integer]
|
|
473
|
+
required :total_tokens, Integer
|
|
474
|
+
|
|
475
|
+
# @!method initialize(input_tokens:, model:, output_tokens:, reasoning_tokens:, total_tokens:)
|
|
476
|
+
# @param input_tokens [Integer]
|
|
477
|
+
# @param model [String]
|
|
478
|
+
# @param output_tokens [Integer]
|
|
479
|
+
# @param reasoning_tokens [Integer]
|
|
480
|
+
# @param total_tokens [Integer]
|
|
481
|
+
end
|
|
438
482
|
end
|
|
439
483
|
|
|
440
484
|
class AdditionalTools < OpenAI::Internal::Type::BaseModel
|
|
@@ -47,6 +47,32 @@ module OpenAI
|
|
|
47
47
|
# @return [Symbol, OpenAI::Models::ImageEditParams::Background, nil]
|
|
48
48
|
optional :background, enum: -> { OpenAI::ImageEditParams::Background }, nil?: true
|
|
49
49
|
|
|
50
|
+
# @!attribute complexity
|
|
51
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
52
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
53
|
+
# reference image, independently of the SVG author's reasoning.
|
|
54
|
+
#
|
|
55
|
+
# @return [Symbol, OpenAI::Models::ImageEditParams::Complexity, nil]
|
|
56
|
+
optional :complexity, enum: -> { OpenAI::ImageEditParams::Complexity }, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!attribute frame_count
|
|
59
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
60
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
61
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
62
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
63
|
+
# to the GIF preview for the selected model.
|
|
64
|
+
#
|
|
65
|
+
# @return [Integer, nil]
|
|
66
|
+
optional :frame_count, Integer, nil?: true
|
|
67
|
+
|
|
68
|
+
# @!attribute frame_duration_ms
|
|
69
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
70
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
71
|
+
# per frame. Only supported with output_format=gif.
|
|
72
|
+
#
|
|
73
|
+
# @return [Integer, nil]
|
|
74
|
+
optional :frame_duration_ms, Integer, nil?: true
|
|
75
|
+
|
|
50
76
|
# @!attribute input_fidelity
|
|
51
77
|
# Control how much effort the model will exert to match the style and features,
|
|
52
78
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -59,7 +85,7 @@ module OpenAI
|
|
|
59
85
|
# @!attribute markup
|
|
60
86
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
61
87
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
62
|
-
# GPT Image 2.5
|
|
88
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
63
89
|
#
|
|
64
90
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
65
91
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -85,8 +111,8 @@ module OpenAI
|
|
|
85
111
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
86
112
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
87
113
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
88
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
89
|
-
# `chatgpt-image-latest`).
|
|
114
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
115
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
90
116
|
#
|
|
91
117
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
92
118
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -110,8 +136,7 @@ module OpenAI
|
|
|
110
136
|
|
|
111
137
|
# @!attribute output_format
|
|
112
138
|
# The format in which the generated images are returned. This parameter is only
|
|
113
|
-
# supported for the GPT image models.
|
|
114
|
-
# default value is `png`.
|
|
139
|
+
# supported for the GPT image models. The default value is `png`.
|
|
115
140
|
#
|
|
116
141
|
# @return [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil]
|
|
117
142
|
optional :output_format, enum: -> { OpenAI::ImageEditParams::OutputFormat }, nil?: true
|
|
@@ -183,7 +208,7 @@ module OpenAI
|
|
|
183
208
|
# @return [String, nil]
|
|
184
209
|
optional :user, String
|
|
185
210
|
|
|
186
|
-
# @!method initialize(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: {})
|
|
211
|
+
# @!method initialize(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: {})
|
|
187
212
|
# @param image [Pathname, StringIO, IO, String, OpenAI::FilePart, Array<Pathname, StringIO, IO, String, OpenAI::FilePart>]
|
|
188
213
|
# The image(s) to edit. Must be a supported image file or an array of images.
|
|
189
214
|
#
|
|
@@ -213,6 +238,23 @@ module OpenAI
|
|
|
213
238
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
214
239
|
# set the output format to `png` or `webp`.
|
|
215
240
|
#
|
|
241
|
+
# @param complexity [Symbol, OpenAI::Models::ImageEditParams::Complexity, nil]
|
|
242
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
243
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
244
|
+
# reference image, independently of the SVG author's reasoning.
|
|
245
|
+
#
|
|
246
|
+
# @param frame_count [Integer, nil]
|
|
247
|
+
# Number of frames for GIF output. Accepts integers from 2 through 16. Defaults to
|
|
248
|
+
# 9 when omitted. Only supported with output_format=gif. The requested size must
|
|
249
|
+
# satisfy the selected model's GIF size limits. GIF output does not support
|
|
250
|
+
# streaming, partial images, masks, or custom output compression. Requires access
|
|
251
|
+
# to the GIF preview for the selected model.
|
|
252
|
+
#
|
|
253
|
+
# @param frame_duration_ms [Integer, nil]
|
|
254
|
+
# Requested delay per GIF frame, in milliseconds. Defaults to 200 when omitted.
|
|
255
|
+
# GIF output rounds to the nearest 10 ms and caps the encoded delay at 655,350 ms
|
|
256
|
+
# per frame. Only supported with output_format=gif.
|
|
257
|
+
#
|
|
216
258
|
# @param input_fidelity [Symbol, OpenAI::Models::ImageEditParams::InputFidelity, nil]
|
|
217
259
|
# Control how much effort the model will exert to match the style and features,
|
|
218
260
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
@@ -222,7 +264,7 @@ module OpenAI
|
|
|
222
264
|
# @param markup [Pathname, StringIO, IO, String, OpenAI::FilePart]
|
|
223
265
|
# A transparent PNG overlaid on the first image to guide the edit. Must match that
|
|
224
266
|
# image's dimensions after orientation and contain transparent pixels. Supports
|
|
225
|
-
# GPT Image 2.5
|
|
267
|
+
# GPT Image 2.5. Cannot be combined with mask.
|
|
226
268
|
#
|
|
227
269
|
# `String`, `StringIO`, and pathless `IO` inputs are sent with generic upload
|
|
228
270
|
# metadata. Use `OpenAI::FilePart` when you need to override the filename or
|
|
@@ -242,8 +284,8 @@ module OpenAI
|
|
|
242
284
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
243
285
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
244
286
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
245
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
246
|
-
# `chatgpt-image-latest`).
|
|
287
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
288
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
247
289
|
#
|
|
248
290
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
249
291
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -258,8 +300,7 @@ module OpenAI
|
|
|
258
300
|
#
|
|
259
301
|
# @param output_format [Symbol, OpenAI::Models::ImageEditParams::OutputFormat, nil]
|
|
260
302
|
# The format in which the generated images are returned. This parameter is only
|
|
261
|
-
# supported for the GPT image models.
|
|
262
|
-
# default value is `png`.
|
|
303
|
+
# supported for the GPT image models. The default value is `png`.
|
|
263
304
|
#
|
|
264
305
|
# @param partial_images [Integer, nil]
|
|
265
306
|
# The number of partial images to generate. This parameter is used for streaming
|
|
@@ -350,6 +391,20 @@ module OpenAI
|
|
|
350
391
|
# @return [Array<Symbol>]
|
|
351
392
|
end
|
|
352
393
|
|
|
394
|
+
# Computation spent planning the image, independently of rendering quality. Uses
|
|
395
|
+
# the image model's configured default when omitted. For SVG output, controls the
|
|
396
|
+
# reference image, independently of the SVG author's reasoning.
|
|
397
|
+
module Complexity
|
|
398
|
+
extend OpenAI::Internal::Type::Enum
|
|
399
|
+
|
|
400
|
+
LOW = :low
|
|
401
|
+
MEDIUM = :medium
|
|
402
|
+
HIGH = :high
|
|
403
|
+
|
|
404
|
+
# @!method self.values
|
|
405
|
+
# @return [Array<Symbol>]
|
|
406
|
+
end
|
|
407
|
+
|
|
353
408
|
# Control how much effort the model will exert to match the style and features,
|
|
354
409
|
# especially facial features, of input images. Supports `high` and `low` on
|
|
355
410
|
# `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit
|
|
@@ -367,8 +422,8 @@ module OpenAI
|
|
|
367
422
|
# The GPT image model to use for image editing (`gpt-image-1-mini`,
|
|
368
423
|
# `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
369
424
|
# `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
370
|
-
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
371
|
-
# `chatgpt-image-latest`).
|
|
425
|
+
# `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`,
|
|
426
|
+
# `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`, or `chatgpt-image-latest`).
|
|
372
427
|
#
|
|
373
428
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
374
429
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -381,7 +436,8 @@ module OpenAI
|
|
|
381
436
|
# (`gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,
|
|
382
437
|
# `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
383
438
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
384
|
-
# `gpt-image-2.5-flare-2026-09-08`,
|
|
439
|
+
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`, `gpt-image-2.6-flare`,
|
|
440
|
+
# or `chatgpt-image-latest`).
|
|
385
441
|
#
|
|
386
442
|
# `gpt-image-1` was shut down on October 23, 2026. Use
|
|
387
443
|
# `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.
|
|
@@ -392,14 +448,14 @@ module OpenAI
|
|
|
392
448
|
end
|
|
393
449
|
|
|
394
450
|
# The format in which the generated images are returned. This parameter is only
|
|
395
|
-
# supported for the GPT image models.
|
|
396
|
-
# default value is `png`.
|
|
451
|
+
# supported for the GPT image models. The default value is `png`.
|
|
397
452
|
module OutputFormat
|
|
398
453
|
extend OpenAI::Internal::Type::Enum
|
|
399
454
|
|
|
400
455
|
PNG = :png
|
|
401
456
|
JPEG = :jpeg
|
|
402
457
|
WEBP = :webp
|
|
458
|
+
GIF = :gif
|
|
403
459
|
|
|
404
460
|
# @!method self.values
|
|
405
461
|
# @return [Array<Symbol>]
|