openai 0.124.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 +18 -0
- data/README.md +1 -1
- data/lib/openai/internal/stream.rb +1 -1
- data/lib/openai/internal/transport/base_client.rb +11 -2
- data/lib/openai/internal/type/base_stream.rb +10 -0
- data/lib/openai/models/all_models.rb +1 -0
- data/lib/openai/models/beta/agent.rb +2 -2
- data/lib/openai/models/beta/agent_create_params.rb +9 -9
- data/lib/openai/models/beta/agent_session.rb +2 -2
- data/lib/openai/models/beta/agent_update_params.rb +9 -12
- data/lib/openai/models/beta/agents/automation_agent_config.rb +2 -2
- data/lib/openai/models/beta/agents/automation_target_param.rb +9 -12
- data/lib/openai/models/beta/agents/one_time_automation.rb +28 -1
- data/lib/openai/models/beta/agents/periodic_automation.rb +28 -1
- data/lib/openai/models/beta/agents/session_create_params.rb +9 -12
- 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/live/session_config.rb +12 -1
- data/lib/openai/models/live/session_resource.rb +12 -1
- 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/agents/sessions/events.rb +1 -0
- data/lib/openai/resources/beta/agents/sessions.rb +1 -0
- data/lib/openai/resources/beta/agents.rb +2 -3
- 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/internal/transport/base_client.rbi +4 -1
- data/rbi/openai/internal/type/base_stream.rbi +5 -0
- data/rbi/openai/models/all_models.rbi +1 -0
- data/rbi/openai/models/beta/agent.rbi +2 -2
- data/rbi/openai/models/beta/agent_create_params.rbi +9 -9
- data/rbi/openai/models/beta/agent_session.rbi +2 -2
- data/rbi/openai/models/beta/agent_update_params.rbi +9 -12
- data/rbi/openai/models/beta/agents/automation_agent_config.rbi +2 -2
- data/rbi/openai/models/beta/agents/automation_target_param.rbi +9 -12
- data/rbi/openai/models/beta/agents/one_time_automation.rbi +28 -1
- data/rbi/openai/models/beta/agents/periodic_automation.rbi +28 -1
- data/rbi/openai/models/beta/agents/session_create_params.rbi +9 -12
- 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/live/session_config.rbi +12 -0
- data/rbi/openai/models/live/session_resource.rbi +12 -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/agents.rbi +2 -3
- data/rbi/openai/resources/beta/responses.rbi +10 -0
- data/rbi/openai/resources/responses.rbi +12 -0
- data/sig/openai/internal/transport/base_client.rbs +1 -0
- data/sig/openai/internal/type/base_stream.rbs +2 -0
- data/sig/openai/models/all_models.rbs +2 -0
- data/sig/openai/models/beta/agent.rbs +2 -2
- data/sig/openai/models/beta/agent_create_params.rbs +8 -8
- data/sig/openai/models/beta/agent_session.rbs +2 -2
- data/sig/openai/models/beta/agent_update_params.rbs +8 -10
- data/sig/openai/models/beta/agents/automation_agent_config.rbs +2 -2
- data/sig/openai/models/beta/agents/automation_target_param.rbs +8 -10
- data/sig/openai/models/beta/agents/one_time_automation.rbs +20 -2
- data/sig/openai/models/beta/agents/periodic_automation.rbs +20 -2
- data/sig/openai/models/beta/agents/session_create_params.rbs +8 -10
- 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/live/session_config.rbs +10 -0
- data/sig/openai/models/live/session_resource.rbs +10 -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
|
@@ -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)
|
|
@@ -94,6 +94,11 @@ module OpenAI
|
|
|
94
94
|
sig { returns(T.nilable(String)) }
|
|
95
95
|
attr_accessor :instructions
|
|
96
96
|
|
|
97
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
98
|
+
# detection.
|
|
99
|
+
sig { returns(T.nilable(String)) }
|
|
100
|
+
attr_accessor :safety_identifier
|
|
101
|
+
|
|
97
102
|
# Whether to store the session for later forking and recording download. Defaults
|
|
98
103
|
# to false for new sessions.
|
|
99
104
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -141,6 +146,8 @@ module OpenAI
|
|
|
141
146
|
|
|
142
147
|
instructions: T.nilable(String),
|
|
143
148
|
|
|
149
|
+
safety_identifier: T.nilable(String),
|
|
150
|
+
|
|
144
151
|
store: T::Boolean,
|
|
145
152
|
|
|
146
153
|
triggers: T::Array[OpenAI::Live::DecisionTrigger::OrHash]
|
|
@@ -181,6 +188,10 @@ module OpenAI
|
|
|
181
188
|
# server defaults. Immutable after startup.
|
|
182
189
|
instructions: nil,
|
|
183
190
|
|
|
191
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
192
|
+
# detection.
|
|
193
|
+
safety_identifier: nil,
|
|
194
|
+
|
|
184
195
|
# Whether to store the session for later forking and recording download. Defaults
|
|
185
196
|
# to false for new sessions.
|
|
186
197
|
store: nil,
|
|
@@ -215,6 +226,7 @@ module OpenAI
|
|
|
215
226
|
)
|
|
216
227
|
],
|
|
217
228
|
instructions: T.nilable(String),
|
|
229
|
+
safety_identifier: T.nilable(String),
|
|
218
230
|
store: T::Boolean,
|
|
219
231
|
triggers: T::Array[OpenAI::Live::DecisionTrigger]
|
|
220
232
|
}
|
|
@@ -99,6 +99,11 @@ module OpenAI
|
|
|
99
99
|
sig { returns(T.nilable(String)) }
|
|
100
100
|
attr_accessor :instructions
|
|
101
101
|
|
|
102
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
103
|
+
# detection.
|
|
104
|
+
sig { returns(T.nilable(String)) }
|
|
105
|
+
attr_accessor :safety_identifier
|
|
106
|
+
|
|
102
107
|
# Whether to store the session for later forking and recording download. Defaults
|
|
103
108
|
# to false for new sessions.
|
|
104
109
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -149,6 +154,8 @@ module OpenAI
|
|
|
149
154
|
|
|
150
155
|
instructions: T.nilable(String),
|
|
151
156
|
|
|
157
|
+
safety_identifier: T.nilable(String),
|
|
158
|
+
|
|
152
159
|
store: T::Boolean,
|
|
153
160
|
|
|
154
161
|
triggers: T::Array[OpenAI::Live::DecisionTrigger::OrHash],
|
|
@@ -198,6 +205,10 @@ module OpenAI
|
|
|
198
205
|
# server defaults. Immutable after startup.
|
|
199
206
|
instructions: nil,
|
|
200
207
|
|
|
208
|
+
# A stable identifier for your end user, used for safety monitoring and abuse
|
|
209
|
+
# detection.
|
|
210
|
+
safety_identifier: nil,
|
|
211
|
+
|
|
201
212
|
# Whether to store the session for later forking and recording download. Defaults
|
|
202
213
|
# to false for new sessions.
|
|
203
214
|
store: nil,
|
|
@@ -234,6 +245,7 @@ module OpenAI
|
|
|
234
245
|
)
|
|
235
246
|
],
|
|
236
247
|
instructions: T.nilable(String),
|
|
248
|
+
safety_identifier: T.nilable(String),
|
|
237
249
|
store: T::Boolean,
|
|
238
250
|
triggers: T::Array[OpenAI::Live::DecisionTrigger]
|
|
239
251
|
}
|
|
@@ -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
|
|
|
@@ -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::Responses::ResponseCreateParams::BackgroundOptions)) }
|
|
36
|
+
attr_reader :background_options
|
|
37
|
+
|
|
38
|
+
sig { params(background_options: OpenAI::Responses::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::Responses::ResponseCreateParams::ContextManagement])) }
|
|
34
43
|
attr_accessor :context_management
|
|
@@ -442,6 +451,8 @@ module OpenAI
|
|
|
442
451
|
|
|
443
452
|
background: T.nilable(T::Boolean),
|
|
444
453
|
|
|
454
|
+
background_options: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::OrHash,
|
|
455
|
+
|
|
445
456
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
|
|
446
457
|
|
|
447
458
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
|
|
@@ -544,6 +555,11 @@ module OpenAI
|
|
|
544
555
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
545
556
|
background: nil,
|
|
546
557
|
|
|
558
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
559
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
560
|
+
# omitted.
|
|
561
|
+
background_options: nil,
|
|
562
|
+
|
|
547
563
|
# Context management configuration for this request.
|
|
548
564
|
context_management: nil,
|
|
549
565
|
|
|
@@ -799,6 +815,7 @@ module OpenAI
|
|
|
799
815
|
{
|
|
800
816
|
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms,
|
|
801
817
|
background: T.nilable(T::Boolean),
|
|
818
|
+
background_options: OpenAI::Responses::ResponseCreateParams::BackgroundOptions,
|
|
802
819
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement]),
|
|
803
820
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam)),
|
|
804
821
|
image: OpenAI::Responses::ResponseCreateParams::Image,
|
|
@@ -958,6 +975,106 @@ module OpenAI
|
|
|
958
975
|
end
|
|
959
976
|
end
|
|
960
977
|
|
|
978
|
+
class BackgroundOptions < OpenAI::Internal::Type::BaseModel
|
|
979
|
+
OrHash = T.type_alias do
|
|
980
|
+
T.any(
|
|
981
|
+
OpenAI::Responses::ResponseCreateParams::BackgroundOptions,
|
|
982
|
+
OpenAI::Internal::AnyHash
|
|
983
|
+
)
|
|
984
|
+
end
|
|
985
|
+
|
|
986
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
987
|
+
# `8h` select discounted background execution.
|
|
988
|
+
sig {
|
|
989
|
+
returns(T.nilable(OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol))
|
|
990
|
+
}
|
|
991
|
+
attr_reader :completion_window
|
|
992
|
+
|
|
993
|
+
sig {
|
|
994
|
+
params(
|
|
995
|
+
completion_window: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol
|
|
996
|
+
)
|
|
997
|
+
.void
|
|
998
|
+
}
|
|
999
|
+
attr_writer :completion_window
|
|
1000
|
+
|
|
1001
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1002
|
+
# requests. It does not add prior history to the input.
|
|
1003
|
+
sig { returns(T.nilable(String)) }
|
|
1004
|
+
attr_reader :continuation_id
|
|
1005
|
+
|
|
1006
|
+
sig { params(continuation_id: String).void }
|
|
1007
|
+
attr_writer :continuation_id
|
|
1008
|
+
|
|
1009
|
+
# Options for background execution on HTTP requests. The `2h` and `8h` completion
|
|
1010
|
+
# windows require `background: true`, Standard processing, and `stream: false` or
|
|
1011
|
+
# omitted.
|
|
1012
|
+
sig do
|
|
1013
|
+
params(
|
|
1014
|
+
|
|
1015
|
+
completion_window: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol,
|
|
1016
|
+
|
|
1017
|
+
continuation_id: String
|
|
1018
|
+
)
|
|
1019
|
+
.returns(T.attached_class)
|
|
1020
|
+
end
|
|
1021
|
+
def self.new(
|
|
1022
|
+
|
|
1023
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1024
|
+
# `8h` select discounted background execution.
|
|
1025
|
+
completion_window: nil,
|
|
1026
|
+
|
|
1027
|
+
# A customer-provided opaque identifier used to prioritize related background
|
|
1028
|
+
# requests. It does not add prior history to the input.
|
|
1029
|
+
|
|
1030
|
+
continuation_id: nil
|
|
1031
|
+
)
|
|
1032
|
+
end
|
|
1033
|
+
|
|
1034
|
+
sig do
|
|
1035
|
+
override.returns(
|
|
1036
|
+
{
|
|
1037
|
+
completion_window: OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::OrSymbol,
|
|
1038
|
+
continuation_id: String
|
|
1039
|
+
}
|
|
1040
|
+
)
|
|
1041
|
+
end
|
|
1042
|
+
def to_hash
|
|
1043
|
+
end
|
|
1044
|
+
|
|
1045
|
+
# The completion window for background execution. Defaults to `soonest`; `2h` and
|
|
1046
|
+
# `8h` select discounted background execution.
|
|
1047
|
+
module CompletionWindow
|
|
1048
|
+
extend OpenAI::Internal::Type::Enum
|
|
1049
|
+
|
|
1050
|
+
TaggedSymbol = T.type_alias {
|
|
1051
|
+
T.all(Symbol, OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow)
|
|
1052
|
+
}
|
|
1053
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1054
|
+
|
|
1055
|
+
SOONEST = T.let(
|
|
1056
|
+
:soonest,
|
|
1057
|
+
OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1058
|
+
)
|
|
1059
|
+
COMPLETION_WINDOW_2H = T.let(
|
|
1060
|
+
:"2h",
|
|
1061
|
+
OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1062
|
+
)
|
|
1063
|
+
COMPLETION_WINDOW_8H = T.let(
|
|
1064
|
+
:"8h",
|
|
1065
|
+
OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol
|
|
1066
|
+
)
|
|
1067
|
+
|
|
1068
|
+
sig {
|
|
1069
|
+
override.returns(
|
|
1070
|
+
T::Array[OpenAI::Responses::ResponseCreateParams::BackgroundOptions::CompletionWindow::TaggedSymbol]
|
|
1071
|
+
)
|
|
1072
|
+
}
|
|
1073
|
+
def self.values
|
|
1074
|
+
end
|
|
1075
|
+
end
|
|
1076
|
+
end
|
|
1077
|
+
|
|
961
1078
|
class ContextManagement < OpenAI::Internal::Type::BaseModel
|
|
962
1079
|
OrHash = T.type_alias do
|
|
963
1080
|
T.any(
|