openai 0.113.0 → 0.115.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 +54 -0
- data/README.md +17 -2
- data/docs/architecture/security-model.md +11 -16
- data/examples/responses/websocket_workflows.rb +78 -3
- data/lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb +10 -8
- data/lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb +8 -7
- data/lib/openai/helpers/chat/tool_runner.rb +1 -1
- data/lib/openai/helpers/live/websocket.rb +31 -0
- data/lib/openai/helpers/realtime/connection.rb +33 -0
- data/lib/openai/helpers/realtime/connection_manager.rb +1 -0
- data/lib/openai/helpers/realtime/conversation_item_variant_resolver.rb +5 -0
- data/lib/openai/helpers/realtime/recovery.rb +5 -1
- data/lib/openai/helpers/realtime/translation.rb +5 -0
- data/lib/openai/helpers/realtime/transports/async_websocket.rb +19 -0
- data/lib/openai/helpers/responses_websocket/connection.rb +53 -15
- data/lib/openai/helpers/responses_websocket/connection_manager.rb +1 -0
- data/lib/openai/helpers/responses_websocket/connection_resources.rb +1 -1
- data/lib/openai/helpers/structured_output/response_parser.rb +1 -0
- data/lib/openai/helpers/structured_output.rb +58 -0
- data/lib/openai/helpers/websocket/connection_manager.rb +11 -0
- data/lib/openai/helpers/websocket/resource.rb +1 -0
- data/lib/openai/helpers/websocket/typed_connection.rb +1 -0
- data/lib/openai/internal/type/array_of.rb +1 -1
- data/lib/openai/internal/type/hash_of.rb +1 -1
- data/lib/openai/internal/type/request_parameters.rb +2 -1
- data/lib/openai/internal/type/union.rb +18 -6
- data/lib/openai/models/admin/organization/external_key.rb +169 -0
- data/lib/openai/models/admin/organization/external_key_create_params.rb +311 -0
- data/lib/openai/models/admin/organization/external_key_delete_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_list_params.rb +69 -0
- data/lib/openai/models/admin/organization/external_key_retrieve_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_validate_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_validate_response.rb +20 -0
- data/lib/openai/models/audio/speech_model.rb +12 -0
- data/lib/openai/models/audio_model.rb +15 -0
- data/lib/openai/models/beta/agent.rb +49 -1
- data/lib/openai/models/beta/agent_create_params.rb +51 -1
- data/lib/openai/models/beta/agent_session.rb +75 -2
- data/lib/openai/models/beta/agent_update_params.rb +62 -1
- data/lib/openai/models/beta/agents/session_create_params.rb +94 -2
- data/lib/openai/models/beta/agents/session_list_params.rb +16 -1
- data/lib/openai/models/beta/agents/session_update_params.rb +50 -5
- data/lib/openai/models/beta/assistant_update_params.rb +18 -0
- data/lib/openai/models/beta/beta_response.rb +224 -1
- data/lib/openai/models/beta/beta_response_configuration_update_item.rb +64 -3
- data/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +64 -4
- data/lib/openai/models/beta/beta_response_input_file.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_file_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_item.rb +2 -3
- data/lib/openai/models/beta/beta_response_input_text.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_text_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_item.rb +11 -11
- data/lib/openai/models/beta/beta_response_output_item.rb +9 -9
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +6 -6
- data/lib/openai/models/beta/beta_responses_client_event.rb +20 -1
- data/lib/openai/models/beta/beta_tool.rb +6 -6
- data/lib/openai/models/beta/response_compact_params.rb +6 -0
- data/lib/openai/models/beta/response_create_params.rb +6 -0
- data/lib/openai/models/chat/chat_completion_content_part.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_text.rb +9 -9
- data/lib/openai/models/chat_model.rb +6 -0
- data/lib/openai/models/conversations/computer_screenshot_content.rb +9 -9
- data/lib/openai/models/conversations/conversation_item.rb +2 -2
- data/lib/openai/models/image_edit_params.rb +46 -25
- data/lib/openai/models/live/fork_server_event.rb +43 -3
- data/lib/openai/models/live/server_event.rb +43 -3
- data/lib/openai/models/live/sideband_client_event.rb +40 -1
- data/lib/openai/models/live/sideband_server_event.rb +43 -3
- data/lib/openai/models/realtime/audio_transcription.rb +15 -0
- data/lib/openai/models/realtime/conversation_item_added.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_create_event.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_created_event.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_done.rb +2 -2
- data/lib/openai/models/realtime/realtime_response.rb +2 -2
- data/lib/openai/models/realtime/realtime_response_create_params.rb +2 -2
- data/lib/openai/models/realtime/realtime_server_event.rb +2 -2
- data/lib/openai/models/realtime/realtime_session.rb +18 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +18 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +18 -0
- data/lib/openai/models/realtime/response_output_item_added_event.rb +2 -2
- data/lib/openai/models/realtime/response_output_item_done_event.rb +2 -2
- data/lib/openai/models/responses/response.rb +221 -1
- data/lib/openai/models/responses/response_compact_params.rb +6 -0
- data/lib/openai/models/responses/response_configuration_update_item.rb +50 -3
- data/lib/openai/models/responses/response_configuration_update_item_param.rb +50 -4
- data/lib/openai/models/responses/response_input_file.rb +9 -9
- data/lib/openai/models/responses/response_input_file_content.rb +9 -9
- data/lib/openai/models/responses/response_input_image.rb +9 -9
- data/lib/openai/models/responses/response_input_image_content.rb +9 -9
- data/lib/openai/models/responses/response_input_item.rb +2 -3
- data/lib/openai/models/responses/response_input_text.rb +9 -9
- data/lib/openai/models/responses/response_input_text_content.rb +9 -9
- data/lib/openai/models/responses/response_item.rb +2 -2
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +6 -6
- data/lib/openai/models/responses/responses_client_event.rb +14 -1
- data/lib/openai/models/responses/tool.rb +6 -6
- data/lib/openai/net_http_client.rb +6 -0
- data/lib/openai/providers/vertex.rb +0 -10
- data/lib/openai/resources/admin/organization/external_keys.rb +132 -0
- data/lib/openai/resources/admin/organization.rb +4 -0
- data/lib/openai/resources/audio/speech.rb +8 -0
- data/lib/openai/resources/audio/translations.rb +8 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -6
- data/lib/openai/resources/beta/agents.rb +17 -2
- data/lib/openai/resources/images.rb +36 -18
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +8 -0
- data/rbi/openai/helpers/live/websocket.rbi +1 -12
- data/rbi/openai/helpers/realtime/connection.rbi +5 -0
- data/rbi/openai/helpers/realtime/transports/async_websocket.rbi +5 -0
- data/rbi/openai/helpers/responses_websocket/connection.rbi +7 -2
- data/rbi/openai/helpers/structured_output.rbi +10 -0
- data/rbi/openai/internal/type/array_of.rbi +1 -1
- data/rbi/openai/internal/type/hash_of.rbi +1 -1
- data/rbi/openai/internal/type/union.rbi +5 -0
- data/rbi/openai/models/admin/organization/external_key.rbi +301 -0
- data/rbi/openai/models/admin/organization/external_key_create_params.rbi +532 -0
- data/rbi/openai/models/admin/organization/external_key_delete_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_list_params.rbi +129 -0
- data/rbi/openai/models/admin/organization/external_key_retrieve_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_validate_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_validate_response.rbi +50 -0
- data/rbi/openai/models/beta/agent.rbi +103 -1
- data/rbi/openai/models/beta/agent_create_params.rbi +109 -0
- data/rbi/openai/models/beta/agent_session.rbi +136 -3
- data/rbi/openai/models/beta/agent_update_params.rbi +120 -0
- data/rbi/openai/models/beta/agents/session_create_params.rbi +153 -0
- data/rbi/openai/models/beta/agents/session_list_params.rbi +19 -0
- data/rbi/openai/models/beta/agents/session_update_params.rbi +94 -6
- data/rbi/openai/models/beta/beta_response.rbi +394 -0
- data/rbi/openai/models/beta/beta_response_configuration_update_item.rbi +113 -3
- data/rbi/openai/models/beta/beta_response_configuration_update_item_param.rbi +125 -4
- data/rbi/openai/models/beta/beta_response_input_file.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_file_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_item.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_output_item.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +6 -6
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +17 -0
- data/rbi/openai/models/beta/beta_tool.rbi +6 -6
- data/rbi/openai/models/chat/chat_completion_content_part.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +9 -9
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +9 -9
- data/rbi/openai/models/decision_create_params.rbi +4 -1
- data/rbi/openai/models/image_edit_params.rbi +49 -24
- data/rbi/openai/models/live/fork_server_event.rbi +65 -1
- data/rbi/openai/models/live/server_event.rbi +65 -1
- data/rbi/openai/models/live/sideband_client_event.rbi +60 -0
- data/rbi/openai/models/live/sideband_server_event.rbi +65 -1
- data/rbi/openai/models/realtime/conversation_item_added.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_create_event.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_created_event.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_done.rbi +6 -3
- data/rbi/openai/models/realtime/realtime_response.rbi +8 -4
- data/rbi/openai/models/realtime/realtime_response_create_params.rbi +8 -4
- data/rbi/openai/models/realtime/realtime_server_event.rbi +6 -3
- data/rbi/openai/models/realtime/response_output_item_added_event.rbi +6 -3
- data/rbi/openai/models/realtime/response_output_item_done_event.rbi +6 -3
- data/rbi/openai/models/responses/response.rbi +394 -0
- data/rbi/openai/models/responses/response_configuration_update_item.rbi +76 -3
- data/rbi/openai/models/responses/response_configuration_update_item_param.rbi +74 -4
- data/rbi/openai/models/responses/response_input_file.rbi +9 -9
- data/rbi/openai/models/responses/response_input_file_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text_content.rbi +9 -9
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +6 -6
- data/rbi/openai/models/responses/responses_client_event.rbi +17 -0
- data/rbi/openai/models/responses/tool.rbi +6 -6
- data/rbi/openai/net_http_client.rbi +5 -0
- data/rbi/openai/resources/admin/organization/external_keys.rbi +86 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -0
- data/rbi/openai/resources/audio/speech.rbi +8 -0
- data/rbi/openai/resources/audio/translations.rbi +6 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +18 -2
- data/rbi/openai/resources/beta/agents.rbi +15 -0
- data/rbi/openai/resources/images.rbi +34 -16
- data/rbi/openai/resources/responses.rbi +2 -0
- data/realtime.md +6 -0
- data/responses-websocket.md +53 -0
- data/sig/openai/helpers/live/websocket.rbs +1 -9
- data/sig/openai/helpers/realtime/connection.rbs +3 -0
- data/sig/openai/helpers/realtime/transports/async_websocket.rbs +3 -0
- data/sig/openai/helpers/responses_websocket/connection.rbs +7 -1
- data/sig/openai/helpers/structured_output.rbs +9 -0
- data/sig/openai/internal/type/union.rbs +4 -0
- data/sig/openai/models/admin/organization/external_key.rbs +186 -0
- data/sig/openai/models/admin/organization/external_key_create_params.rbs +423 -0
- data/sig/openai/models/admin/organization/external_key_delete_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_list_params.rbs +81 -0
- data/sig/openai/models/admin/organization/external_key_retrieve_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_validate_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_validate_response.rbs +17 -0
- data/sig/openai/models/admin/organization/external_storage_create_params.rbs +72 -2
- data/sig/openai/models/audio/speech_create_params.rbs +15 -2
- data/sig/openai/models/audio/transcription_create_params.rbs +30 -2
- data/sig/openai/models/audio/voice_create_params.rbs +47 -2
- data/sig/openai/models/beta/agent.rbs +54 -2
- data/sig/openai/models/beta/agent_create_params.rbs +54 -0
- data/sig/openai/models/beta/agent_session.rbs +82 -3
- data/sig/openai/models/beta/agent_update_params.rbs +64 -0
- data/sig/openai/models/beta/agents/session_create_params.rbs +91 -0
- data/sig/openai/models/beta/agents/session_list_params.rbs +20 -0
- data/sig/openai/models/beta/agents/session_update_params.rbs +48 -6
- data/sig/openai/models/beta/assistant_create_params.rbs +5 -2
- data/sig/openai/models/beta/beta_response.rbs +223 -0
- data/sig/openai/models/beta/beta_response_configuration_update_item.rbs +58 -2
- data/sig/openai/models/beta/beta_response_configuration_update_item_param.rbs +58 -2
- data/sig/openai/models/beta/beta_response_input_file.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_file_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_image.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_image_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_text.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_text_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_item.rbs +9 -9
- data/sig/openai/models/beta/beta_response_output_item.rbs +9 -9
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +4 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +17 -0
- data/sig/openai/models/beta/beta_tool.rbs +4 -4
- data/sig/openai/models/beta/response_create_params.rbs +5 -2
- data/sig/openai/models/beta/responses/input_token_count_params.rbs +10 -2
- data/sig/openai/models/beta/thread_create_and_run_params.rbs +11 -5
- data/sig/openai/models/beta/thread_create_params.rbs +11 -5
- data/sig/openai/models/beta/threads/message_create_params.rbs +6 -3
- data/sig/openai/models/beta/threads/run_create_params.rbs +6 -3
- data/sig/openai/models/chat/chat_completion_content_part.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +9 -9
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +9 -9
- data/sig/openai/models/decision_create_params.rbs +27 -2
- data/sig/openai/models/eval_create_params.rbs +25 -4
- data/sig/openai/models/evals/run_create_params.rbs +52 -8
- data/sig/openai/models/image_edit_params.rbs +47 -16
- data/sig/openai/models/live/fork_server_event.rbs +39 -0
- data/sig/openai/models/live/server_event.rbs +39 -0
- data/sig/openai/models/live/session_accept_params.rbs +39 -2
- data/sig/openai/models/live/sideband_client_event.rbs +32 -0
- data/sig/openai/models/live/sideband_server_event.rbs +39 -0
- data/sig/openai/models/realtime/conversation_item.rbs +1 -0
- data/sig/openai/models/responses/input_token_count_params.rbs +10 -2
- data/sig/openai/models/responses/response.rbs +223 -0
- data/sig/openai/models/responses/response_configuration_update_item.rbs +45 -2
- data/sig/openai/models/responses/response_configuration_update_item_param.rbs +45 -2
- data/sig/openai/models/responses/response_create_params.rbs +5 -2
- data/sig/openai/models/responses/response_input_file.rbs +9 -9
- data/sig/openai/models/responses/response_input_file_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_image.rbs +9 -9
- data/sig/openai/models/responses/response_input_image_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_text.rbs +9 -9
- data/sig/openai/models/responses/response_input_text_content.rbs +6 -6
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +4 -4
- data/sig/openai/models/responses/responses_client_event.rbs +17 -0
- data/sig/openai/models/responses/tool.rbs +4 -4
- data/sig/openai/models/video_edit_params.rbs +11 -2
- data/sig/openai/models/video_extend_params.rbs +11 -2
- data/sig/openai/net_http_client.rbs +3 -0
- data/sig/openai/resources/admin/organization/external_keys.rbs +70 -0
- data/sig/openai/resources/admin/organization/external_storage.rbs +23 -1
- data/sig/openai/resources/admin/organization.rbs +2 -0
- data/sig/openai/resources/audio/speech.rbs +2 -1
- data/sig/openai/resources/audio/transcriptions.rbs +14 -2
- data/sig/openai/resources/audio/voices.rbs +14 -1
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -0
- data/sig/openai/resources/beta/agents.rbs +4 -0
- data/sig/openai/resources/beta/responses/input_tokens.rbs +2 -1
- data/sig/openai/resources/beta/responses.rbs +4 -2
- data/sig/openai/resources/decisions.rbs +7 -1
- data/sig/openai/resources/images.rbs +2 -0
- data/sig/openai/resources/responses/input_tokens.rbs +2 -1
- data/sig/openai/resources/responses.rbs +5 -2
- data/sig/openai/resources/videos.rbs +2 -2
- metadata +25 -1
|
@@ -15,6 +15,7 @@ module OpenAI
|
|
|
15
15
|
status: OpenAI::Models::Beta::AgentSession::status,
|
|
16
16
|
usage: OpenAI::Beta::TokenUsage?,
|
|
17
17
|
vault_ids: ::Array[String],
|
|
18
|
+
?review: OpenAI::Models::Beta::AgentSession::review,
|
|
18
19
|
?spend_control: OpenAI::Beta::AgentSession::SpendControl
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -56,6 +57,16 @@ module OpenAI
|
|
|
56
57
|
# The IDs of vaults made available to the session.
|
|
57
58
|
attr_accessor vault_ids: ::Array[String]
|
|
58
59
|
|
|
60
|
+
# Review applied to eligible actions in this session. Omitted when review is none
|
|
61
|
+
# and automatic review is not enabled. Omission means none.
|
|
62
|
+
attr_reader review: OpenAI::Models::Beta::AgentSession::review?
|
|
63
|
+
|
|
64
|
+
# Review applied to eligible actions in this session. Omitted when review is none
|
|
65
|
+
# and automatic review is not enabled. Omission means none.
|
|
66
|
+
def review=: (
|
|
67
|
+
OpenAI::Models::Beta::AgentSession::review
|
|
68
|
+
) -> OpenAI::Models::Beta::AgentSession::review
|
|
69
|
+
|
|
59
70
|
# Configured spending limit and best-effort consumption, in USD cents. Unlimited
|
|
60
71
|
# sessions omit this object.
|
|
61
72
|
attr_reader spend_control: OpenAI::Beta::AgentSession::SpendControl?
|
|
@@ -89,6 +100,9 @@ module OpenAI
|
|
|
89
100
|
# change.
|
|
90
101
|
# @param vault_ids
|
|
91
102
|
# The IDs of vaults made available to the session.
|
|
103
|
+
# @param review
|
|
104
|
+
# Review applied to eligible actions in this session. Omitted when review is none
|
|
105
|
+
# and automatic review is not enabled. Omission means none.
|
|
92
106
|
# @param spend_control
|
|
93
107
|
# Configured spending limit and best-effort consumption, in USD cents. Unlimited
|
|
94
108
|
# sessions omit this object.
|
|
@@ -106,6 +120,7 @@ module OpenAI
|
|
|
106
120
|
status: OpenAI::Models::Beta::AgentSession::status,
|
|
107
121
|
usage: OpenAI::Beta::TokenUsage?,
|
|
108
122
|
vault_ids: ::Array[String],
|
|
123
|
+
?review: OpenAI::Models::Beta::AgentSession::review,
|
|
109
124
|
?spend_control: OpenAI::Beta::AgentSession::SpendControl,
|
|
110
125
|
?object: :"agent.session"
|
|
111
126
|
) -> void
|
|
@@ -123,6 +138,7 @@ module OpenAI
|
|
|
123
138
|
status: OpenAI::Models::Beta::AgentSession::status,
|
|
124
139
|
usage: OpenAI::Beta::TokenUsage?,
|
|
125
140
|
vault_ids: ::Array[String],
|
|
141
|
+
?review: OpenAI::Models::Beta::AgentSession::review,
|
|
126
142
|
?spend_control: OpenAI::Beta::AgentSession::SpendControl
|
|
127
143
|
}
|
|
128
144
|
|
|
@@ -136,7 +152,9 @@ module OpenAI
|
|
|
136
152
|
reasoning: OpenAI::Beta::AgentReasoning,
|
|
137
153
|
service_tier: OpenAI::Models::Beta::AgentSession::Agent::service_tier,
|
|
138
154
|
text: OpenAI::Beta::AgentText,
|
|
139
|
-
tools: ::Array[OpenAI::Models::Beta::agent_tool]
|
|
155
|
+
tools: ::Array[OpenAI::Models::Beta::agent_tool],
|
|
156
|
+
?compaction: OpenAI::Beta::AgentSession::Agent::Compaction,
|
|
157
|
+
?experimental: OpenAI::Beta::AgentSession::Agent::Experimental
|
|
140
158
|
}
|
|
141
159
|
|
|
142
160
|
class Agent < OpenAI::Internal::Type::BaseModel
|
|
@@ -168,6 +186,22 @@ module OpenAI
|
|
|
168
186
|
# Tools available to the agent.
|
|
169
187
|
attr_accessor tools: ::Array[OpenAI::Models::Beta::agent_tool]
|
|
170
188
|
|
|
189
|
+
# The effective context compaction settings.
|
|
190
|
+
attr_reader compaction: OpenAI::Beta::AgentSession::Agent::Compaction?
|
|
191
|
+
|
|
192
|
+
# The effective context compaction settings.
|
|
193
|
+
def compaction=: (
|
|
194
|
+
OpenAI::Beta::AgentSession::Agent::Compaction
|
|
195
|
+
) -> OpenAI::Beta::AgentSession::Agent::Compaction
|
|
196
|
+
|
|
197
|
+
# The effective experimental settings for the agent.
|
|
198
|
+
attr_reader experimental: OpenAI::Beta::AgentSession::Agent::Experimental?
|
|
199
|
+
|
|
200
|
+
# The effective experimental settings for the agent.
|
|
201
|
+
def experimental=: (
|
|
202
|
+
OpenAI::Beta::AgentSession::Agent::Experimental
|
|
203
|
+
) -> OpenAI::Beta::AgentSession::Agent::Experimental
|
|
204
|
+
|
|
171
205
|
# @param id
|
|
172
206
|
# The ID of the agent.
|
|
173
207
|
# @param instructions
|
|
@@ -187,6 +221,10 @@ module OpenAI
|
|
|
187
221
|
# Configuration for text generated by the agent.
|
|
188
222
|
# @param tools
|
|
189
223
|
# Tools available to the agent.
|
|
224
|
+
# @param compaction
|
|
225
|
+
# The effective context compaction settings.
|
|
226
|
+
# @param experimental
|
|
227
|
+
# The effective experimental settings for the agent.
|
|
190
228
|
def initialize: (
|
|
191
229
|
id: String,
|
|
192
230
|
instructions: String?,
|
|
@@ -196,7 +234,9 @@ module OpenAI
|
|
|
196
234
|
reasoning: OpenAI::Beta::AgentReasoning,
|
|
197
235
|
service_tier: OpenAI::Models::Beta::AgentSession::Agent::service_tier,
|
|
198
236
|
text: OpenAI::Beta::AgentText,
|
|
199
|
-
tools: ::Array[OpenAI::Models::Beta::agent_tool]
|
|
237
|
+
tools: ::Array[OpenAI::Models::Beta::agent_tool],
|
|
238
|
+
?compaction: OpenAI::Beta::AgentSession::Agent::Compaction,
|
|
239
|
+
?experimental: OpenAI::Beta::AgentSession::Agent::Experimental
|
|
200
240
|
) -> void
|
|
201
241
|
|
|
202
242
|
def to_hash: -> {
|
|
@@ -208,7 +248,9 @@ module OpenAI
|
|
|
208
248
|
reasoning: OpenAI::Beta::AgentReasoning,
|
|
209
249
|
service_tier: OpenAI::Models::Beta::AgentSession::Agent::service_tier,
|
|
210
250
|
text: OpenAI::Beta::AgentText,
|
|
211
|
-
tools: ::Array[OpenAI::Models::Beta::agent_tool]
|
|
251
|
+
tools: ::Array[OpenAI::Models::Beta::agent_tool],
|
|
252
|
+
?compaction: OpenAI::Beta::AgentSession::Agent::Compaction,
|
|
253
|
+
?experimental: OpenAI::Beta::AgentSession::Agent::Experimental
|
|
212
254
|
}
|
|
213
255
|
|
|
214
256
|
type service_tier =
|
|
@@ -226,6 +268,32 @@ module OpenAI
|
|
|
226
268
|
|
|
227
269
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::Agent::service_tier]
|
|
228
270
|
end
|
|
271
|
+
|
|
272
|
+
type compaction = { async: bool }
|
|
273
|
+
|
|
274
|
+
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
275
|
+
# Whether context is compacted in the background. Defaults to true.
|
|
276
|
+
attr_accessor async: bool
|
|
277
|
+
|
|
278
|
+
# @param async
|
|
279
|
+
# Whether context is compacted in the background. Defaults to true.
|
|
280
|
+
def initialize: (async: bool) -> void
|
|
281
|
+
|
|
282
|
+
def to_hash: -> { async: bool }
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
type experimental = { time_awareness: bool }
|
|
286
|
+
|
|
287
|
+
class Experimental < OpenAI::Internal::Type::BaseModel
|
|
288
|
+
# Whether the model receives periodic current-time reminders.
|
|
289
|
+
attr_accessor time_awareness: bool
|
|
290
|
+
|
|
291
|
+
# @param time_awareness
|
|
292
|
+
# Whether the model receives periodic current-time reminders.
|
|
293
|
+
def initialize: (time_awareness: bool) -> void
|
|
294
|
+
|
|
295
|
+
def to_hash: -> { time_awareness: bool }
|
|
296
|
+
end
|
|
229
297
|
end
|
|
230
298
|
|
|
231
299
|
type required_action =
|
|
@@ -549,6 +617,17 @@ module OpenAI
|
|
|
549
617
|
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::status]
|
|
550
618
|
end
|
|
551
619
|
|
|
620
|
+
type review = :none | :auto_review
|
|
621
|
+
|
|
622
|
+
module Review
|
|
623
|
+
extend OpenAI::Internal::Type::Enum
|
|
624
|
+
|
|
625
|
+
NONE: :none
|
|
626
|
+
AUTO_REVIEW: :auto_review
|
|
627
|
+
|
|
628
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::AgentSession::review]
|
|
629
|
+
end
|
|
630
|
+
|
|
552
631
|
type spend_control = { consumed: Integer?, limit: Integer }
|
|
553
632
|
|
|
554
633
|
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
@@ -4,6 +4,8 @@ module OpenAI
|
|
|
4
4
|
type agent_update_params =
|
|
5
5
|
{
|
|
6
6
|
agent_id: String,
|
|
7
|
+
?compaction: OpenAI::Beta::AgentUpdateParams::Compaction?,
|
|
8
|
+
?experimental: OpenAI::Beta::AgentUpdateParams::Experimental,
|
|
7
9
|
?instructions: String?,
|
|
8
10
|
?metadata: ::Hash[Symbol, String]?,
|
|
9
11
|
?model: String,
|
|
@@ -22,6 +24,21 @@ module OpenAI
|
|
|
22
24
|
|
|
23
25
|
attr_accessor agent_id: String
|
|
24
26
|
|
|
27
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
28
|
+
# object replaces the settings; null or an empty object enables background
|
|
29
|
+
# compaction.
|
|
30
|
+
attr_accessor compaction: OpenAI::Beta::AgentUpdateParams::Compaction?
|
|
31
|
+
|
|
32
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
33
|
+
# values.
|
|
34
|
+
attr_reader experimental: OpenAI::Beta::AgentUpdateParams::Experimental?
|
|
35
|
+
|
|
36
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
37
|
+
# values.
|
|
38
|
+
def experimental=: (
|
|
39
|
+
OpenAI::Beta::AgentUpdateParams::Experimental
|
|
40
|
+
) -> OpenAI::Beta::AgentUpdateParams::Experimental
|
|
41
|
+
|
|
25
42
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
26
43
|
# to leave unchanged.
|
|
27
44
|
attr_accessor instructions: String?
|
|
@@ -57,6 +74,13 @@ module OpenAI
|
|
|
57
74
|
# The replacement must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.
|
|
58
75
|
attr_accessor tools: ::Array[OpenAI::Models::Beta::persisted_agent_tool_param]?
|
|
59
76
|
|
|
77
|
+
# @param compaction
|
|
78
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
79
|
+
# object replaces the settings; null or an empty object enables background
|
|
80
|
+
# compaction.
|
|
81
|
+
# @param experimental
|
|
82
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
83
|
+
# values.
|
|
60
84
|
# @param instructions
|
|
61
85
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
62
86
|
# to leave unchanged.
|
|
@@ -82,6 +106,8 @@ module OpenAI
|
|
|
82
106
|
# The replacement must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.
|
|
83
107
|
def initialize: (
|
|
84
108
|
agent_id: String,
|
|
109
|
+
?compaction: OpenAI::Beta::AgentUpdateParams::Compaction?,
|
|
110
|
+
?experimental: OpenAI::Beta::AgentUpdateParams::Experimental,
|
|
85
111
|
?instructions: String?,
|
|
86
112
|
?metadata: ::Hash[Symbol, String]?,
|
|
87
113
|
?model: String,
|
|
@@ -96,6 +122,8 @@ module OpenAI
|
|
|
96
122
|
|
|
97
123
|
def to_hash: -> {
|
|
98
124
|
agent_id: String,
|
|
125
|
+
?compaction: OpenAI::Beta::AgentUpdateParams::Compaction?,
|
|
126
|
+
?experimental: OpenAI::Beta::AgentUpdateParams::Experimental,
|
|
99
127
|
?instructions: String?,
|
|
100
128
|
?metadata: ::Hash[Symbol, String]?,
|
|
101
129
|
?model: String,
|
|
@@ -108,6 +136,42 @@ module OpenAI
|
|
|
108
136
|
?request_options: OpenAI::RequestOptions
|
|
109
137
|
}
|
|
110
138
|
|
|
139
|
+
type compaction = { ?async: bool? }
|
|
140
|
+
|
|
141
|
+
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
142
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
143
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
144
|
+
# token usage.
|
|
145
|
+
attr_accessor async: bool?
|
|
146
|
+
|
|
147
|
+
# @param async
|
|
148
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
149
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
150
|
+
# token usage.
|
|
151
|
+
def initialize: (?async: bool?) -> void
|
|
152
|
+
|
|
153
|
+
def to_hash: -> { ?async: bool? }
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
type experimental = { ?time_awareness: bool }
|
|
157
|
+
|
|
158
|
+
class Experimental < OpenAI::Internal::Type::BaseModel
|
|
159
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
160
|
+
# current setting.
|
|
161
|
+
attr_reader time_awareness: bool?
|
|
162
|
+
|
|
163
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
164
|
+
# current setting.
|
|
165
|
+
def time_awareness=: (bool) -> bool
|
|
166
|
+
|
|
167
|
+
# @param time_awareness
|
|
168
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
169
|
+
# current setting.
|
|
170
|
+
def initialize: (?time_awareness: bool) -> void
|
|
171
|
+
|
|
172
|
+
def to_hash: -> { ?time_awareness: bool }
|
|
173
|
+
end
|
|
174
|
+
|
|
111
175
|
type service_tier =
|
|
112
176
|
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
113
177
|
|
|
@@ -9,6 +9,7 @@ module OpenAI
|
|
|
9
9
|
?agent_id: String,
|
|
10
10
|
?input: OpenAI::Models::Beta::Agents::SessionCreateParams::input?,
|
|
11
11
|
?metadata: ::Hash[Symbol, String]?,
|
|
12
|
+
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
12
13
|
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
13
14
|
?vault_ids: ::Array[String]?,
|
|
14
15
|
?request_options: OpenAI::request_opts
|
|
@@ -49,6 +50,14 @@ module OpenAI
|
|
|
49
50
|
# characters. Omission or null defaults to an empty map.
|
|
50
51
|
attr_accessor metadata: ::Hash[Symbol, String]?
|
|
51
52
|
|
|
53
|
+
# Action review mode. Omit to use none.
|
|
54
|
+
attr_reader review: OpenAI::Models::Beta::Agents::SessionCreateParams::review?
|
|
55
|
+
|
|
56
|
+
# Action review mode. Omit to use none.
|
|
57
|
+
def review=: (
|
|
58
|
+
OpenAI::Models::Beta::Agents::SessionCreateParams::review
|
|
59
|
+
) -> OpenAI::Models::Beta::Agents::SessionCreateParams::review
|
|
60
|
+
|
|
52
61
|
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
53
62
|
# session.
|
|
54
63
|
attr_accessor spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?
|
|
@@ -72,6 +81,8 @@ module OpenAI
|
|
|
72
81
|
# @param metadata
|
|
73
82
|
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
74
83
|
# characters. Omission or null defaults to an empty map.
|
|
84
|
+
# @param review
|
|
85
|
+
# Action review mode. Omit to use none.
|
|
75
86
|
# @param spend_control
|
|
76
87
|
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
77
88
|
# session.
|
|
@@ -83,6 +94,7 @@ module OpenAI
|
|
|
83
94
|
?agent_id: String,
|
|
84
95
|
?input: OpenAI::Models::Beta::Agents::SessionCreateParams::input?,
|
|
85
96
|
?metadata: ::Hash[Symbol, String]?,
|
|
97
|
+
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
86
98
|
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
87
99
|
?vault_ids: ::Array[String]?,
|
|
88
100
|
?request_options: OpenAI::request_opts
|
|
@@ -94,6 +106,7 @@ module OpenAI
|
|
|
94
106
|
?agent_id: String,
|
|
95
107
|
?input: OpenAI::Models::Beta::Agents::SessionCreateParams::input?,
|
|
96
108
|
?metadata: ::Hash[Symbol, String]?,
|
|
109
|
+
?review: OpenAI::Models::Beta::Agents::SessionCreateParams::review,
|
|
97
110
|
?spend_control: OpenAI::Beta::Agents::SessionCreateParams::SpendControl?,
|
|
98
111
|
?vault_ids: ::Array[String]?,
|
|
99
112
|
?request_options: OpenAI::RequestOptions
|
|
@@ -101,6 +114,8 @@ module OpenAI
|
|
|
101
114
|
|
|
102
115
|
type agent =
|
|
103
116
|
{
|
|
117
|
+
?compaction: OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction?,
|
|
118
|
+
?experimental: OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental,
|
|
104
119
|
?instructions: String?,
|
|
105
120
|
?model: String,
|
|
106
121
|
?multi_agent: OpenAI::Beta::MultiAgentConfigParam?,
|
|
@@ -111,6 +126,21 @@ module OpenAI
|
|
|
111
126
|
}
|
|
112
127
|
|
|
113
128
|
class Agent < OpenAI::Internal::Type::BaseModel
|
|
129
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
130
|
+
# object replaces the settings; null or an empty object enables background
|
|
131
|
+
# compaction.
|
|
132
|
+
attr_accessor compaction: OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction?
|
|
133
|
+
|
|
134
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
135
|
+
# values.
|
|
136
|
+
attr_reader experimental: OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental?
|
|
137
|
+
|
|
138
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
139
|
+
# values.
|
|
140
|
+
def experimental=: (
|
|
141
|
+
OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental
|
|
142
|
+
) -> OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental
|
|
143
|
+
|
|
114
144
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
115
145
|
# to leave unchanged.
|
|
116
146
|
attr_accessor instructions: String?
|
|
@@ -139,6 +169,13 @@ module OpenAI
|
|
|
139
169
|
# JSON.
|
|
140
170
|
attr_accessor tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
141
171
|
|
|
172
|
+
# @param compaction
|
|
173
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
174
|
+
# object replaces the settings; null or an empty object enables background
|
|
175
|
+
# compaction.
|
|
176
|
+
# @param experimental
|
|
177
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
178
|
+
# values.
|
|
142
179
|
# @param instructions
|
|
143
180
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
144
181
|
# to leave unchanged.
|
|
@@ -158,6 +195,8 @@ module OpenAI
|
|
|
158
195
|
# resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
|
|
159
196
|
# JSON.
|
|
160
197
|
def initialize: (
|
|
198
|
+
?compaction: OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction?,
|
|
199
|
+
?experimental: OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental,
|
|
161
200
|
?instructions: String?,
|
|
162
201
|
?model: String,
|
|
163
202
|
?multi_agent: OpenAI::Beta::MultiAgentConfigParam?,
|
|
@@ -168,6 +207,8 @@ module OpenAI
|
|
|
168
207
|
) -> void
|
|
169
208
|
|
|
170
209
|
def to_hash: -> {
|
|
210
|
+
?compaction: OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction?,
|
|
211
|
+
?experimental: OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental,
|
|
171
212
|
?instructions: String?,
|
|
172
213
|
?model: String,
|
|
173
214
|
?multi_agent: OpenAI::Beta::MultiAgentConfigParam?,
|
|
@@ -177,6 +218,42 @@ module OpenAI
|
|
|
177
218
|
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
178
219
|
}
|
|
179
220
|
|
|
221
|
+
type compaction = { ?async: bool? }
|
|
222
|
+
|
|
223
|
+
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
224
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
225
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
226
|
+
# token usage.
|
|
227
|
+
attr_accessor async: bool?
|
|
228
|
+
|
|
229
|
+
# @param async
|
|
230
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
231
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
232
|
+
# token usage.
|
|
233
|
+
def initialize: (?async: bool?) -> void
|
|
234
|
+
|
|
235
|
+
def to_hash: -> { ?async: bool? }
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
type experimental = { ?time_awareness: bool }
|
|
239
|
+
|
|
240
|
+
class Experimental < OpenAI::Internal::Type::BaseModel
|
|
241
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
242
|
+
# current setting.
|
|
243
|
+
attr_reader time_awareness: bool?
|
|
244
|
+
|
|
245
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
246
|
+
# current setting.
|
|
247
|
+
def time_awareness=: (bool) -> bool
|
|
248
|
+
|
|
249
|
+
# @param time_awareness
|
|
250
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
251
|
+
# current setting.
|
|
252
|
+
def initialize: (?time_awareness: bool) -> void
|
|
253
|
+
|
|
254
|
+
def to_hash: -> { ?time_awareness: bool }
|
|
255
|
+
end
|
|
256
|
+
|
|
180
257
|
type service_tier =
|
|
181
258
|
:auto | :default | :flex | :priority | :fast | :ultrafast
|
|
182
259
|
|
|
@@ -216,6 +293,20 @@ module OpenAI
|
|
|
216
293
|
AgentSessionInputMessageParamArray: OpenAI::Internal::Type::Converter
|
|
217
294
|
end
|
|
218
295
|
|
|
296
|
+
type review = :none | :auto_review
|
|
297
|
+
|
|
298
|
+
module Review
|
|
299
|
+
extend OpenAI::Internal::Type::Enum
|
|
300
|
+
|
|
301
|
+
# Keep the existing execution behavior without automatic action review.
|
|
302
|
+
NONE: :none
|
|
303
|
+
|
|
304
|
+
# Review eligible actions automatically. Deny manual approval fallbacks.
|
|
305
|
+
AUTO_REVIEW: :auto_review
|
|
306
|
+
|
|
307
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionCreateParams::review]
|
|
308
|
+
end
|
|
309
|
+
|
|
219
310
|
type spend_control = { limit: Integer? }
|
|
220
311
|
|
|
221
312
|
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
@@ -7,6 +7,7 @@ module OpenAI
|
|
|
7
7
|
?after: String,
|
|
8
8
|
?agent_id: String,
|
|
9
9
|
?limit: Integer,
|
|
10
|
+
?metadata: ::Hash[Symbol, String],
|
|
10
11
|
?order: OpenAI::Models::Beta::Agents::SessionListParams::order,
|
|
11
12
|
?request_options: OpenAI::request_opts
|
|
12
13
|
}
|
|
@@ -35,6 +36,18 @@ module OpenAI
|
|
|
35
36
|
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
36
37
|
def limit=: (Integer) -> Integer
|
|
37
38
|
|
|
39
|
+
# Exact string matches supplied as `metadata[key]=value`. All supplied pairs must
|
|
40
|
+
# match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512
|
|
41
|
+
# characters. New sessions and metadata updates may take time to appear in
|
|
42
|
+
# filtered results.
|
|
43
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
44
|
+
|
|
45
|
+
# Exact string matches supplied as `metadata[key]=value`. All supplied pairs must
|
|
46
|
+
# match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512
|
|
47
|
+
# characters. New sessions and metadata updates may take time to appear in
|
|
48
|
+
# filtered results.
|
|
49
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
50
|
+
|
|
38
51
|
# The order in which resources are returned. Defaults to `desc`.
|
|
39
52
|
attr_reader order: OpenAI::Models::Beta::Agents::SessionListParams::order?
|
|
40
53
|
|
|
@@ -50,12 +63,18 @@ module OpenAI
|
|
|
50
63
|
# all agents.
|
|
51
64
|
# @param limit
|
|
52
65
|
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
66
|
+
# @param metadata
|
|
67
|
+
# Exact string matches supplied as `metadata[key]=value`. All supplied pairs must
|
|
68
|
+
# match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512
|
|
69
|
+
# characters. New sessions and metadata updates may take time to appear in
|
|
70
|
+
# filtered results.
|
|
53
71
|
# @param order
|
|
54
72
|
# The order in which resources are returned. Defaults to `desc`.
|
|
55
73
|
def initialize: (
|
|
56
74
|
?after: String,
|
|
57
75
|
?agent_id: String,
|
|
58
76
|
?limit: Integer,
|
|
77
|
+
?metadata: ::Hash[Symbol, String],
|
|
59
78
|
?order: OpenAI::Models::Beta::Agents::SessionListParams::order,
|
|
60
79
|
?request_options: OpenAI::request_opts
|
|
61
80
|
) -> void
|
|
@@ -64,6 +83,7 @@ module OpenAI
|
|
|
64
83
|
?after: String,
|
|
65
84
|
?agent_id: String,
|
|
66
85
|
?limit: Integer,
|
|
86
|
+
?metadata: ::Hash[Symbol, String],
|
|
67
87
|
?order: OpenAI::Models::Beta::Agents::SessionListParams::order,
|
|
68
88
|
?request_options: OpenAI::RequestOptions
|
|
69
89
|
}
|
|
@@ -7,6 +7,7 @@ module OpenAI
|
|
|
7
7
|
session_id: String,
|
|
8
8
|
?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
|
|
9
9
|
?metadata: ::Hash[Symbol, String]?,
|
|
10
|
+
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
10
11
|
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
11
12
|
?request_options: OpenAI::request_opts
|
|
12
13
|
}
|
|
@@ -17,10 +18,10 @@ module OpenAI
|
|
|
17
18
|
|
|
18
19
|
attr_accessor session_id: String
|
|
19
20
|
|
|
20
|
-
#
|
|
21
|
+
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
21
22
|
attr_reader agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent?
|
|
22
23
|
|
|
23
|
-
#
|
|
24
|
+
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
24
25
|
def agent=: (
|
|
25
26
|
OpenAI::Beta::Agents::SessionUpdateParams::Agent
|
|
26
27
|
) -> OpenAI::Beta::Agents::SessionUpdateParams::Agent
|
|
@@ -30,16 +31,29 @@ module OpenAI
|
|
|
30
31
|
# characters.
|
|
31
32
|
attr_accessor metadata: ::Hash[Symbol, String]?
|
|
32
33
|
|
|
34
|
+
# Default action review for new root turns. Existing turns and their subagents
|
|
35
|
+
# keep their review mode.
|
|
36
|
+
attr_reader review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review?
|
|
37
|
+
|
|
38
|
+
# Default action review for new root turns. Existing turns and their subagents
|
|
39
|
+
# keep their review mode.
|
|
40
|
+
def review=: (
|
|
41
|
+
OpenAI::Models::Beta::Agents::SessionUpdateParams::review
|
|
42
|
+
) -> OpenAI::Models::Beta::Agents::SessionUpdateParams::review
|
|
43
|
+
|
|
33
44
|
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
34
45
|
# spend.
|
|
35
46
|
attr_accessor spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?
|
|
36
47
|
|
|
37
48
|
# @param agent
|
|
38
|
-
#
|
|
49
|
+
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
39
50
|
# @param metadata
|
|
40
51
|
# Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it.
|
|
41
52
|
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
42
53
|
# characters.
|
|
54
|
+
# @param review
|
|
55
|
+
# Default action review for new root turns. Existing turns and their subagents
|
|
56
|
+
# keep their review mode.
|
|
43
57
|
# @param spend_control
|
|
44
58
|
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
45
59
|
# spend.
|
|
@@ -47,6 +61,7 @@ module OpenAI
|
|
|
47
61
|
session_id: String,
|
|
48
62
|
?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
|
|
49
63
|
?metadata: ::Hash[Symbol, String]?,
|
|
64
|
+
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
50
65
|
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
51
66
|
?request_options: OpenAI::request_opts
|
|
52
67
|
) -> void
|
|
@@ -55,6 +70,7 @@ module OpenAI
|
|
|
55
70
|
session_id: String,
|
|
56
71
|
?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
|
|
57
72
|
?metadata: ::Hash[Symbol, String]?,
|
|
73
|
+
?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
|
|
58
74
|
?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
|
|
59
75
|
?request_options: OpenAI::RequestOptions
|
|
60
76
|
}
|
|
@@ -63,7 +79,8 @@ module OpenAI
|
|
|
63
79
|
{
|
|
64
80
|
?model: String,
|
|
65
81
|
?reasoning: OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning,
|
|
66
|
-
?service_tier: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier
|
|
82
|
+
?service_tier: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier?,
|
|
83
|
+
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
67
84
|
}
|
|
68
85
|
|
|
69
86
|
class Agent < OpenAI::Internal::Type::BaseModel
|
|
@@ -84,22 +101,33 @@ module OpenAI
|
|
|
84
101
|
# Omit to keep the current tier. Null resets it to auto.
|
|
85
102
|
attr_accessor service_tier: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier?
|
|
86
103
|
|
|
104
|
+
# Replaces the session tools. Functions and MCP servers change on the next model
|
|
105
|
+
# call. Built-in tools change by the next turn. Omit to keep the current tools, or
|
|
106
|
+
# pass null or an empty array to clear them.
|
|
107
|
+
attr_accessor tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
108
|
+
|
|
87
109
|
# @param model
|
|
88
110
|
# The model for subsequent turns. Omit to keep the current model.
|
|
89
111
|
# @param reasoning
|
|
90
112
|
# Reasoning settings to update. Omit to keep the current effort.
|
|
91
113
|
# @param service_tier
|
|
92
114
|
# Omit to keep the current tier. Null resets it to auto.
|
|
115
|
+
# @param tools
|
|
116
|
+
# Replaces the session tools. Functions and MCP servers change on the next model
|
|
117
|
+
# call. Built-in tools change by the next turn. Omit to keep the current tools, or
|
|
118
|
+
# pass null or an empty array to clear them.
|
|
93
119
|
def initialize: (
|
|
94
120
|
?model: String,
|
|
95
121
|
?reasoning: OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning,
|
|
96
|
-
?service_tier: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier
|
|
122
|
+
?service_tier: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier?,
|
|
123
|
+
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
97
124
|
) -> void
|
|
98
125
|
|
|
99
126
|
def to_hash: -> {
|
|
100
127
|
?model: String,
|
|
101
128
|
?reasoning: OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning,
|
|
102
|
-
?service_tier: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier
|
|
129
|
+
?service_tier: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier?,
|
|
130
|
+
?tools: ::Array[OpenAI::Models::Beta::agent_tool_param]?
|
|
103
131
|
}
|
|
104
132
|
|
|
105
133
|
type reasoning =
|
|
@@ -167,6 +195,20 @@ module OpenAI
|
|
|
167
195
|
end
|
|
168
196
|
end
|
|
169
197
|
|
|
198
|
+
type review = :none | :auto_review
|
|
199
|
+
|
|
200
|
+
module Review
|
|
201
|
+
extend OpenAI::Internal::Type::Enum
|
|
202
|
+
|
|
203
|
+
# Keep the existing execution behavior without automatic action review.
|
|
204
|
+
NONE: :none
|
|
205
|
+
|
|
206
|
+
# Review eligible actions automatically. Deny manual approval fallbacks.
|
|
207
|
+
AUTO_REVIEW: :auto_review
|
|
208
|
+
|
|
209
|
+
def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::SessionUpdateParams::review]
|
|
210
|
+
end
|
|
211
|
+
|
|
170
212
|
type spend_control = { limit: Integer? }
|
|
171
213
|
|
|
172
214
|
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
@@ -331,7 +331,9 @@ module OpenAI
|
|
|
331
331
|
# strategy.
|
|
332
332
|
def chunking_strategy=: (
|
|
333
333
|
OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
334
|
-
|
|
334
|
+
| { type: :auto }
|
|
335
|
+
) -> (OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
336
|
+
| { type: :auto })
|
|
335
337
|
|
|
336
338
|
# A list of [file](https://developers.openai.com/api/reference/resources/files)
|
|
337
339
|
# IDs to add to the vector store. For vector stores created before Nov 2025, there
|
|
@@ -369,7 +371,8 @@ module OpenAI
|
|
|
369
371
|
# Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
370
372
|
# a maximum length of 512 characters.
|
|
371
373
|
def initialize: (
|
|
372
|
-
?chunking_strategy: OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
374
|
+
?chunking_strategy: OpenAI::Models::Beta::AssistantCreateParams::ToolResources::FileSearch::VectorStore::chunking_strategy
|
|
375
|
+
| { type: :auto },
|
|
373
376
|
?file_ids: ::Array[String],
|
|
374
377
|
?metadata: OpenAI::Models::metadata?
|
|
375
378
|
) -> void
|