openai 0.83.0 → 0.85.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 +59 -0
- data/README.md +1 -1
- data/SECURITY.md +10 -0
- data/docs/architecture/security-model.md +267 -0
- data/lib/openai/auth/workload_identity_auth.rb +17 -2
- data/lib/openai/client.rb +24 -6
- data/lib/openai/errors.rb +1 -1
- data/lib/openai/helpers/streaming/chat_completion_stream.rb +18 -10
- data/lib/openai/helpers/streaming/response_events.rb +2 -2
- data/lib/openai/helpers/streaming/response_stream.rb +80 -44
- data/lib/openai/helpers/structured_output/array_of.rb +2 -2
- data/lib/openai/helpers/structured_output/base_model.rb +19 -5
- data/lib/openai/helpers/structured_output/chat_completion_parser.rb +12 -3
- data/lib/openai/helpers/structured_output/json_schema_converter.rb +34 -11
- data/lib/openai/helpers/structured_output/response_parser.rb +1 -1
- data/lib/openai/internal/type/base_model.rb +2 -2
- data/lib/openai/internal/type/converter.rb +1 -1
- data/lib/openai/internal/util.rb +2 -2
- data/lib/openai/internal/vector_store_file_uploader.rb +1 -1
- data/lib/openai/models/admin/organization/usage_costs_params.rb +10 -1
- data/lib/openai/models/batch.rb +4 -4
- data/lib/openai/models/beta/beta_custom_tool.rb +13 -1
- data/lib/openai/models/beta/beta_function_tool.rb +8 -1
- data/lib/openai/models/beta/beta_namespace_tool.rb +10 -1
- data/lib/openai/models/beta/beta_response.rb +26 -18
- data/lib/openai/models/beta/beta_response_configuration_update_item.rb +103 -0
- data/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +104 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call.rb +9 -1
- data/lib/openai/models/beta/beta_response_custom_tool_call_item.rb +3 -1
- data/lib/openai/models/beta/beta_response_error.rb +96 -1
- data/lib/openai/models/beta/beta_response_function_tool_call.rb +9 -1
- data/lib/openai/models/beta/beta_response_function_tool_call_item.rb +3 -1
- data/lib/openai/models/beta/beta_response_incomplete_event.rb +4 -0
- data/lib/openai/models/beta/beta_response_inject_event.rb +2 -2
- data/lib/openai/models/beta/beta_response_inject_failed_event.rb +2 -2
- data/lib/openai/models/beta/beta_response_input_item.rb +6 -1
- data/lib/openai/models/beta/beta_response_item.rb +5 -1
- data/lib/openai/models/beta/beta_response_steer_accepted_event.rb +81 -0
- data/lib/openai/models/beta/beta_response_steer_error_code.rb +61 -0
- data/lib/openai/models/beta/beta_response_steer_event.rb +75 -0
- data/lib/openai/models/beta/beta_response_steer_failed_event.rb +151 -0
- data/lib/openai/models/beta/beta_response_steer_input.rb +360 -0
- data/lib/openai/models/beta/beta_response_steer_input_content.rb +28 -0
- data/lib/openai/models/beta/beta_response_steer_pending_event.rb +113 -0
- data/lib/openai/models/beta/beta_response_steer_pending_reason.rb +26 -0
- data/lib/openai/models/beta/beta_response_steer_required_input.rb +215 -0
- data/lib/openai/models/beta/beta_response_stream_event.rb +4 -0
- data/lib/openai/models/beta/beta_response_usage.rb +1 -12
- data/lib/openai/models/beta/beta_responses_client_event.rb +45 -16
- data/lib/openai/models/beta/beta_responses_server_event.rb +164 -2
- data/lib/openai/models/beta/response_compact_params.rb +13 -10
- data/lib/openai/models/beta/response_create_params.rb +14 -15
- data/lib/openai/models/beta/responses/beta_response_item_list.rb +2 -2
- data/lib/openai/models/beta/responses/input_token_count_params.rb +3 -3
- data/lib/openai/models/chat/completion_create_params.rb +8 -8
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/completion_usage.rb +1 -12
- data/lib/openai/models/conversations/conversation_create_params.rb +2 -2
- data/lib/openai/models/conversations/conversation_item.rb +5 -1
- data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
- data/lib/openai/models/conversations/item_create_params.rb +2 -2
- data/lib/openai/models/error_object.rb +90 -1
- data/lib/openai/models/eval_create_response.rb +1 -1
- data/lib/openai/models/eval_list_response.rb +1 -1
- data/lib/openai/models/eval_retrieve_response.rb +1 -1
- data/lib/openai/models/eval_update_response.rb +1 -1
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +2 -2
- data/lib/openai/models/reasoning.rb +0 -2
- data/lib/openai/models/responses/custom_tool.rb +13 -1
- data/lib/openai/models/responses/function_tool.rb +8 -1
- data/lib/openai/models/responses/input_token_count_params.rb +3 -3
- data/lib/openai/models/responses/namespace_tool.rb +10 -1
- data/lib/openai/models/responses/response.rb +20 -13
- data/lib/openai/models/responses/response_compact_params.rb +13 -10
- data/lib/openai/models/responses/response_configuration_update_item.rb +56 -0
- data/lib/openai/models/responses/response_configuration_update_item_param.rb +57 -0
- data/lib/openai/models/responses/response_create_params.rb +8 -10
- data/lib/openai/models/responses/response_custom_tool_call.rb +9 -1
- data/lib/openai/models/responses/response_custom_tool_call_item.rb +3 -1
- data/lib/openai/models/responses/response_error.rb +96 -1
- data/lib/openai/models/responses/response_function_tool_call.rb +9 -1
- data/lib/openai/models/responses/response_function_tool_call_item.rb +3 -1
- data/lib/openai/models/responses/response_incomplete_event.rb +4 -0
- data/lib/openai/models/responses/response_input_item.rb +6 -1
- data/lib/openai/models/responses/response_item.rb +5 -1
- data/lib/openai/models/responses/response_item_list.rb +2 -2
- data/lib/openai/models/responses/response_steer_accepted_event.rb +79 -0
- data/lib/openai/models/responses/response_steer_error_code.rb +59 -0
- data/lib/openai/models/responses/response_steer_event.rb +73 -0
- data/lib/openai/models/responses/response_steer_failed_event.rb +149 -0
- data/lib/openai/models/responses/response_steer_input.rb +304 -0
- data/lib/openai/models/responses/response_steer_input_content.rb +26 -0
- data/lib/openai/models/responses/response_steer_pending_event.rb +111 -0
- data/lib/openai/models/responses/response_steer_pending_reason.rb +24 -0
- data/lib/openai/models/responses/response_steer_required_input.rb +213 -0
- data/lib/openai/models/responses/response_stream_event.rb +4 -0
- data/lib/openai/models/responses/response_usage.rb +1 -12
- data/lib/openai/models/responses/responses_client_event.rb +872 -771
- data/lib/openai/models/responses/responses_server_event.rb +162 -2
- data/lib/openai/models/safety/alert_retrieve_params.rb +24 -0
- data/lib/openai/models/safety/safety_alert.rb +96 -0
- data/lib/openai/models/video_create_error.rb +93 -1
- data/lib/openai/models/webhooks/safety_alert_created_webhook_event.rb +63 -0
- data/lib/openai/models/webhooks/safety_org_alert_created_webhook_event.rb +63 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +7 -1
- data/lib/openai/models.rb +2 -0
- data/lib/openai/net_http_client.rb +1 -1
- data/lib/openai/providers/bedrock.rb +20 -12
- data/lib/openai/resources/admin/organization/usage.rb +3 -1
- data/lib/openai/resources/beta/responses/input_items.rb +1 -1
- data/lib/openai/resources/beta/responses/input_tokens.rb +1 -1
- data/lib/openai/resources/beta/responses.rb +8 -8
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/conversations/items.rb +3 -3
- data/lib/openai/resources/conversations.rb +1 -1
- data/lib/openai/resources/responses/input_items.rb +1 -1
- data/lib/openai/resources/responses/input_tokens.rb +1 -1
- data/lib/openai/resources/responses.rb +10 -9
- data/lib/openai/resources/safety/alerts.rb +37 -0
- data/lib/openai/resources/safety.rb +18 -0
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +29 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/errors.rbi +1 -1
- data/rbi/openai/helpers/streaming/events.rbi +2 -2
- data/rbi/openai/helpers/streaming/response_stream.rbi +3 -3
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +15 -0
- data/rbi/openai/models/batch.rbi +6 -6
- data/rbi/openai/models/beta/beta_custom_tool.rbi +15 -0
- data/rbi/openai/models/beta/beta_function_tool.rbi +11 -0
- data/rbi/openai/models/beta/beta_namespace_tool.rbi +15 -0
- data/rbi/openai/models/beta/beta_response.rbi +21 -18
- data/rbi/openai/models/beta/beta_response_configuration_update_item.rbi +200 -0
- data/rbi/openai/models/beta/beta_response_configuration_update_item_param.rbi +207 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call.rbi +13 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call_item.rbi +6 -0
- data/rbi/openai/models/beta/beta_response_error.rbi +161 -3
- data/rbi/openai/models/beta/beta_response_function_tool_call.rbi +13 -0
- data/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi +6 -0
- data/rbi/openai/models/beta/beta_response_incomplete_event.rbi +4 -0
- data/rbi/openai/models/beta/beta_response_inject_event.rbi +3 -0
- data/rbi/openai/models/beta/beta_response_inject_failed_event.rbi +3 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +1 -0
- data/rbi/openai/models/beta/beta_response_item.rbi +1 -0
- data/rbi/openai/models/beta/beta_response_steer_accepted_event.rbi +148 -0
- data/rbi/openai/models/beta/beta_response_steer_error_code.rbi +65 -0
- data/rbi/openai/models/beta/beta_response_steer_event.rbi +118 -0
- data/rbi/openai/models/beta/beta_response_steer_failed_event.rbi +267 -0
- data/rbi/openai/models/beta/beta_response_steer_input.rbi +602 -0
- data/rbi/openai/models/beta/beta_response_steer_input_content.rbi +31 -0
- data/rbi/openai/models/beta/beta_response_steer_pending_event.rbi +222 -0
- data/rbi/openai/models/beta/beta_response_steer_pending_reason.rbi +35 -0
- data/rbi/openai/models/beta/beta_response_steer_required_input.rbi +379 -0
- data/rbi/openai/models/beta/beta_response_usage.rbi +3 -13
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +14 -15
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +206 -3
- data/rbi/openai/models/beta/response_compact_params.rbi +10 -9
- data/rbi/openai/models/beta/response_create_params.rbi +10 -15
- data/rbi/openai/models/beta/responses/beta_response_item_list.rbi +1 -0
- data/rbi/openai/models/chat/completion_create_params.rbi +9 -9
- data/rbi/openai/models/chat_model.rbi +1 -0
- data/rbi/openai/models/completion_usage.rbi +0 -10
- data/rbi/openai/models/conversations/conversation_create_params.rbi +3 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +1 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +1 -0
- data/rbi/openai/models/conversations/item_create_params.rbi +3 -0
- data/rbi/openai/models/error_object.rbi +156 -3
- data/rbi/openai/models/eval_create_response.rbi +1 -1
- data/rbi/openai/models/eval_list_response.rbi +1 -1
- data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
- data/rbi/openai/models/eval_update_response.rbi +1 -1
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +2 -2
- data/rbi/openai/models/reasoning.rbi +0 -2
- data/rbi/openai/models/responses/custom_tool.rbi +15 -0
- data/rbi/openai/models/responses/function_tool.rbi +11 -0
- data/rbi/openai/models/responses/namespace_tool.rbi +15 -0
- data/rbi/openai/models/responses/response.rbi +17 -13
- data/rbi/openai/models/responses/response_compact_params.rbi +10 -9
- data/rbi/openai/models/responses/response_configuration_update_item.rbi +112 -0
- data/rbi/openai/models/responses/response_configuration_update_item_param.rbi +117 -0
- data/rbi/openai/models/responses/response_create_params.rbi +6 -10
- data/rbi/openai/models/responses/response_custom_tool_call.rbi +13 -0
- data/rbi/openai/models/responses/response_custom_tool_call_item.rbi +6 -0
- data/rbi/openai/models/responses/response_error.rbi +161 -3
- data/rbi/openai/models/responses/response_function_tool_call.rbi +13 -0
- data/rbi/openai/models/responses/response_function_tool_call_item.rbi +6 -0
- data/rbi/openai/models/responses/response_incomplete_event.rbi +4 -0
- data/rbi/openai/models/responses/response_input_item.rbi +1 -0
- data/rbi/openai/models/responses/response_item.rbi +1 -0
- data/rbi/openai/models/responses/response_item_list.rbi +1 -0
- data/rbi/openai/models/responses/response_steer_accepted_event.rbi +146 -0
- data/rbi/openai/models/responses/response_steer_error_code.rbi +63 -0
- data/rbi/openai/models/responses/response_steer_event.rbi +119 -0
- data/rbi/openai/models/responses/response_steer_failed_event.rbi +268 -0
- data/rbi/openai/models/responses/response_steer_input.rbi +474 -0
- data/rbi/openai/models/responses/response_steer_input_content.rbi +29 -0
- data/rbi/openai/models/responses/response_steer_pending_event.rbi +220 -0
- data/rbi/openai/models/responses/response_steer_pending_reason.rbi +33 -0
- data/rbi/openai/models/responses/response_steer_required_input.rbi +377 -0
- data/rbi/openai/models/responses/response_usage.rbi +3 -13
- data/rbi/openai/models/responses/responses_client_event.rbi +1205 -1041
- data/rbi/openai/models/responses/responses_server_event.rbi +202 -3
- data/rbi/openai/models/safety/alert_retrieve_params.rbi +55 -0
- data/rbi/openai/models/safety/safety_alert.rbi +147 -0
- data/rbi/openai/models/video_create_error.rbi +149 -3
- data/rbi/openai/models/webhooks/safety_alert_created_webhook_event.rbi +130 -0
- data/rbi/openai/models/webhooks/safety_org_alert_created_webhook_event.rbi +130 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +3 -1
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +4 -0
- data/rbi/openai/resources/beta/responses.rbi +7 -11
- data/rbi/openai/resources/chat/completions.rbi +6 -6
- data/rbi/openai/resources/conversations/items.rbi +1 -0
- data/rbi/openai/resources/conversations.rbi +1 -0
- data/rbi/openai/resources/responses.rbi +9 -13
- data/rbi/openai/resources/safety/alerts.rbi +30 -0
- data/rbi/openai/resources/safety.rbi +18 -0
- data/rbi/openai/resources/webhooks.rbi +3 -1
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/errors.rbs +1 -1
- data/sig/openai/internal/transport/base_client.rbs +4 -19
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +7 -0
- data/sig/openai/models/beta/beta_custom_tool.rbs +7 -0
- data/sig/openai/models/beta/beta_function_tool.rbs +7 -0
- data/sig/openai/models/beta/beta_namespace_tool.rbs +7 -0
- data/sig/openai/models/beta/beta_response.rbs +7 -2
- data/sig/openai/models/beta/beta_response_configuration_update_item.rbs +91 -0
- data/sig/openai/models/beta/beta_response_configuration_update_item_param.rbs +87 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call.rbs +7 -0
- data/sig/openai/models/beta/beta_response_custom_tool_call_item.rbs +3 -0
- data/sig/openai/models/beta/beta_response_error.rbs +82 -3
- data/sig/openai/models/beta/beta_response_function_tool_call.rbs +7 -0
- data/sig/openai/models/beta/beta_response_function_tool_call_item.rbs +3 -0
- data/sig/openai/models/beta/beta_response_input_item.rbs +1 -0
- data/sig/openai/models/beta/beta_response_item.rbs +1 -0
- data/sig/openai/models/beta/beta_response_steer_accepted_event.rbs +53 -0
- data/sig/openai/models/beta/beta_response_steer_error_code.rbs +31 -0
- data/sig/openai/models/beta/beta_response_steer_event.rbs +34 -0
- data/sig/openai/models/beta/beta_response_steer_failed_event.rbs +102 -0
- data/sig/openai/models/beta/beta_response_steer_input.rbs +214 -0
- data/sig/openai/models/beta/beta_response_steer_input_content.rbs +18 -0
- data/sig/openai/models/beta/beta_response_steer_pending_event.rbs +63 -0
- data/sig/openai/models/beta/beta_response_steer_pending_reason.rbs +16 -0
- data/sig/openai/models/beta/beta_response_steer_required_input.rbs +161 -0
- data/sig/openai/models/beta/beta_response_usage.rbs +3 -8
- data/sig/openai/models/beta/beta_responses_client_event.rbs +4 -1
- data/sig/openai/models/beta/beta_responses_server_event.rbs +80 -3
- data/sig/openai/models/beta/response_compact_params.rbs +3 -1
- data/sig/openai/models/beta/response_create_params.rbs +3 -1
- data/sig/openai/models/chat_model.rbs +3 -1
- data/sig/openai/models/completion_usage.rbs +0 -5
- data/sig/openai/models/conversations/conversation_item.rbs +1 -0
- data/sig/openai/models/error_object.rbs +82 -3
- data/sig/openai/models/responses/custom_tool.rbs +7 -0
- data/sig/openai/models/responses/function_tool.rbs +7 -0
- data/sig/openai/models/responses/namespace_tool.rbs +7 -0
- data/sig/openai/models/responses/response.rbs +4 -1
- data/sig/openai/models/responses/response_compact_params.rbs +3 -1
- data/sig/openai/models/responses/response_configuration_update_item.rbs +46 -0
- data/sig/openai/models/responses/response_configuration_update_item_param.rbs +46 -0
- data/sig/openai/models/responses/response_custom_tool_call.rbs +7 -0
- data/sig/openai/models/responses/response_custom_tool_call_item.rbs +3 -0
- data/sig/openai/models/responses/response_error.rbs +79 -3
- data/sig/openai/models/responses/response_function_tool_call.rbs +7 -0
- data/sig/openai/models/responses/response_function_tool_call_item.rbs +3 -0
- data/sig/openai/models/responses/response_input_item.rbs +1 -0
- data/sig/openai/models/responses/response_item.rbs +1 -0
- data/sig/openai/models/responses/response_steer_accepted_event.rbs +51 -0
- data/sig/openai/models/responses/response_steer_error_code.rbs +29 -0
- data/sig/openai/models/responses/response_steer_event.rbs +32 -0
- data/sig/openai/models/responses/response_steer_failed_event.rbs +100 -0
- data/sig/openai/models/responses/response_steer_input.rbs +182 -0
- data/sig/openai/models/responses/response_steer_input_content.rbs +16 -0
- data/sig/openai/models/responses/response_steer_pending_event.rbs +61 -0
- data/sig/openai/models/responses/response_steer_pending_reason.rbs +13 -0
- data/sig/openai/models/responses/response_steer_required_input.rbs +159 -0
- data/sig/openai/models/responses/response_usage.rbs +3 -8
- data/sig/openai/models/responses/responses_client_event.rbs +355 -344
- data/sig/openai/models/responses/responses_server_event.rbs +80 -3
- data/sig/openai/models/safety/alert_retrieve_params.rbs +22 -0
- data/sig/openai/models/safety/safety_alert.rbs +81 -0
- data/sig/openai/models/video_create_error.rbs +87 -3
- data/sig/openai/models/webhooks/safety_alert_created_webhook_event.rbs +52 -0
- data/sig/openai/models/webhooks/safety_org_alert_created_webhook_event.rbs +52 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +2 -0
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/resources/admin/organization/usage.rbs +1 -0
- data/sig/openai/resources/safety/alerts.rbs +14 -0
- data/sig/openai/resources/safety.rbs +9 -0
- data/sig/openai/resources/webhooks.rbs +3 -1
- metadata +86 -1
|
@@ -24,6 +24,12 @@ module OpenAI
|
|
|
24
24
|
sig { returns(String) }
|
|
25
25
|
attr_accessor :type
|
|
26
26
|
|
|
27
|
+
sig { returns(T.nilable(OpenAI::ErrorObject::Misalignment)) }
|
|
28
|
+
attr_reader :misalignment
|
|
29
|
+
|
|
30
|
+
sig { params(misalignment: OpenAI::ErrorObject::Misalignment::OrHash).void }
|
|
31
|
+
attr_writer :misalignment
|
|
32
|
+
|
|
27
33
|
sig do
|
|
28
34
|
params(
|
|
29
35
|
|
|
@@ -33,7 +39,9 @@ module OpenAI
|
|
|
33
39
|
|
|
34
40
|
param: T.nilable(String),
|
|
35
41
|
|
|
36
|
-
type: String
|
|
42
|
+
type: String,
|
|
43
|
+
|
|
44
|
+
misalignment: OpenAI::ErrorObject::Misalignment::OrHash
|
|
37
45
|
)
|
|
38
46
|
.returns(T.attached_class)
|
|
39
47
|
end
|
|
@@ -45,18 +53,163 @@ module OpenAI
|
|
|
45
53
|
|
|
46
54
|
param:,
|
|
47
55
|
|
|
48
|
-
type
|
|
56
|
+
type:,
|
|
57
|
+
|
|
58
|
+
misalignment: nil
|
|
49
59
|
)
|
|
50
60
|
end
|
|
51
61
|
|
|
52
62
|
sig do
|
|
53
63
|
override.returns(
|
|
54
|
-
{
|
|
64
|
+
{
|
|
65
|
+
code: T.nilable(String),
|
|
66
|
+
message: String,
|
|
67
|
+
param: T.nilable(String),
|
|
68
|
+
type: String,
|
|
69
|
+
misalignment: OpenAI::ErrorObject::Misalignment
|
|
70
|
+
}
|
|
55
71
|
)
|
|
56
72
|
end
|
|
57
73
|
def to_hash
|
|
58
74
|
end
|
|
59
75
|
|
|
76
|
+
class Misalignment < OpenAI::Internal::Type::BaseModel
|
|
77
|
+
OrHash = T.type_alias do
|
|
78
|
+
T.any(
|
|
79
|
+
OpenAI::ErrorObject::Misalignment,
|
|
80
|
+
OpenAI::Internal::AnyHash
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# The public explanation for this block.
|
|
85
|
+
sig { returns(T.nilable(String)) }
|
|
86
|
+
attr_reader :detailed_explanation
|
|
87
|
+
|
|
88
|
+
sig { params(detailed_explanation: String).void }
|
|
89
|
+
attr_writer :detailed_explanation
|
|
90
|
+
|
|
91
|
+
# An optional classification; clients must accept additional values.
|
|
92
|
+
sig { returns(T.nilable(T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::OrSymbol))) }
|
|
93
|
+
attr_reader :error_type
|
|
94
|
+
|
|
95
|
+
sig { params(error_type: T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::OrSymbol)).void }
|
|
96
|
+
attr_writer :error_type
|
|
97
|
+
|
|
98
|
+
# An optional public continuation instruction.
|
|
99
|
+
sig { returns(T.nilable(OpenAI::ErrorObject::Misalignment::Steer)) }
|
|
100
|
+
attr_reader :steer
|
|
101
|
+
|
|
102
|
+
sig { params(steer: OpenAI::ErrorObject::Misalignment::Steer::OrHash).void }
|
|
103
|
+
attr_writer :steer
|
|
104
|
+
|
|
105
|
+
sig do
|
|
106
|
+
params(
|
|
107
|
+
|
|
108
|
+
detailed_explanation: String,
|
|
109
|
+
|
|
110
|
+
error_type: T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::OrSymbol),
|
|
111
|
+
|
|
112
|
+
steer: OpenAI::ErrorObject::Misalignment::Steer::OrHash
|
|
113
|
+
)
|
|
114
|
+
.returns(T.attached_class)
|
|
115
|
+
end
|
|
116
|
+
def self.new(
|
|
117
|
+
|
|
118
|
+
# The public explanation for this block.
|
|
119
|
+
detailed_explanation: nil,
|
|
120
|
+
|
|
121
|
+
# An optional classification; clients must accept additional values.
|
|
122
|
+
error_type: nil,
|
|
123
|
+
|
|
124
|
+
# An optional public continuation instruction.
|
|
125
|
+
|
|
126
|
+
steer: nil
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
sig do
|
|
131
|
+
override.returns(
|
|
132
|
+
{
|
|
133
|
+
detailed_explanation: String,
|
|
134
|
+
error_type: T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::OrSymbol),
|
|
135
|
+
steer: OpenAI::ErrorObject::Misalignment::Steer
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
def to_hash
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# An optional classification; clients must accept additional values.
|
|
143
|
+
module ErrorType
|
|
144
|
+
extend OpenAI::Internal::Type::Union
|
|
145
|
+
|
|
146
|
+
Variants = T.type_alias { T.any(String, OpenAI::ErrorObject::Misalignment::ErrorType::TaggedSymbol) }
|
|
147
|
+
|
|
148
|
+
sig { override.returns(T::Array[OpenAI::ErrorObject::Misalignment::ErrorType::Variants]) }
|
|
149
|
+
def self.variants
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
TaggedSymbol = T.type_alias do
|
|
153
|
+
T.all(Symbol, OpenAI::ErrorObject::Misalignment::ErrorType)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
157
|
+
|
|
158
|
+
POTENTIALLY_UNINTENDED_DATA_TRANSFER = T.let(
|
|
159
|
+
:potentially_unintended_data_transfer,
|
|
160
|
+
OpenAI::ErrorObject::Misalignment::ErrorType::TaggedSymbol
|
|
161
|
+
)
|
|
162
|
+
POTENTIALLY_UNINTENDED_DATA_ACCESS = T.let(
|
|
163
|
+
:potentially_unintended_data_access,
|
|
164
|
+
OpenAI::ErrorObject::Misalignment::ErrorType::TaggedSymbol
|
|
165
|
+
)
|
|
166
|
+
POTENTIALLY_UNINTENDED_DESTRUCTIVE_ACTIVITY = T.let(
|
|
167
|
+
:potentially_unintended_destructive_activity,
|
|
168
|
+
OpenAI::ErrorObject::Misalignment::ErrorType::TaggedSymbol
|
|
169
|
+
)
|
|
170
|
+
OTHER = T.let(:other, OpenAI::ErrorObject::Misalignment::ErrorType::TaggedSymbol)
|
|
171
|
+
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
class Steer < OpenAI::Internal::Type::BaseModel
|
|
175
|
+
OrHash = T.type_alias do
|
|
176
|
+
T.any(
|
|
177
|
+
OpenAI::ErrorObject::Misalignment::Steer,
|
|
178
|
+
OpenAI::Internal::AnyHash
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# The public continuation instruction.
|
|
183
|
+
sig { returns(String) }
|
|
184
|
+
attr_accessor :message
|
|
185
|
+
|
|
186
|
+
# An optional public continuation instruction.
|
|
187
|
+
sig do
|
|
188
|
+
params(
|
|
189
|
+
|
|
190
|
+
message: String
|
|
191
|
+
)
|
|
192
|
+
.returns(T.attached_class)
|
|
193
|
+
end
|
|
194
|
+
def self.new(
|
|
195
|
+
|
|
196
|
+
# The public continuation instruction.
|
|
197
|
+
|
|
198
|
+
message:
|
|
199
|
+
)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
sig do
|
|
203
|
+
override.returns(
|
|
204
|
+
{message: String}
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
def to_hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
60
213
|
end
|
|
61
214
|
|
|
62
215
|
end
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-6-astra
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-6-astra
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-6-astra
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -50,7 +50,7 @@ module OpenAI
|
|
|
50
50
|
#
|
|
51
51
|
# - Improve the quality of my chatbot
|
|
52
52
|
# - See how well my chatbot handles customer support
|
|
53
|
-
# - Check if o4-mini is better at my usecase than gpt-
|
|
53
|
+
# - Check if o4-mini is better at my usecase than gpt-6-astra
|
|
54
54
|
sig do
|
|
55
55
|
params(
|
|
56
56
|
|
|
@@ -320,7 +320,7 @@ module OpenAI
|
|
|
320
320
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
321
321
|
attr_accessor :metadata
|
|
322
322
|
|
|
323
|
-
# An optional model to filter by (e.g., 'gpt-
|
|
323
|
+
# An optional model to filter by (e.g., 'gpt-6-astra').
|
|
324
324
|
sig { returns(T.nilable(String)) }
|
|
325
325
|
attr_accessor :model
|
|
326
326
|
|
|
@@ -361,7 +361,7 @@ module OpenAI
|
|
|
361
361
|
# a maximum length of 512 characters.
|
|
362
362
|
metadata: nil,
|
|
363
363
|
|
|
364
|
-
# An optional model to filter by (e.g., 'gpt-
|
|
364
|
+
# An optional model to filter by (e.g., 'gpt-6-astra').
|
|
365
365
|
model: nil,
|
|
366
366
|
|
|
367
367
|
# The type of source. Always `stored_completions`.
|
|
@@ -56,8 +56,6 @@ module OpenAI
|
|
|
56
56
|
sig { returns(T.nilable(OpenAI::Reasoning::Summary::OrSymbol)) }
|
|
57
57
|
attr_accessor :summary
|
|
58
58
|
|
|
59
|
-
# **gpt-5 and o-series models only**
|
|
60
|
-
#
|
|
61
59
|
# Configuration options for
|
|
62
60
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
63
61
|
sig do
|
|
@@ -26,6 +26,14 @@ module OpenAI
|
|
|
26
26
|
sig { returns(T.nilable(T::Array[OpenAI::Responses::CustomTool::AllowedCaller::OrSymbol])) }
|
|
27
27
|
attr_accessor :allowed_callers
|
|
28
28
|
|
|
29
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
30
|
+
# returned on next response creation.
|
|
31
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
32
|
+
attr_reader :async
|
|
33
|
+
|
|
34
|
+
sig { params(async: T::Boolean).void }
|
|
35
|
+
attr_writer :async
|
|
36
|
+
|
|
29
37
|
# Whether this tool should be deferred and discovered via tool search.
|
|
30
38
|
sig { returns(T.nilable(T::Boolean)) }
|
|
31
39
|
attr_reader :defer_loading
|
|
@@ -61,6 +69,8 @@ module OpenAI
|
|
|
61
69
|
|
|
62
70
|
allowed_callers: T.nilable(T::Array[OpenAI::Responses::CustomTool::AllowedCaller::OrSymbol]),
|
|
63
71
|
|
|
72
|
+
async: T::Boolean,
|
|
73
|
+
|
|
64
74
|
defer_loading: T::Boolean,
|
|
65
75
|
|
|
66
76
|
description: String,
|
|
@@ -79,6 +89,10 @@ module OpenAI
|
|
|
79
89
|
# The tool invocation context(s).
|
|
80
90
|
allowed_callers: nil,
|
|
81
91
|
|
|
92
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
93
|
+
# returned on next response creation.
|
|
94
|
+
async: nil,
|
|
95
|
+
|
|
82
96
|
# Whether this tool should be deferred and discovered via tool search.
|
|
83
97
|
defer_loading: nil,
|
|
84
98
|
|
|
@@ -100,6 +114,7 @@ module OpenAI
|
|
|
100
114
|
name: String,
|
|
101
115
|
type: Symbol,
|
|
102
116
|
allowed_callers: T.nilable(T::Array[OpenAI::Responses::CustomTool::AllowedCaller::OrSymbol]),
|
|
117
|
+
async: T::Boolean,
|
|
103
118
|
defer_loading: T::Boolean,
|
|
104
119
|
description: String,
|
|
105
120
|
format_: T.any(OpenAI::CustomToolInputFormat::Text, OpenAI::CustomToolInputFormat::Grammar)
|
|
@@ -34,6 +34,12 @@ module OpenAI
|
|
|
34
34
|
sig { returns(T.nilable(T::Array[OpenAI::Responses::FunctionTool::AllowedCaller::OrSymbol])) }
|
|
35
35
|
attr_accessor :allowed_callers
|
|
36
36
|
|
|
37
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
38
|
+
attr_reader :async
|
|
39
|
+
|
|
40
|
+
sig { params(async: T::Boolean).void }
|
|
41
|
+
attr_writer :async
|
|
42
|
+
|
|
37
43
|
# Whether this function is deferred and loaded via tool search.
|
|
38
44
|
sig { returns(T.nilable(T::Boolean)) }
|
|
39
45
|
attr_reader :defer_loading
|
|
@@ -65,6 +71,8 @@ module OpenAI
|
|
|
65
71
|
|
|
66
72
|
allowed_callers: T.nilable(T::Array[OpenAI::Responses::FunctionTool::AllowedCaller::OrSymbol]),
|
|
67
73
|
|
|
74
|
+
async: T::Boolean,
|
|
75
|
+
|
|
68
76
|
defer_loading: T::Boolean,
|
|
69
77
|
|
|
70
78
|
description: T.nilable(String),
|
|
@@ -89,6 +97,8 @@ module OpenAI
|
|
|
89
97
|
# The tool invocation context(s).
|
|
90
98
|
allowed_callers: nil,
|
|
91
99
|
|
|
100
|
+
async: nil,
|
|
101
|
+
|
|
92
102
|
# Whether this function is deferred and loaded via tool search.
|
|
93
103
|
defer_loading: nil,
|
|
94
104
|
|
|
@@ -114,6 +124,7 @@ module OpenAI
|
|
|
114
124
|
strict: T.nilable(T::Boolean),
|
|
115
125
|
type: Symbol,
|
|
116
126
|
allowed_callers: T.nilable(T::Array[OpenAI::Responses::FunctionTool::AllowedCaller::OrSymbol]),
|
|
127
|
+
async: T::Boolean,
|
|
117
128
|
defer_loading: T::Boolean,
|
|
118
129
|
description: T.nilable(String),
|
|
119
130
|
output_schema: T.nilable(T::Hash[Symbol, T.anything])
|
|
@@ -106,6 +106,14 @@ module OpenAI
|
|
|
106
106
|
}
|
|
107
107
|
attr_accessor :allowed_callers
|
|
108
108
|
|
|
109
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
110
|
+
# returned on next response creation.
|
|
111
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
112
|
+
attr_reader :async
|
|
113
|
+
|
|
114
|
+
sig { params(async: T::Boolean).void }
|
|
115
|
+
attr_writer :async
|
|
116
|
+
|
|
109
117
|
# Whether this function should be deferred and discovered via tool search.
|
|
110
118
|
sig { returns(T.nilable(T::Boolean)) }
|
|
111
119
|
attr_reader :defer_loading
|
|
@@ -139,6 +147,8 @@ module OpenAI
|
|
|
139
147
|
T::Array[OpenAI::Responses::NamespaceTool::Tool::Function::AllowedCaller::OrSymbol]
|
|
140
148
|
),
|
|
141
149
|
|
|
150
|
+
async: T::Boolean,
|
|
151
|
+
|
|
142
152
|
defer_loading: T::Boolean,
|
|
143
153
|
|
|
144
154
|
description: T.nilable(String),
|
|
@@ -160,6 +170,10 @@ module OpenAI
|
|
|
160
170
|
# The tool invocation context(s).
|
|
161
171
|
allowed_callers: nil,
|
|
162
172
|
|
|
173
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
174
|
+
# returned on next response creation.
|
|
175
|
+
async: nil,
|
|
176
|
+
|
|
163
177
|
# Whether this function should be deferred and discovered via tool search.
|
|
164
178
|
defer_loading: nil,
|
|
165
179
|
|
|
@@ -188,6 +202,7 @@ module OpenAI
|
|
|
188
202
|
allowed_callers: T.nilable(
|
|
189
203
|
T::Array[OpenAI::Responses::NamespaceTool::Tool::Function::AllowedCaller::OrSymbol]
|
|
190
204
|
),
|
|
205
|
+
async: T::Boolean,
|
|
191
206
|
defer_loading: T::Boolean,
|
|
192
207
|
description: T.nilable(String),
|
|
193
208
|
output_schema: T.nilable(T::Hash[Symbol, T.anything]),
|
|
@@ -53,9 +53,9 @@ module OpenAI
|
|
|
53
53
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
54
54
|
attr_accessor :metadata
|
|
55
55
|
|
|
56
|
-
# Model ID used to generate the response, like `gpt-
|
|
57
|
-
#
|
|
58
|
-
#
|
|
56
|
+
# Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
57
|
+
# range of models with different capabilities, performance characteristics, and
|
|
58
|
+
# price points. Refer to the
|
|
59
59
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
60
60
|
# available models.
|
|
61
61
|
sig { returns(OpenAI::ResponsesModel::Variants) }
|
|
@@ -215,8 +215,6 @@ module OpenAI
|
|
|
215
215
|
sig { returns(T.nilable(OpenAI::Responses::Response::PromptCacheRetention::TaggedSymbol)) }
|
|
216
216
|
attr_accessor :prompt_cache_retention
|
|
217
217
|
|
|
218
|
-
# **gpt-5 and o-series models only**
|
|
219
|
-
#
|
|
220
218
|
# Configuration options for
|
|
221
219
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
222
220
|
sig { returns(T.nilable(OpenAI::Reasoning)) }
|
|
@@ -477,9 +475,9 @@ module OpenAI
|
|
|
477
475
|
# a maximum length of 512 characters.
|
|
478
476
|
metadata:,
|
|
479
477
|
|
|
480
|
-
# Model ID used to generate the response, like `gpt-
|
|
481
|
-
#
|
|
482
|
-
#
|
|
478
|
+
# Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
479
|
+
# range of models with different capabilities, performance characteristics, and
|
|
480
|
+
# price points. Refer to the
|
|
483
481
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
484
482
|
# available models.
|
|
485
483
|
model:,
|
|
@@ -600,8 +598,6 @@ module OpenAI
|
|
|
600
598
|
# `prompt_cache_retention` is not specified.
|
|
601
599
|
prompt_cache_retention: nil,
|
|
602
600
|
|
|
603
|
-
# **gpt-5 and o-series models only**
|
|
604
|
-
#
|
|
605
601
|
# Configuration options for
|
|
606
602
|
# [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
607
603
|
reasoning: nil,
|
|
@@ -733,7 +729,9 @@ module OpenAI
|
|
|
733
729
|
)
|
|
734
730
|
end
|
|
735
731
|
|
|
736
|
-
# The reason why the response is incomplete.
|
|
732
|
+
# The reason why the response is incomplete. `steered` means the response stopped
|
|
733
|
+
# at a safe output boundary after a WebSocket `response.steer` event. The server
|
|
734
|
+
# can then create a successor response automatically with the queued input.
|
|
737
735
|
sig { returns(T.nilable(OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol)) }
|
|
738
736
|
attr_reader :reason
|
|
739
737
|
|
|
@@ -750,7 +748,9 @@ module OpenAI
|
|
|
750
748
|
end
|
|
751
749
|
def self.new(
|
|
752
750
|
|
|
753
|
-
# The reason why the response is incomplete.
|
|
751
|
+
# The reason why the response is incomplete. `steered` means the response stopped
|
|
752
|
+
# at a safe output boundary after a WebSocket `response.steer` event. The server
|
|
753
|
+
# can then create a successor response automatically with the queued input.
|
|
754
754
|
|
|
755
755
|
reason: nil
|
|
756
756
|
)
|
|
@@ -764,7 +764,9 @@ module OpenAI
|
|
|
764
764
|
def to_hash
|
|
765
765
|
end
|
|
766
766
|
|
|
767
|
-
# The reason why the response is incomplete.
|
|
767
|
+
# The reason why the response is incomplete. `steered` means the response stopped
|
|
768
|
+
# at a safe output boundary after a WebSocket `response.steer` event. The server
|
|
769
|
+
# can then create a successor response automatically with the queued input.
|
|
768
770
|
module Reason
|
|
769
771
|
extend OpenAI::Internal::Type::Enum
|
|
770
772
|
|
|
@@ -775,10 +777,12 @@ module OpenAI
|
|
|
775
777
|
:max_output_tokens,
|
|
776
778
|
OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol
|
|
777
779
|
)
|
|
780
|
+
MAX_MESSAGES = T.let(:max_messages, OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol)
|
|
778
781
|
CONTENT_FILTER = T.let(
|
|
779
782
|
:content_filter,
|
|
780
783
|
OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol
|
|
781
784
|
)
|
|
785
|
+
STEERED = T.let(:steered, OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol)
|
|
782
786
|
|
|
783
787
|
sig { override.returns(T::Array[OpenAI::Responses::Response::IncompleteDetails::Reason::TaggedSymbol]) }
|
|
784
788
|
def self.values
|
|
@@ -17,9 +17,9 @@ module OpenAI
|
|
|
17
17
|
)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
# Model ID used to generate the response, like `gpt-
|
|
21
|
-
#
|
|
22
|
-
#
|
|
20
|
+
# Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
21
|
+
# range of models with different capabilities, performance characteristics, and
|
|
22
|
+
# price points. Refer to the
|
|
23
23
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
24
24
|
# available models.
|
|
25
25
|
sig { returns(T.nilable(T.any(OpenAI::Responses::ResponseCompactParams::Model::OrSymbol, String))) }
|
|
@@ -112,9 +112,9 @@ module OpenAI
|
|
|
112
112
|
end
|
|
113
113
|
def self.new(
|
|
114
114
|
|
|
115
|
-
# Model ID used to generate the response, like `gpt-
|
|
116
|
-
#
|
|
117
|
-
#
|
|
115
|
+
# Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
116
|
+
# range of models with different capabilities, performance characteristics, and
|
|
117
|
+
# price points. Refer to the
|
|
118
118
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
119
119
|
# available models.
|
|
120
120
|
model:,
|
|
@@ -192,9 +192,9 @@ module OpenAI
|
|
|
192
192
|
def to_hash
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
-
# Model ID used to generate the response, like `gpt-
|
|
196
|
-
#
|
|
197
|
-
#
|
|
195
|
+
# Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
196
|
+
# range of models with different capabilities, performance characteristics, and
|
|
197
|
+
# price points. Refer to the
|
|
198
198
|
# [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
199
199
|
# available models.
|
|
200
200
|
module Model
|
|
@@ -212,6 +212,7 @@ module OpenAI
|
|
|
212
212
|
|
|
213
213
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
214
214
|
|
|
215
|
+
GPT_6_ASTRA = T.let(:"gpt-6-astra", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
215
216
|
GPT_5_6_SOL = T.let(:"gpt-5.6-sol", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
216
217
|
GPT_5_6_TERRA = T.let(:"gpt-5.6-terra", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
217
218
|
GPT_5_6_LUNA = T.let(:"gpt-5.6-luna", OpenAI::Responses::ResponseCompactParams::Model::TaggedSymbol)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
|
|
6
|
+
module Responses
|
|
7
|
+
|
|
8
|
+
class ResponseConfigurationUpdateItem < OpenAI::Internal::Type::BaseModel
|
|
9
|
+
|
|
10
|
+
OrHash = T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
OpenAI::Responses::ResponseConfigurationUpdateItem,
|
|
13
|
+
OpenAI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The unique ID of the configuration update item.
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The item type. Always `configuration_update`.
|
|
22
|
+
sig { returns(Symbol) }
|
|
23
|
+
attr_accessor :type
|
|
24
|
+
|
|
25
|
+
# The reasoning configuration applied by this update.
|
|
26
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning)) }
|
|
27
|
+
attr_reader :reasoning
|
|
28
|
+
|
|
29
|
+
sig { params(reasoning: OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning::OrHash).void }
|
|
30
|
+
attr_writer :reasoning
|
|
31
|
+
|
|
32
|
+
# A configuration update that applies to subsequent responses until it is replaced
|
|
33
|
+
# by another configuration update.
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
|
|
37
|
+
id: String,
|
|
38
|
+
|
|
39
|
+
reasoning: OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning::OrHash,
|
|
40
|
+
|
|
41
|
+
type: Symbol
|
|
42
|
+
)
|
|
43
|
+
.returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
|
|
47
|
+
# The unique ID of the configuration update item.
|
|
48
|
+
id:,
|
|
49
|
+
|
|
50
|
+
# The reasoning configuration applied by this update.
|
|
51
|
+
reasoning: nil,
|
|
52
|
+
|
|
53
|
+
# The item type. Always `configuration_update`.
|
|
54
|
+
|
|
55
|
+
type: :configuration_update
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
sig do
|
|
60
|
+
override.returns(
|
|
61
|
+
{id: String, type: Symbol, reasoning: OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning}
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
def to_hash
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
class Reasoning < OpenAI::Internal::Type::BaseModel
|
|
68
|
+
OrHash = T.type_alias do
|
|
69
|
+
T.any(
|
|
70
|
+
OpenAI::Responses::ResponseConfigurationUpdateItem::Reasoning,
|
|
71
|
+
OpenAI::Internal::AnyHash
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# The reasoning effort used for subsequent responses until another configuration
|
|
76
|
+
# update replaces it.
|
|
77
|
+
sig { returns(T.nilable(OpenAI::ReasoningEffort::OrSymbol)) }
|
|
78
|
+
attr_accessor :effort
|
|
79
|
+
|
|
80
|
+
# The reasoning configuration applied by this update.
|
|
81
|
+
sig do
|
|
82
|
+
params(
|
|
83
|
+
|
|
84
|
+
effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol)
|
|
85
|
+
)
|
|
86
|
+
.returns(T.attached_class)
|
|
87
|
+
end
|
|
88
|
+
def self.new(
|
|
89
|
+
|
|
90
|
+
# The reasoning effort used for subsequent responses until another configuration
|
|
91
|
+
# update replaces it.
|
|
92
|
+
|
|
93
|
+
effort: nil
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
sig do
|
|
98
|
+
override.returns(
|
|
99
|
+
{effort: T.nilable(OpenAI::ReasoningEffort::OrSymbol)}
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
def to_hash
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
end
|
|
112
|
+
end
|