openai 0.99.0 → 0.101.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 +26 -0
- data/README.md +1 -1
- data/bedrock.md +17 -1
- data/lib/openai/client.rb +13 -0
- data/lib/openai/helpers/agents/session_stream.rb +11 -36
- data/lib/openai/helpers/agents/tools.rb +34 -4
- data/lib/openai/helpers/beta/agents/creation_stream.rb +26 -0
- data/lib/openai/helpers/beta/agents/function_tool.rb +11 -4
- data/lib/openai/helpers/beta/agents/tool_dispatcher.rb +74 -0
- data/lib/openai/helpers/beta/agents/tool_error.rb +28 -0
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_completions_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_completions_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_costs_params.rb +16 -4
- data/lib/openai/models/admin/organization/usage_costs_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_file_search_calls_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_images_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +125 -3
- data/lib/openai/models/admin/organization/usage_web_search_calls_params.rb +9 -4
- data/lib/openai/models/admin/organization/usage_web_search_calls_response.rb +125 -3
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +6 -6
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +3 -6
- data/lib/openai/models/beta/agents/sessions/turns/item_list_params.rb +79 -0
- data/lib/openai/models/beta/beta_response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/beta/beta_response_error.rb +12 -1
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +1166 -3
- data/lib/openai/models/beta/beta_responses_server_event.rb +12 -1
- data/lib/openai/models/beta/beta_tool.rb +12 -9
- data/lib/openai/models/beta/beta_tool_search_output_namespace_tool.rb +176 -0
- data/lib/openai/models/beta/environment_param.rb +6 -6
- data/lib/openai/models/beta/session_turn_error.rb +9 -0
- data/lib/openai/models/chat/chat_completion_chunk.rb +85 -18
- data/lib/openai/models/decision.rb +313 -0
- data/lib/openai/models/decision_create_params.rb +233 -0
- data/lib/openai/models/decision_input_image.rb +53 -0
- data/lib/openai/models/decision_input_message.rb +60 -0
- data/lib/openai/models/decision_input_part.rb +20 -0
- data/lib/openai/models/decision_input_text.rb +21 -0
- data/lib/openai/models/error_object.rb +12 -1
- data/lib/openai/models/eval_create_params.rb +1 -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/fine_tuning/job_list_params.rb +14 -4
- data/lib/openai/models/graders/score_model_grader.rb +2 -2
- data/lib/openai/models/image_edit_params.rb +12 -9
- data/lib/openai/models/realtime/realtime_client_event.rb +9 -0
- data/lib/openai/models/realtime/session_update_event.rb +16 -0
- data/lib/openai/models/responses/response_computer_tool_call_output_item.rb +2 -2
- data/lib/openai/models/responses/response_error.rb +12 -1
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +1166 -3
- data/lib/openai/models/responses/responses_server_event.rb +12 -1
- data/lib/openai/models/responses/tool.rb +12 -9
- data/lib/openai/models/responses/tool_search_output_namespace_tool.rb +174 -0
- data/lib/openai/models/video_create_error.rb +12 -1
- data/lib/openai/models.rb +12 -0
- data/lib/openai/providers/bedrock.rb +20 -1
- data/lib/openai/resources/admin/organization/usage.rb +15 -6
- data/lib/openai/resources/beta/agents/environments/templates.rb +3 -4
- data/lib/openai/resources/beta/agents/sessions/turns/items.rb +68 -0
- data/lib/openai/resources/beta/agents/sessions/turns.rb +4 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -2
- data/lib/openai/resources/decisions.rb +59 -0
- data/lib/openai/resources/fine_tuning/jobs.rb +7 -2
- data/lib/openai/resources/images.rb +8 -6
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +11 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/helpers/agents.rbi +2 -0
- data/rbi/openai/helpers/beta/agents/function_tool.rbi +8 -3
- data/rbi/openai/helpers/beta/agents/tool_error.rbi +19 -0
- data/rbi/openai/helpers/beta/agents.rbi +12 -0
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_completions_params.rbi +9 -4
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +16 -4
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_file_search_calls_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +194 -1
- data/rbi/openai/models/admin/organization/usage_web_search_calls_params.rbi +12 -4
- data/rbi/openai/models/admin/organization/usage_web_search_calls_response.rbi +194 -1
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +6 -6
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +3 -6
- data/rbi/openai/models/beta/agents/sessions/turns/item_list_params.rbi +139 -0
- data/rbi/openai/models/beta/beta_response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/beta/beta_response_error.rbi +12 -0
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +1893 -18
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +12 -0
- data/rbi/openai/models/beta/beta_tool.rbi +12 -9
- data/rbi/openai/models/beta/beta_tool_search_output_namespace_tool.rbi +272 -0
- data/rbi/openai/models/beta/environment_param.rbi +6 -6
- data/rbi/openai/models/beta/session_turn_error.rbi +18 -0
- data/rbi/openai/models/chat/chat_completion_chunk.rbi +123 -17
- data/rbi/openai/models/decision.rbi +586 -0
- data/rbi/openai/models/decision_create_params.rbi +435 -0
- data/rbi/openai/models/decision_input_image.rbi +81 -0
- data/rbi/openai/models/decision_input_message.rbi +96 -0
- data/rbi/openai/models/decision_input_part.rbi +24 -0
- data/rbi/openai/models/decision_input_text.rbi +49 -0
- data/rbi/openai/models/error_object.rbi +12 -0
- data/rbi/openai/models/eval_create_params.rbi +1 -1
- 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/fine_tuning/job_list_params.rbi +14 -4
- data/rbi/openai/models/graders/score_model_grader.rbi +2 -2
- data/rbi/openai/models/image_edit_params.rbi +12 -9
- data/rbi/openai/models/realtime/session_update_event.rbi +16 -0
- data/rbi/openai/models/responses/response_computer_tool_call_output_item.rbi +2 -2
- data/rbi/openai/models/responses/response_error.rbi +12 -0
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +1901 -18
- data/rbi/openai/models/responses/responses_server_event.rbi +12 -0
- data/rbi/openai/models/responses/tool.rbi +12 -9
- data/rbi/openai/models/responses/tool_search_output_namespace_tool.rbi +272 -0
- data/rbi/openai/models/video_create_error.rbi +12 -0
- data/rbi/openai/models.rbi +12 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +15 -6
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +3 -4
- data/rbi/openai/resources/beta/agents/sessions/turns/items.rbi +62 -0
- data/rbi/openai/resources/beta/agents/sessions/turns.rbi +3 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +2 -0
- data/rbi/openai/resources/decisions.rbi +57 -0
- data/rbi/openai/resources/fine_tuning/jobs.rbi +7 -2
- data/rbi/openai/resources/images.rbi +8 -6
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/helpers/agents.rbs +3 -0
- data/sig/openai/helpers/beta/agents/function_tool.rbs +5 -2
- data/sig/openai/helpers/beta/agents/tool_error.rbs +17 -0
- data/sig/openai/helpers/beta/agents.rbs +5 -0
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +14 -6
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +25 -7
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_images_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +87 -2
- data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +19 -7
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +87 -2
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +4 -4
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +2 -4
- data/sig/openai/models/beta/agents/sessions/turns/item_list_params.rbs +91 -0
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/beta/beta_response_error.rbs +10 -0
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +993 -4
- data/sig/openai/models/beta/beta_responses_server_event.rbs +10 -0
- data/sig/openai/models/beta/beta_tool.rbs +8 -6
- data/sig/openai/models/beta/beta_tool_search_output_namespace_tool.rbs +162 -0
- data/sig/openai/models/beta/environment_param.rbs +4 -4
- data/sig/openai/models/beta/session_turn_error.rbs +12 -0
- data/sig/openai/models/chat/chat_completion_chunk.rbs +96 -12
- data/sig/openai/models/decision.rbs +296 -0
- data/sig/openai/models/decision_create_params.rbs +227 -0
- data/sig/openai/models/decision_input_image.rbs +51 -0
- data/sig/openai/models/decision_input_message.rbs +57 -0
- data/sig/openai/models/decision_input_part.rbs +12 -0
- data/sig/openai/models/decision_input_text.rbs +15 -0
- data/sig/openai/models/error_object.rbs +10 -0
- data/sig/openai/models/eval_create_params.rbs +1 -1
- data/sig/openai/models/eval_create_response.rbs +1 -1
- data/sig/openai/models/eval_list_response.rbs +1 -1
- data/sig/openai/models/eval_retrieve_response.rbs +1 -1
- data/sig/openai/models/eval_update_response.rbs +1 -1
- data/sig/openai/models/fine_tuning/job_list_params.rbs +14 -4
- data/sig/openai/models/graders/score_model_grader.rbs +3 -3
- data/sig/openai/models/image_edit_params.rbs +8 -6
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +10 -0
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +993 -4
- data/sig/openai/models/responses/responses_server_event.rbs +10 -0
- data/sig/openai/models/responses/tool.rbs +8 -6
- data/sig/openai/models/responses/tool_search_output_namespace_tool.rbs +160 -0
- data/sig/openai/models/video_create_error.rbs +10 -0
- data/sig/openai/models.rbs +12 -0
- data/sig/openai/resources/beta/agents/sessions/turns/items.rbs +24 -0
- data/sig/openai/resources/beta/agents/sessions/turns.rbs +2 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +1 -0
- data/sig/openai/resources/decisions.rbs +15 -0
- metadata +38 -1
|
@@ -3376,6 +3376,7 @@ module OpenAI
|
|
|
3376
3376
|
{
|
|
3377
3377
|
?detailed_explanation: String,
|
|
3378
3378
|
?error_type: OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::error_type,
|
|
3379
|
+
?review_target: String?,
|
|
3379
3380
|
?steer: OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::Steer
|
|
3380
3381
|
}
|
|
3381
3382
|
|
|
@@ -3394,6 +3395,10 @@ module OpenAI
|
|
|
3394
3395
|
OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::error_type
|
|
3395
3396
|
) -> OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::error_type
|
|
3396
3397
|
|
|
3398
|
+
# An opaque target for explicitly continuing this review, or null when
|
|
3399
|
+
# unavailable.
|
|
3400
|
+
attr_accessor review_target: String?
|
|
3401
|
+
|
|
3397
3402
|
# An optional public continuation instruction.
|
|
3398
3403
|
attr_reader steer: OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::Steer?
|
|
3399
3404
|
|
|
@@ -3406,17 +3411,22 @@ module OpenAI
|
|
|
3406
3411
|
# The public explanation for this block.
|
|
3407
3412
|
# @param error_type
|
|
3408
3413
|
# An optional classification; clients must accept additional values.
|
|
3414
|
+
# @param review_target
|
|
3415
|
+
# An opaque target for explicitly continuing this review, or null when
|
|
3416
|
+
# unavailable.
|
|
3409
3417
|
# @param steer
|
|
3410
3418
|
# An optional public continuation instruction.
|
|
3411
3419
|
def initialize: (
|
|
3412
3420
|
?detailed_explanation: String,
|
|
3413
3421
|
?error_type: OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::error_type,
|
|
3422
|
+
?review_target: String?,
|
|
3414
3423
|
?steer: OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::Steer
|
|
3415
3424
|
) -> void
|
|
3416
3425
|
|
|
3417
3426
|
def to_hash: -> {
|
|
3418
3427
|
?detailed_explanation: String,
|
|
3419
3428
|
?error_type: OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::error_type,
|
|
3429
|
+
?review_target: String?,
|
|
3420
3430
|
?steer: OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment::Steer
|
|
3421
3431
|
}
|
|
3422
3432
|
|
|
@@ -643,9 +643,10 @@ module OpenAI
|
|
|
643
643
|
OpenAI::Models::Beta::BetaTool::ImageGeneration::background
|
|
644
644
|
) -> OpenAI::Models::Beta::BetaTool::ImageGeneration::background
|
|
645
645
|
|
|
646
|
-
#
|
|
647
|
-
#
|
|
648
|
-
# `gpt-image-
|
|
646
|
+
# Control how much effort the model will exert to match the style and features,
|
|
647
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
648
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
649
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
649
650
|
attr_accessor input_fidelity: OpenAI::Models::Beta::BetaTool::ImageGeneration::input_fidelity?
|
|
650
651
|
|
|
651
652
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
@@ -759,9 +760,10 @@ module OpenAI
|
|
|
759
760
|
# `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
760
761
|
# set the output format to `png` or `webp`.
|
|
761
762
|
# @param input_fidelity
|
|
762
|
-
#
|
|
763
|
-
#
|
|
764
|
-
# `gpt-image-
|
|
763
|
+
# Control how much effort the model will exert to match the style and features,
|
|
764
|
+
# especially facial features, of input images. Supports `high` and `low` on
|
|
765
|
+
# `gpt-image-1` and `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For
|
|
766
|
+
# `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.
|
|
765
767
|
# @param input_image_mask
|
|
766
768
|
# Optional mask for inpainting. Contains `image_url` (string, optional) and
|
|
767
769
|
# `file_id` (string, optional).
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
class BetaToolSearchOutputNamespaceTool = Beta::BetaToolSearchOutputNamespaceTool
|
|
4
|
+
|
|
5
|
+
module Beta
|
|
6
|
+
type beta_tool_search_output_namespace_tool =
|
|
7
|
+
{
|
|
8
|
+
description: String,
|
|
9
|
+
name: String,
|
|
10
|
+
tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool],
|
|
11
|
+
?type: :namespace
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class BetaToolSearchOutputNamespaceTool < OpenAI::Internal::Type::BaseModel
|
|
15
|
+
# A description of the namespace shown to the model.
|
|
16
|
+
attr_accessor description: String
|
|
17
|
+
|
|
18
|
+
# The namespace name used in tool calls (for example, `crm`).
|
|
19
|
+
attr_accessor name: String
|
|
20
|
+
|
|
21
|
+
# The function/custom tools loaded inside this namespace.
|
|
22
|
+
attr_accessor tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool]
|
|
23
|
+
|
|
24
|
+
# The type of the tool. Always `namespace`.
|
|
25
|
+
attr_accessor type: :namespace
|
|
26
|
+
|
|
27
|
+
# @param description
|
|
28
|
+
# A description of the namespace shown to the model.
|
|
29
|
+
# @param name
|
|
30
|
+
# The namespace name used in tool calls (for example, `crm`).
|
|
31
|
+
# @param tools
|
|
32
|
+
# The function/custom tools loaded inside this namespace.
|
|
33
|
+
# @param type
|
|
34
|
+
# The type of the tool. Always `namespace`.
|
|
35
|
+
def initialize: (
|
|
36
|
+
description: String,
|
|
37
|
+
name: String,
|
|
38
|
+
tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool],
|
|
39
|
+
?type: :namespace
|
|
40
|
+
) -> void
|
|
41
|
+
|
|
42
|
+
def to_hash: -> {
|
|
43
|
+
description: String,
|
|
44
|
+
name: String,
|
|
45
|
+
tools: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool],
|
|
46
|
+
?type: :namespace
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type tool =
|
|
50
|
+
OpenAI::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function
|
|
51
|
+
| OpenAI::Beta::BetaCustomTool
|
|
52
|
+
|
|
53
|
+
module Tool
|
|
54
|
+
extend OpenAI::Internal::Type::Union
|
|
55
|
+
|
|
56
|
+
type function =
|
|
57
|
+
{
|
|
58
|
+
name: String,
|
|
59
|
+
?type: :function,
|
|
60
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?,
|
|
61
|
+
?async: bool,
|
|
62
|
+
?defer_loading: bool,
|
|
63
|
+
?description: String?,
|
|
64
|
+
?output_schema: ::Hash[Symbol, top]?,
|
|
65
|
+
?parameters: top?,
|
|
66
|
+
?strict: bool?
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
class Function < OpenAI::Internal::Type::BaseModel
|
|
70
|
+
# The name of the loaded function tool.
|
|
71
|
+
attr_accessor name: String
|
|
72
|
+
|
|
73
|
+
attr_accessor type: :function
|
|
74
|
+
|
|
75
|
+
# The tool invocation context(s).
|
|
76
|
+
attr_accessor allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?
|
|
77
|
+
|
|
78
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
79
|
+
# returned on next response creation.
|
|
80
|
+
attr_reader async: bool?
|
|
81
|
+
|
|
82
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
83
|
+
# returned on next response creation.
|
|
84
|
+
def async=: (bool) -> bool
|
|
85
|
+
|
|
86
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
87
|
+
attr_reader defer_loading: bool?
|
|
88
|
+
|
|
89
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
90
|
+
def defer_loading=: (bool) -> bool
|
|
91
|
+
|
|
92
|
+
attr_accessor description: String?
|
|
93
|
+
|
|
94
|
+
# A JSON Schema describing the JSON value encoded in string outputs for this
|
|
95
|
+
# function tool. This does not describe content-array outputs.
|
|
96
|
+
attr_accessor output_schema: ::Hash[Symbol, top]?
|
|
97
|
+
|
|
98
|
+
attr_accessor parameters: top?
|
|
99
|
+
|
|
100
|
+
# Whether to enforce strict parameter validation. If omitted, Responses attempts
|
|
101
|
+
# to use strict validation when the schema is compatible, and falls back to
|
|
102
|
+
# non-strict validation otherwise.
|
|
103
|
+
attr_accessor strict: bool?
|
|
104
|
+
|
|
105
|
+
# @param name
|
|
106
|
+
# The name of the loaded function tool.
|
|
107
|
+
# @param allowed_callers
|
|
108
|
+
# The tool invocation context(s).
|
|
109
|
+
# @param async
|
|
110
|
+
# Whether the tool response can be returned asynchronously versus immediately
|
|
111
|
+
# returned on next response creation.
|
|
112
|
+
# @param defer_loading
|
|
113
|
+
# Whether this function should be deferred and discovered via tool search.
|
|
114
|
+
# @param output_schema
|
|
115
|
+
# A JSON Schema describing the JSON value encoded in string outputs for this
|
|
116
|
+
# function tool. This does not describe content-array outputs.
|
|
117
|
+
# @param strict
|
|
118
|
+
# Whether to enforce strict parameter validation. If omitted, Responses attempts
|
|
119
|
+
# to use strict validation when the schema is compatible, and falls back to
|
|
120
|
+
# non-strict validation otherwise.
|
|
121
|
+
def initialize: (
|
|
122
|
+
name: String,
|
|
123
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?,
|
|
124
|
+
?async: bool,
|
|
125
|
+
?defer_loading: bool,
|
|
126
|
+
?description: String?,
|
|
127
|
+
?output_schema: ::Hash[Symbol, top]?,
|
|
128
|
+
?parameters: top?,
|
|
129
|
+
?strict: bool?,
|
|
130
|
+
?type: :function
|
|
131
|
+
) -> void
|
|
132
|
+
|
|
133
|
+
def to_hash: -> {
|
|
134
|
+
name: String,
|
|
135
|
+
?type: :function,
|
|
136
|
+
?allowed_callers: ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]?,
|
|
137
|
+
?async: bool,
|
|
138
|
+
?defer_loading: bool,
|
|
139
|
+
?description: String?,
|
|
140
|
+
?output_schema: ::Hash[Symbol, top]?,
|
|
141
|
+
?parameters: top?,
|
|
142
|
+
?strict: bool?
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
type allowed_caller = :direct | :programmatic
|
|
146
|
+
|
|
147
|
+
module AllowedCaller
|
|
148
|
+
extend OpenAI::Internal::Type::Enum
|
|
149
|
+
|
|
150
|
+
DIRECT: :direct
|
|
151
|
+
PROGRAMMATIC: :programmatic
|
|
152
|
+
|
|
153
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::Tool::Function::allowed_caller]
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaToolSearchOutputNamespaceTool::tool]
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
@@ -72,8 +72,8 @@ module OpenAI
|
|
|
72
72
|
# Files available before the agent starts. Defaults to an empty list.
|
|
73
73
|
attr_accessor files: ::Array[OpenAI::Models::Beta::hosted_environment_file_param]?
|
|
74
74
|
|
|
75
|
-
# Network access policy for the environment.
|
|
76
|
-
#
|
|
75
|
+
# Network access policy for the environment. If omitted, the API version
|
|
76
|
+
# determines whether network access is enabled or disabled.
|
|
77
77
|
attr_accessor network: OpenAI::Beta::EnvironmentParam::OpenAIHosted::Network?
|
|
78
78
|
|
|
79
79
|
# Packages to install in the environment. Defaults to empty package lists.
|
|
@@ -105,8 +105,8 @@ module OpenAI
|
|
|
105
105
|
# @param files
|
|
106
106
|
# Files available before the agent starts. Defaults to an empty list.
|
|
107
107
|
# @param network
|
|
108
|
-
# Network access policy for the environment.
|
|
109
|
-
#
|
|
108
|
+
# Network access policy for the environment. If omitted, the API version
|
|
109
|
+
# determines whether network access is enabled or disabled.
|
|
110
110
|
# @param packages
|
|
111
111
|
# Packages to install in the environment. Defaults to empty package lists.
|
|
112
112
|
# @param plugins
|
|
@@ -29,6 +29,9 @@ module OpenAI
|
|
|
29
29
|
:context_length_exceeded
|
|
30
30
|
| :session_budget_exceeded
|
|
31
31
|
| :usage_limit_exceeded
|
|
32
|
+
| :project_spend_limit_exceeded
|
|
33
|
+
| :organization_spend_limit_exceeded
|
|
34
|
+
| :organization_usage_limit_exceeded
|
|
32
35
|
| :credit_balance_exhausted
|
|
33
36
|
| :rate_limit_exceeded
|
|
34
37
|
| :flex_unavailable
|
|
@@ -58,6 +61,15 @@ module OpenAI
|
|
|
58
61
|
# The organization has reached a usage, plan, or billing limit.
|
|
59
62
|
USAGE_LIMIT_EXCEEDED: :usage_limit_exceeded
|
|
60
63
|
|
|
64
|
+
# The project has reached its enforced spend limit.
|
|
65
|
+
PROJECT_SPEND_LIMIT_EXCEEDED: :project_spend_limit_exceeded
|
|
66
|
+
|
|
67
|
+
# The organization has reached its enforced spend limit.
|
|
68
|
+
ORGANIZATION_SPEND_LIMIT_EXCEEDED: :organization_spend_limit_exceeded
|
|
69
|
+
|
|
70
|
+
# The organization has reached its OpenAI-assigned usage limit.
|
|
71
|
+
ORGANIZATION_USAGE_LIMIT_EXCEEDED: :organization_usage_limit_exceeded
|
|
72
|
+
|
|
61
73
|
# The organization has no API credits remaining.
|
|
62
74
|
CREDIT_BALANCE_EXHAUSTED: :credit_balance_exhausted
|
|
63
75
|
|
|
@@ -177,58 +177,65 @@ module OpenAI
|
|
|
177
177
|
type choice =
|
|
178
178
|
{
|
|
179
179
|
delta: OpenAI::Chat::ChatCompletionChunk::Choice::Delta,
|
|
180
|
-
finish_reason: OpenAI::Models::Chat::ChatCompletionChunk::Choice::finish_reason?,
|
|
181
180
|
index: Integer,
|
|
181
|
+
?finish_reason: OpenAI::Models::Chat::ChatCompletionChunk::Choice::finish_reason?,
|
|
182
182
|
?logprobs: OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs?
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
class Choice < OpenAI::Internal::Type::BaseModel
|
|
186
|
-
# A chat completion delta generated by streamed model responses.
|
|
186
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
187
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
188
|
+
# final audio update contains only its expiry timestamp.
|
|
187
189
|
attr_accessor delta: OpenAI::Chat::ChatCompletionChunk::Choice::Delta
|
|
188
190
|
|
|
191
|
+
# The index of the choice in the list of choices.
|
|
192
|
+
attr_accessor index: Integer
|
|
193
|
+
|
|
189
194
|
# The reason the model stopped generating tokens. This will be `stop` if the model
|
|
190
195
|
# hit a natural stop point or a provided stop sequence, `length` if the maximum
|
|
191
196
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
192
197
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
193
198
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
194
|
-
# function.
|
|
199
|
+
# function. Omitted from the final audio update containing only
|
|
200
|
+
# `delta.audio.expires_at`.
|
|
195
201
|
attr_accessor finish_reason: OpenAI::Models::Chat::ChatCompletionChunk::Choice::finish_reason?
|
|
196
202
|
|
|
197
|
-
# The index of the choice in the list of choices.
|
|
198
|
-
attr_accessor index: Integer
|
|
199
|
-
|
|
200
203
|
# Log probability information for the choice.
|
|
201
204
|
attr_accessor logprobs: OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs?
|
|
202
205
|
|
|
203
206
|
# @param delta
|
|
204
|
-
# A chat completion delta generated by streamed model responses.
|
|
207
|
+
# A chat completion delta generated by streamed model responses. Streamed audio
|
|
208
|
+
# can arrive in partial updates with an ID, base64 data, or transcript text. The
|
|
209
|
+
# final audio update contains only its expiry timestamp.
|
|
210
|
+
# @param index
|
|
211
|
+
# The index of the choice in the list of choices.
|
|
205
212
|
# @param finish_reason
|
|
206
213
|
# The reason the model stopped generating tokens. This will be `stop` if the model
|
|
207
214
|
# hit a natural stop point or a provided stop sequence, `length` if the maximum
|
|
208
215
|
# number of tokens specified in the request was reached, `content_filter` if
|
|
209
216
|
# content was omitted due to a flag from our content filters, `tool_calls` if the
|
|
210
217
|
# model called a tool, or `function_call` (deprecated) if the model called a
|
|
211
|
-
# function.
|
|
212
|
-
#
|
|
213
|
-
# The index of the choice in the list of choices.
|
|
218
|
+
# function. Omitted from the final audio update containing only
|
|
219
|
+
# `delta.audio.expires_at`.
|
|
214
220
|
# @param logprobs
|
|
215
221
|
# Log probability information for the choice.
|
|
216
222
|
def initialize: (
|
|
217
223
|
delta: OpenAI::Chat::ChatCompletionChunk::Choice::Delta,
|
|
218
|
-
finish_reason: OpenAI::Models::Chat::ChatCompletionChunk::Choice::finish_reason?,
|
|
219
224
|
index: Integer,
|
|
225
|
+
?finish_reason: OpenAI::Models::Chat::ChatCompletionChunk::Choice::finish_reason?,
|
|
220
226
|
?logprobs: OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs?
|
|
221
227
|
) -> void
|
|
222
228
|
|
|
223
229
|
def to_hash: -> {
|
|
224
230
|
delta: OpenAI::Chat::ChatCompletionChunk::Choice::Delta,
|
|
225
|
-
finish_reason: OpenAI::Models::Chat::ChatCompletionChunk::Choice::finish_reason?,
|
|
226
231
|
index: Integer,
|
|
232
|
+
?finish_reason: OpenAI::Models::Chat::ChatCompletionChunk::Choice::finish_reason?,
|
|
227
233
|
?logprobs: OpenAI::Chat::ChatCompletionChunk::Choice::Logprobs?
|
|
228
234
|
}
|
|
229
235
|
|
|
230
236
|
type delta =
|
|
231
237
|
{
|
|
238
|
+
?audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio,
|
|
232
239
|
?content: String?,
|
|
233
240
|
?function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall,
|
|
234
241
|
?refusal: String?,
|
|
@@ -237,6 +244,16 @@ module OpenAI
|
|
|
237
244
|
}
|
|
238
245
|
|
|
239
246
|
class Delta < OpenAI::Internal::Type::BaseModel
|
|
247
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
248
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
249
|
+
attr_reader audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio?
|
|
250
|
+
|
|
251
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
252
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
253
|
+
def audio=: (
|
|
254
|
+
OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio
|
|
255
|
+
) -> OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio
|
|
256
|
+
|
|
240
257
|
# The contents of the chunk message.
|
|
241
258
|
attr_accessor content: String?
|
|
242
259
|
|
|
@@ -267,6 +284,9 @@ module OpenAI
|
|
|
267
284
|
::Array[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall]
|
|
268
285
|
) -> ::Array[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall]
|
|
269
286
|
|
|
287
|
+
# @param audio
|
|
288
|
+
# A partial audio response. Audio chunks may carry an ID, base64 data, or
|
|
289
|
+
# transcript text; the final audio update contains only its expiry timestamp.
|
|
270
290
|
# @param content
|
|
271
291
|
# The contents of the chunk message.
|
|
272
292
|
# @param function_call
|
|
@@ -277,6 +297,7 @@ module OpenAI
|
|
|
277
297
|
# @param role
|
|
278
298
|
# The role of the author of this message.
|
|
279
299
|
def initialize: (
|
|
300
|
+
?audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio,
|
|
280
301
|
?content: String?,
|
|
281
302
|
?function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall,
|
|
282
303
|
?refusal: String?,
|
|
@@ -285,6 +306,7 @@ module OpenAI
|
|
|
285
306
|
) -> void
|
|
286
307
|
|
|
287
308
|
def to_hash: -> {
|
|
309
|
+
?audio: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::Audio,
|
|
288
310
|
?content: String?,
|
|
289
311
|
?function_call: OpenAI::Chat::ChatCompletionChunk::Choice::Delta::FunctionCall,
|
|
290
312
|
?refusal: String?,
|
|
@@ -292,6 +314,68 @@ module OpenAI
|
|
|
292
314
|
?tool_calls: ::Array[OpenAI::Chat::ChatCompletionChunk::Choice::Delta::ToolCall]
|
|
293
315
|
}
|
|
294
316
|
|
|
317
|
+
type audio =
|
|
318
|
+
{
|
|
319
|
+
?id: String,
|
|
320
|
+
?data: String,
|
|
321
|
+
?expires_at: Integer,
|
|
322
|
+
?transcript: String
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
class Audio < OpenAI::Internal::Type::BaseModel
|
|
326
|
+
# Unique identifier for this audio response.
|
|
327
|
+
attr_reader id: String?
|
|
328
|
+
|
|
329
|
+
# Unique identifier for this audio response.
|
|
330
|
+
def id=: (String) -> String
|
|
331
|
+
|
|
332
|
+
# Base64 encoded audio bytes generated by the model, in the format specified in
|
|
333
|
+
# the request.
|
|
334
|
+
attr_reader data: String?
|
|
335
|
+
|
|
336
|
+
# Base64 encoded audio bytes generated by the model, in the format specified in
|
|
337
|
+
# the request.
|
|
338
|
+
def data=: (String) -> String
|
|
339
|
+
|
|
340
|
+
# The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
341
|
+
# accessible on the server for use in multi-turn conversations.
|
|
342
|
+
attr_reader expires_at: Integer?
|
|
343
|
+
|
|
344
|
+
# The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
345
|
+
# accessible on the server for use in multi-turn conversations.
|
|
346
|
+
def expires_at=: (Integer) -> Integer
|
|
347
|
+
|
|
348
|
+
# Transcript text from this audio chunk.
|
|
349
|
+
attr_reader transcript: String?
|
|
350
|
+
|
|
351
|
+
# Transcript text from this audio chunk.
|
|
352
|
+
def transcript=: (String) -> String
|
|
353
|
+
|
|
354
|
+
# @param id
|
|
355
|
+
# Unique identifier for this audio response.
|
|
356
|
+
# @param data
|
|
357
|
+
# Base64 encoded audio bytes generated by the model, in the format specified in
|
|
358
|
+
# the request.
|
|
359
|
+
# @param expires_at
|
|
360
|
+
# The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
361
|
+
# accessible on the server for use in multi-turn conversations.
|
|
362
|
+
# @param transcript
|
|
363
|
+
# Transcript text from this audio chunk.
|
|
364
|
+
def initialize: (
|
|
365
|
+
?id: String,
|
|
366
|
+
?data: String,
|
|
367
|
+
?expires_at: Integer,
|
|
368
|
+
?transcript: String
|
|
369
|
+
) -> void
|
|
370
|
+
|
|
371
|
+
def to_hash: -> {
|
|
372
|
+
?id: String,
|
|
373
|
+
?data: String,
|
|
374
|
+
?expires_at: Integer,
|
|
375
|
+
?transcript: String
|
|
376
|
+
}
|
|
377
|
+
end
|
|
378
|
+
|
|
295
379
|
type function_call = { ?arguments: String, ?name: String }
|
|
296
380
|
|
|
297
381
|
class FunctionCall < OpenAI::Internal::Type::BaseModel
|