openai 0.125.0 → 0.126.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/models/all_models.rb +1 -0
- data/lib/openai/models/beta/beta_response.rb +9 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +76 -1
- data/lib/openai/models/beta/response_compact_params.rb +9 -0
- data/lib/openai/models/beta/response_create_params.rb +70 -1
- data/lib/openai/models/chat_model.rb +2 -0
- data/lib/openai/models/responses/response_compact_params.rb +9 -0
- data/lib/openai/models/responses/response_create_params.rb +61 -1
- data/lib/openai/models/responses/responses_client_event.rb +65 -1
- data/lib/openai/models/responses_model.rb +1 -0
- data/lib/openai/resources/beta/responses.rb +12 -2
- data/lib/openai/resources/responses.rb +12 -2
- data/lib/openai/version.rb +1 -1
- data/rbi/openai/models/all_models.rbi +1 -0
- data/rbi/openai/models/beta/beta_response.rbi +3 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +145 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +3 -0
- data/rbi/openai/models/beta/response_create_params.rbi +116 -0
- data/rbi/openai/models/chat_model.rbi +2 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +3 -0
- data/rbi/openai/models/responses/response_create_params.rbi +117 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +135 -0
- data/rbi/openai/models/responses_model.rbi +1 -0
- data/rbi/openai/resources/beta/responses.rbi +10 -0
- data/rbi/openai/resources/responses.rbi +12 -0
- data/sig/openai/models/all_models.rbs +2 -0
- data/sig/openai/models/beta/beta_response.rbs +6 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +79 -0
- data/sig/openai/models/beta/response_compact_params.rbs +6 -0
- data/sig/openai/models/beta/response_create_params.rbs +79 -0
- data/sig/openai/models/chat_model.rbs +4 -0
- data/sig/openai/models/responses/response_compact_params.rbs +6 -0
- data/sig/openai/models/responses/response_create_params.rbs +73 -0
- data/sig/openai/models/responses/responses_client_event.rbs +73 -0
- data/sig/openai/models/responses_model.rbs +2 -0
- data/sig/openai/resources/beta/responses.rbs +2 -0
- data/sig/openai/resources/responses.rbs +3 -0
- metadata +1 -1
|
@@ -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, 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: {})
|
|
49
|
+
# @overload create(access_programs: nil, background: nil, background_options: 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.
|
|
@@ -55,6 +55,11 @@ module OpenAI
|
|
|
55
55
|
# Body param: Whether to run the model response in the background.
|
|
56
56
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
57
57
|
#
|
|
58
|
+
# @param background_options [OpenAI::Models::Beta::ResponseCreateParams::BackgroundOptions]
|
|
59
|
+
# Body param: Options for background execution on HTTP requests. The `2h` and `8h`
|
|
60
|
+
# completion windows require `background: true`, Standard processing, and
|
|
61
|
+
# `stream: false` or omitted.
|
|
62
|
+
#
|
|
58
63
|
# @param context_management [Array<OpenAI::Models::Beta::ResponseCreateParams::ContextManagement>, nil]
|
|
59
64
|
# Body param: Context management configuration for this request.
|
|
60
65
|
#
|
|
@@ -352,7 +357,7 @@ module OpenAI
|
|
|
352
357
|
# [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
353
358
|
# to use your own data as input for the model's response.
|
|
354
359
|
#
|
|
355
|
-
# @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: {})
|
|
360
|
+
# @overload stream_raw(access_programs: nil, background: nil, background_options: 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: {})
|
|
356
361
|
#
|
|
357
362
|
# @param access_programs [OpenAI::Models::Beta::ResponseCreateParams::AccessPrograms]
|
|
358
363
|
# Body param: Domain-specific access programs to use for this request.
|
|
@@ -361,6 +366,11 @@ module OpenAI
|
|
|
361
366
|
# Body param: Whether to run the model response in the background.
|
|
362
367
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
363
368
|
#
|
|
369
|
+
# @param background_options [OpenAI::Models::Beta::ResponseCreateParams::BackgroundOptions]
|
|
370
|
+
# Body param: Options for background execution on HTTP requests. The `2h` and `8h`
|
|
371
|
+
# completion windows require `background: true`, Standard processing, and
|
|
372
|
+
# `stream: false` or omitted.
|
|
373
|
+
#
|
|
364
374
|
# @param context_management [Array<OpenAI::Models::Beta::ResponseCreateParams::ContextManagement>, nil]
|
|
365
375
|
# Body param: Context management configuration for this request.
|
|
366
376
|
#
|
|
@@ -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, 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: {})
|
|
50
|
+
# @overload create(access_programs: nil, background: nil, background_options: 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.
|
|
@@ -56,6 +56,11 @@ module OpenAI
|
|
|
56
56
|
# Whether to run the model response in the background.
|
|
57
57
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
58
58
|
#
|
|
59
|
+
# @param background_options [OpenAI::Models::Responses::ResponseCreateParams::BackgroundOptions]
|
|
60
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
61
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
62
|
+
# omitted.
|
|
63
|
+
#
|
|
59
64
|
# @param context_management [Array<OpenAI::Models::Responses::ResponseCreateParams::ContextManagement>, nil]
|
|
60
65
|
# Context management configuration for this request.
|
|
61
66
|
#
|
|
@@ -345,7 +350,7 @@ module OpenAI
|
|
|
345
350
|
# [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
346
351
|
# to use your own data as input for the model's response.
|
|
347
352
|
#
|
|
348
|
-
# @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: {})
|
|
353
|
+
# @overload stream_raw(access_programs: nil, background: nil, background_options: 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: {})
|
|
349
354
|
#
|
|
350
355
|
# @param access_programs [OpenAI::Models::Responses::ResponseCreateParams::AccessPrograms]
|
|
351
356
|
# Domain-specific access programs to use for this request.
|
|
@@ -354,6 +359,11 @@ module OpenAI
|
|
|
354
359
|
# Whether to run the model response in the background.
|
|
355
360
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
356
361
|
#
|
|
362
|
+
# @param background_options [OpenAI::Models::Responses::ResponseCreateParams::BackgroundOptions]
|
|
363
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
364
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
365
|
+
# omitted.
|
|
366
|
+
#
|
|
357
367
|
# @param context_management [Array<OpenAI::Models::Responses::ResponseCreateParams::ContextManagement>, nil]
|
|
358
368
|
# Context management configuration for this request.
|
|
359
369
|
#
|
data/lib/openai/version.rb
CHANGED
|
@@ -54,6 +54,7 @@ module OpenAI
|
|
|
54
54
|
GPT_6_CYBER = T.let(:"gpt-6-cyber", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
55
55
|
GPT_ROSALIND_RESEARCH = T.let(:"gpt-rosalind-research", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
56
56
|
GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
57
|
+
GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol)
|
|
57
58
|
|
|
58
59
|
sig { override.returns(T::Array[OpenAI::AllModels::ResponsesOnlyModel::TaggedSymbol]) }
|
|
59
60
|
def self.values
|
|
@@ -989,7 +989,9 @@ module OpenAI
|
|
|
989
989
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
990
990
|
|
|
991
991
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
992
|
+
GPT_6_2_ASTRA = T.let(:"gpt-6.2-astra", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
992
993
|
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
994
|
+
GPT_6_2_SOL = T.let(:"gpt-6.2-sol", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
993
995
|
GPT_6_1_TERRA = T.let(:"gpt-6.1-terra", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
994
996
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
995
997
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
@@ -1135,6 +1137,7 @@ module OpenAI
|
|
|
1135
1137
|
GPT_5_6_CYBER = T.let(:"gpt-5.6-cyber", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
1136
1138
|
GPT_6_CYBER = T.let(:"gpt-6-cyber", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
1137
1139
|
GPT_ROSALIND_RESEARCH = T.let(:"gpt-rosalind-research", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
1140
|
+
GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Beta::BetaResponse::Model::TaggedSymbol)
|
|
1138
1141
|
|
|
1139
1142
|
end
|
|
1140
1143
|
|
|
@@ -45,6 +45,20 @@ module OpenAI
|
|
|
45
45
|
sig { returns(T.nilable(T::Boolean)) }
|
|
46
46
|
attr_accessor :background
|
|
47
47
|
|
|
48
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
49
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
50
|
+
# omitted.
|
|
51
|
+
sig { returns(T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions)) }
|
|
52
|
+
attr_reader :background_options
|
|
53
|
+
|
|
54
|
+
sig {
|
|
55
|
+
params(
|
|
56
|
+
background_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::OrHash
|
|
57
|
+
)
|
|
58
|
+
.void
|
|
59
|
+
}
|
|
60
|
+
attr_writer :background_options
|
|
61
|
+
|
|
48
62
|
# Context management configuration for this request.
|
|
49
63
|
sig {
|
|
50
64
|
returns(T.nilable(T::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]))
|
|
@@ -515,6 +529,8 @@ module OpenAI
|
|
|
515
529
|
|
|
516
530
|
background: T.nilable(T::Boolean),
|
|
517
531
|
|
|
532
|
+
background_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::OrHash,
|
|
533
|
+
|
|
518
534
|
context_management: T.nilable(
|
|
519
535
|
T::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement::OrHash]
|
|
520
536
|
),
|
|
@@ -629,6 +645,11 @@ module OpenAI
|
|
|
629
645
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
630
646
|
background: nil,
|
|
631
647
|
|
|
648
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
649
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
650
|
+
# omitted.
|
|
651
|
+
background_options: nil,
|
|
652
|
+
|
|
632
653
|
# Context management configuration for this request.
|
|
633
654
|
context_management: nil,
|
|
634
655
|
|
|
@@ -910,6 +931,7 @@ module OpenAI
|
|
|
910
931
|
type: Symbol,
|
|
911
932
|
access_programs: T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::AccessPrograms),
|
|
912
933
|
background: T.nilable(T::Boolean),
|
|
934
|
+
background_options: T.nilable(OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions),
|
|
913
935
|
context_management: T.nilable(
|
|
914
936
|
T::Array[OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ContextManagement]
|
|
915
937
|
),
|
|
@@ -1098,6 +1120,117 @@ module OpenAI
|
|
|
1098
1120
|
end
|
|
1099
1121
|
end
|
|
1100
1122
|
|
|
1123
|
+
class BackgroundOptions < OpenAI::Internal::Type::BaseModel
|
|
1124
|
+
OrHash = T.type_alias do
|
|
1125
|
+
T.any(
|
|
1126
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions,
|
|
1127
|
+
OpenAI::Internal::AnyHash
|
|
1128
|
+
)
|
|
1129
|
+
end
|
|
1130
|
+
|
|
1131
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1132
|
+
# `8h` select discounted background execution.
|
|
1133
|
+
sig {
|
|
1134
|
+
returns(
|
|
1135
|
+
T.nilable(
|
|
1136
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol
|
|
1137
|
+
)
|
|
1138
|
+
)
|
|
1139
|
+
}
|
|
1140
|
+
attr_reader :completion_window
|
|
1141
|
+
|
|
1142
|
+
sig {
|
|
1143
|
+
params(
|
|
1144
|
+
completion_window: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol
|
|
1145
|
+
)
|
|
1146
|
+
.void
|
|
1147
|
+
}
|
|
1148
|
+
attr_writer :completion_window
|
|
1149
|
+
|
|
1150
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1151
|
+
# requests. It does not add prior history to the input.
|
|
1152
|
+
sig { returns(T.nilable(String)) }
|
|
1153
|
+
attr_reader :continuation_id
|
|
1154
|
+
|
|
1155
|
+
sig { params(continuation_id: String).void }
|
|
1156
|
+
attr_writer :continuation_id
|
|
1157
|
+
|
|
1158
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
1159
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
1160
|
+
# omitted.
|
|
1161
|
+
sig do
|
|
1162
|
+
params(
|
|
1163
|
+
|
|
1164
|
+
completion_window: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol,
|
|
1165
|
+
|
|
1166
|
+
continuation_id: String
|
|
1167
|
+
)
|
|
1168
|
+
.returns(T.attached_class)
|
|
1169
|
+
end
|
|
1170
|
+
def self.new(
|
|
1171
|
+
|
|
1172
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1173
|
+
# `8h` select discounted background execution.
|
|
1174
|
+
completion_window: nil,
|
|
1175
|
+
|
|
1176
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1177
|
+
# requests. It does not add prior history to the input.
|
|
1178
|
+
|
|
1179
|
+
continuation_id: nil
|
|
1180
|
+
)
|
|
1181
|
+
end
|
|
1182
|
+
|
|
1183
|
+
sig do
|
|
1184
|
+
override.returns(
|
|
1185
|
+
{
|
|
1186
|
+
completion_window: T.nilable(
|
|
1187
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::OrSymbol
|
|
1188
|
+
),
|
|
1189
|
+
continuation_id: T.nilable(String)
|
|
1190
|
+
}
|
|
1191
|
+
)
|
|
1192
|
+
end
|
|
1193
|
+
def to_hash
|
|
1194
|
+
end
|
|
1195
|
+
|
|
1196
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1197
|
+
# `8h` select discounted background execution.
|
|
1198
|
+
module CompletionWindow
|
|
1199
|
+
extend OpenAI::Internal::Type::Enum
|
|
1200
|
+
|
|
1201
|
+
TaggedSymbol = T.type_alias {
|
|
1202
|
+
T.all(
|
|
1203
|
+
Symbol,
|
|
1204
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow
|
|
1205
|
+
)
|
|
1206
|
+
}
|
|
1207
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1208
|
+
|
|
1209
|
+
SOONEST = T.let(
|
|
1210
|
+
:soonest,
|
|
1211
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1212
|
+
)
|
|
1213
|
+
COMPLETION_WINDOW_2H = T.let(
|
|
1214
|
+
:"2h",
|
|
1215
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1216
|
+
)
|
|
1217
|
+
COMPLETION_WINDOW_8H = T.let(
|
|
1218
|
+
:"8h",
|
|
1219
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1220
|
+
)
|
|
1221
|
+
|
|
1222
|
+
sig {
|
|
1223
|
+
override.returns(
|
|
1224
|
+
T::Array[
|
|
1225
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1226
|
+
]
|
|
1227
|
+
)
|
|
1228
|
+
}
|
|
1229
|
+
def self.values
|
|
1230
|
+
end
|
|
1231
|
+
end
|
|
1232
|
+
end
|
|
1233
|
+
|
|
1101
1234
|
class ContextManagement < OpenAI::Internal::Type::BaseModel
|
|
1102
1235
|
OrHash = T.type_alias do
|
|
1103
1236
|
T.any(
|
|
@@ -1299,10 +1432,18 @@ module OpenAI
|
|
|
1299
1432
|
:"gpt-6-astra",
|
|
1300
1433
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1301
1434
|
)
|
|
1435
|
+
GPT_6_2_ASTRA = T.let(
|
|
1436
|
+
:"gpt-6.2-astra",
|
|
1437
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1438
|
+
)
|
|
1302
1439
|
GPT_6_1_SOL = T.let(
|
|
1303
1440
|
:"gpt-6.1-sol",
|
|
1304
1441
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1305
1442
|
)
|
|
1443
|
+
GPT_6_2_SOL = T.let(
|
|
1444
|
+
:"gpt-6.2-sol",
|
|
1445
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1446
|
+
)
|
|
1306
1447
|
GPT_6_1_TERRA = T.let(
|
|
1307
1448
|
:"gpt-6.1-terra",
|
|
1308
1449
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
@@ -1689,6 +1830,10 @@ module OpenAI
|
|
|
1689
1830
|
:"gpt-6-rosalind",
|
|
1690
1831
|
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1691
1832
|
)
|
|
1833
|
+
GPT_6_2_ASTRA_LAW = T.let(
|
|
1834
|
+
:"gpt-6.2-astra-law",
|
|
1835
|
+
OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Model::TaggedSymbol
|
|
1836
|
+
)
|
|
1692
1837
|
|
|
1693
1838
|
end
|
|
1694
1839
|
|
|
@@ -236,7 +236,9 @@ module OpenAI
|
|
|
236
236
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
237
237
|
|
|
238
238
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
239
|
+
GPT_6_2_ASTRA = T.let(:"gpt-6.2-astra", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
239
240
|
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
241
|
+
GPT_6_2_SOL = T.let(:"gpt-6.2-sol", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
240
242
|
GPT_6_1_TERRA = T.let(:"gpt-6.1-terra", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
241
243
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
242
244
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
@@ -446,6 +448,7 @@ module OpenAI
|
|
|
446
448
|
OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol
|
|
447
449
|
)
|
|
448
450
|
GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
451
|
+
GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Beta::ResponseCompactParams::Model::TaggedSymbol)
|
|
449
452
|
|
|
450
453
|
end
|
|
451
454
|
|
|
@@ -29,6 +29,15 @@ module OpenAI
|
|
|
29
29
|
sig { returns(T.nilable(T::Boolean)) }
|
|
30
30
|
attr_accessor :background
|
|
31
31
|
|
|
32
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
33
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
34
|
+
# omitted.
|
|
35
|
+
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::BackgroundOptions)) }
|
|
36
|
+
attr_reader :background_options
|
|
37
|
+
|
|
38
|
+
sig { params(background_options: OpenAI::Beta::ResponseCreateParams::BackgroundOptions::OrHash).void }
|
|
39
|
+
attr_writer :background_options
|
|
40
|
+
|
|
32
41
|
# Context management configuration for this request.
|
|
33
42
|
sig { returns(T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement])) }
|
|
34
43
|
attr_accessor :context_management
|
|
@@ -441,6 +450,8 @@ module OpenAI
|
|
|
441
450
|
|
|
442
451
|
background: T.nilable(T::Boolean),
|
|
443
452
|
|
|
453
|
+
background_options: OpenAI::Beta::ResponseCreateParams::BackgroundOptions::OrHash,
|
|
454
|
+
|
|
444
455
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
|
|
445
456
|
|
|
446
457
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
|
|
@@ -547,6 +558,11 @@ module OpenAI
|
|
|
547
558
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
548
559
|
background: nil,
|
|
549
560
|
|
|
561
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
562
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
563
|
+
# omitted.
|
|
564
|
+
background_options: nil,
|
|
565
|
+
|
|
550
566
|
# Context management configuration for this request.
|
|
551
567
|
context_management: nil,
|
|
552
568
|
|
|
@@ -807,6 +823,7 @@ module OpenAI
|
|
|
807
823
|
{
|
|
808
824
|
access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms,
|
|
809
825
|
background: T.nilable(T::Boolean),
|
|
826
|
+
background_options: OpenAI::Beta::ResponseCreateParams::BackgroundOptions,
|
|
810
827
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement]),
|
|
811
828
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam)),
|
|
812
829
|
image: OpenAI::Beta::ResponseCreateParams::Image,
|
|
@@ -961,6 +978,102 @@ module OpenAI
|
|
|
961
978
|
end
|
|
962
979
|
end
|
|
963
980
|
|
|
981
|
+
class BackgroundOptions < OpenAI::Internal::Type::BaseModel
|
|
982
|
+
OrHash = T.type_alias do
|
|
983
|
+
T.any(
|
|
984
|
+
OpenAI::Beta::ResponseCreateParams::BackgroundOptions,
|
|
985
|
+
OpenAI::Internal::AnyHash
|
|
986
|
+
)
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
990
|
+
# `8h` select discounted background execution.
|
|
991
|
+
sig { returns(T.nilable(OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol)) }
|
|
992
|
+
attr_reader :completion_window
|
|
993
|
+
|
|
994
|
+
sig {
|
|
995
|
+
params(completion_window: OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol)
|
|
996
|
+
.void
|
|
997
|
+
}
|
|
998
|
+
attr_writer :completion_window
|
|
999
|
+
|
|
1000
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1001
|
+
# requests. It does not add prior history to the input.
|
|
1002
|
+
sig { returns(T.nilable(String)) }
|
|
1003
|
+
attr_reader :continuation_id
|
|
1004
|
+
|
|
1005
|
+
sig { params(continuation_id: String).void }
|
|
1006
|
+
attr_writer :continuation_id
|
|
1007
|
+
|
|
1008
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
1009
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
1010
|
+
# omitted.
|
|
1011
|
+
sig do
|
|
1012
|
+
params(
|
|
1013
|
+
|
|
1014
|
+
completion_window: OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol,
|
|
1015
|
+
|
|
1016
|
+
continuation_id: String
|
|
1017
|
+
)
|
|
1018
|
+
.returns(T.attached_class)
|
|
1019
|
+
end
|
|
1020
|
+
def self.new(
|
|
1021
|
+
|
|
1022
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1023
|
+
# `8h` select discounted background execution.
|
|
1024
|
+
completion_window: nil,
|
|
1025
|
+
|
|
1026
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1027
|
+
# requests. It does not add prior history to the input.
|
|
1028
|
+
|
|
1029
|
+
continuation_id: nil
|
|
1030
|
+
)
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
sig do
|
|
1034
|
+
override.returns(
|
|
1035
|
+
{
|
|
1036
|
+
completion_window: OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol,
|
|
1037
|
+
continuation_id: String
|
|
1038
|
+
}
|
|
1039
|
+
)
|
|
1040
|
+
end
|
|
1041
|
+
def to_hash
|
|
1042
|
+
end
|
|
1043
|
+
|
|
1044
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1045
|
+
# `8h` select discounted background execution.
|
|
1046
|
+
module CompletionWindow
|
|
1047
|
+
extend OpenAI::Internal::Type::Enum
|
|
1048
|
+
|
|
1049
|
+
TaggedSymbol = T.type_alias {
|
|
1050
|
+
T.all(Symbol, OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow)
|
|
1051
|
+
}
|
|
1052
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1053
|
+
|
|
1054
|
+
SOONEST = T.let(
|
|
1055
|
+
:soonest,
|
|
1056
|
+
OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1057
|
+
)
|
|
1058
|
+
COMPLETION_WINDOW_2H = T.let(
|
|
1059
|
+
:"2h",
|
|
1060
|
+
OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1061
|
+
)
|
|
1062
|
+
COMPLETION_WINDOW_8H = T.let(
|
|
1063
|
+
:"8h",
|
|
1064
|
+
OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1065
|
+
)
|
|
1066
|
+
|
|
1067
|
+
sig {
|
|
1068
|
+
override.returns(
|
|
1069
|
+
T::Array[OpenAI::Beta::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol]
|
|
1070
|
+
)
|
|
1071
|
+
}
|
|
1072
|
+
def self.values
|
|
1073
|
+
end
|
|
1074
|
+
end
|
|
1075
|
+
end
|
|
1076
|
+
|
|
964
1077
|
class ContextManagement < OpenAI::Internal::Type::BaseModel
|
|
965
1078
|
OrHash = T.type_alias do
|
|
966
1079
|
T.any(
|
|
@@ -1131,7 +1244,9 @@ module OpenAI
|
|
|
1131
1244
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1132
1245
|
|
|
1133
1246
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1247
|
+
GPT_6_2_ASTRA = T.let(:"gpt-6.2-astra", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1134
1248
|
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1249
|
+
GPT_6_2_SOL = T.let(:"gpt-6.2-sol", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1135
1250
|
GPT_6_1_TERRA = T.let(:"gpt-6.1-terra", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1136
1251
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1137
1252
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
@@ -1329,6 +1444,7 @@ module OpenAI
|
|
|
1329
1444
|
OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol
|
|
1330
1445
|
)
|
|
1331
1446
|
GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1447
|
+
GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Beta::ResponseCreateParams::Model::TaggedSymbol)
|
|
1332
1448
|
|
|
1333
1449
|
end
|
|
1334
1450
|
|
|
@@ -10,7 +10,9 @@ module OpenAI
|
|
|
10
10
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
11
11
|
|
|
12
12
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::ChatModel::TaggedSymbol)
|
|
13
|
+
GPT_6_2_ASTRA = T.let(:"gpt-6.2-astra", OpenAI::ChatModel::TaggedSymbol)
|
|
13
14
|
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::ChatModel::TaggedSymbol)
|
|
15
|
+
GPT_6_2_SOL = T.let(:"gpt-6.2-sol", OpenAI::ChatModel::TaggedSymbol)
|
|
14
16
|
GPT_6_1_TERRA = T.let(:"gpt-6.1-terra", OpenAI::ChatModel::TaggedSymbol)
|
|
15
17
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::ChatModel::TaggedSymbol)
|
|
16
18
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::ChatModel::TaggedSymbol)
|
|
@@ -228,7 +228,9 @@ module OpenAI
|
|
|
228
228
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
229
229
|
|
|
230
230
|
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
231
|
+
GPT_6_2_ASTRA = T.let(:"gpt-6.2-astra", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
231
232
|
GPT_6_1_SOL = T.let(:"gpt-6.1-sol", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
233
|
+
GPT_6_2_SOL = T.let(:"gpt-6.2-sol", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
232
234
|
GPT_6_1_TERRA = T.let(:"gpt-6.1-terra", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
233
235
|
GPT_6_SOL = T.let(:"gpt-6-sol", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
234
236
|
GPT_6_LUNA = T.let(:"gpt-6-luna", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
@@ -489,6 +491,7 @@ module OpenAI
|
|
|
489
491
|
OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol
|
|
490
492
|
)
|
|
491
493
|
GPT_6_ROSALIND = T.let(:"gpt-6-rosalind", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
494
|
+
GPT_6_2_ASTRA_LAW = T.let(:"gpt-6.2-astra-law", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
492
495
|
|
|
493
496
|
end
|
|
494
497
|
|