openai 0.95.0 → 0.97.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 +51 -0
- data/README.md +5 -2
- data/docs/architecture/security-model.md +2 -2
- data/examples/audio/record_and_play.rb +1 -1
- data/lib/openai/helpers/live/transcript_grouper.rb +264 -0
- data/lib/openai/helpers/live/transcript_grouping.rb +309 -0
- data/lib/openai/helpers/live/websocket.rb +454 -0
- data/lib/openai/helpers/realtime/translation.rb +440 -0
- data/lib/openai/helpers/realtime.rb +1 -0
- data/lib/openai/helpers/responses_websocket/incremental.rb +246 -0
- data/lib/openai/helpers/responses_websocket/transports/async_websocket.rb +183 -0
- data/lib/openai/helpers/responses_websocket.rb +1 -0
- data/lib/openai/helpers/streaming/response_stream.rb +19 -11
- data/lib/openai/helpers/structured_output/chat_completion_parser.rb +0 -2
- data/lib/openai/helpers/structured_output/response_parser.rb +1 -2
- data/lib/openai/helpers/structured_output/union_of.rb +0 -2
- data/lib/openai/helpers/websocket/async_websocket_transport.rb +11 -6
- data/lib/openai/helpers/websocket/connection_manager.rb +9 -0
- data/lib/openai/internal/read_io_adapter.rb +0 -2
- data/lib/openai/internal/stream.rb +0 -2
- data/lib/openai/internal/type/base_model.rb +4 -6
- data/lib/openai/internal/type/converter.rb +5 -3
- data/lib/openai/internal/type/enum.rb +0 -2
- data/lib/openai/internal/type/union.rb +0 -6
- data/lib/openai/internal/type/unknown.rb +34 -6
- data/lib/openai/internal/util.rb +0 -4
- data/lib/openai/models/audio/speech_create_params.rb +9 -0
- data/lib/openai/models/audio/transcription_create_response.rb +4 -1
- data/lib/openai/models/audio/translation_create_response.rb +4 -1
- data/lib/openai/models/beta/agent.rb +3 -2
- data/lib/openai/models/beta/agent_browser_authentication_cancel_param.rb +23 -0
- data/lib/openai/models/beta/agent_browser_authentication_submit_param.rb +70 -0
- data/lib/openai/models/beta/agent_browser_origin_access_param.rb +45 -0
- data/lib/openai/models/beta/agent_create_params.rb +5 -2
- data/lib/openai/models/beta/agent_output_item.rb +276 -1
- data/lib/openai/models/beta/agent_session.rb +252 -5
- data/lib/openai/models/beta/agent_session_input_param.rb +64 -1
- data/lib/openai/models/beta/agent_session_item.rb +391 -1
- data/lib/openai/models/beta/agent_session_turn_item_added_event.rb +2 -2
- data/lib/openai/models/beta/agent_session_turn_item_done_event.rb +2 -2
- data/lib/openai/models/beta/agent_tool.rb +27 -1
- data/lib/openai/models/beta/agent_tool_param.rb +27 -1
- data/lib/openai/models/beta/agent_update_params.rb +5 -2
- data/lib/openai/models/beta/agents/environments/environment_template.rb +26 -2
- data/lib/openai/models/beta/agents/environments/template_create_params.rb +51 -6
- data/lib/openai/models/beta/agents/environments/template_update_params.rb +51 -9
- data/lib/openai/models/beta/agents/session_create_params.rb +5 -2
- data/lib/openai/models/beta/agents/session_update_params.rb +3 -0
- data/lib/openai/models/beta/agents/sessions/event_create_params.rb +2 -2
- data/lib/openai/models/beta/agents/vaults/credential.rb +10 -1
- data/lib/openai/models/beta/agents/vaults/credential_create_params.rb +12 -1
- data/lib/openai/models/beta/agents/vaults/credential_update_params.rb +14 -3
- data/lib/openai/models/beta/beta_response.rb +38 -1
- data/lib/openai/models/beta/beta_responses_client_event.rb +73 -1
- data/lib/openai/models/beta/beta_web_search_preview_tool.rb +9 -3
- data/lib/openai/models/beta/beta_web_search_tool.rb +9 -3
- data/lib/openai/models/beta/environment.rb +26 -2
- data/lib/openai/models/beta/environment_param.rb +46 -6
- data/lib/openai/models/beta/persisted_agent_tool.rb +27 -1
- data/lib/openai/models/beta/persisted_agent_tool_param.rb +27 -1
- data/lib/openai/models/beta/response_compact_params.rb +3 -0
- data/lib/openai/models/beta/response_create_params.rb +68 -1
- data/lib/openai/models/beta/session_turn_error.rb +3 -0
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/responses/response.rb +35 -1
- data/lib/openai/models/responses/response_compact_params.rb +3 -0
- data/lib/openai/models/responses/response_create_params.rb +65 -1
- data/lib/openai/models/responses/responses_client_event.rb +70 -1
- data/lib/openai/models/responses/web_search_preview_tool.rb +9 -3
- data/lib/openai/models/responses/web_search_tool.rb +9 -3
- data/lib/openai/net_http_client.rb +0 -2
- data/lib/openai/resources/audio/transcriptions.rb +5 -3
- data/lib/openai/resources/audio/translations.rb +1 -1
- data/lib/openai/resources/beta/agents/environments/templates.rb +12 -5
- data/lib/openai/resources/beta/agents/sessions/events.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/items.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/items.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/subagents/turns/items.rb +1 -1
- data/lib/openai/resources/beta/agents/vaults/credentials.rb +12 -4
- data/lib/openai/resources/beta/agents.rb +2 -2
- data/lib/openai/resources/beta/responses.rb +8 -2
- data/lib/openai/resources/responses.rb +8 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -0
- data/rbi/openai/helpers/live/transcript_grouper.rbi +67 -0
- data/rbi/openai/helpers/live/websocket.rbi +299 -0
- data/rbi/openai/helpers/realtime/translation.rbi +137 -0
- data/rbi/openai/helpers/responses_websocket/incremental.rbi +32 -0
- data/rbi/openai/helpers/responses_websocket/transports/async_websocket.rbi +24 -0
- data/rbi/openai/helpers/streaming/response_stream.rbi +5 -0
- data/rbi/openai/internal/type/converter.rbi +3 -2
- data/rbi/openai/models/audio/speech_create_params.rbi +3 -0
- data/rbi/openai/models/audio/transcription_create_response.rbi +2 -1
- data/rbi/openai/models/audio/translation_create_response.rbi +2 -1
- data/rbi/openai/models/beta/agent.rbi +3 -1
- data/rbi/openai/models/beta/agent_browser_authentication_cancel_param.rbi +53 -0
- data/rbi/openai/models/beta/agent_browser_authentication_submit_param.rbi +125 -0
- data/rbi/openai/models/beta/agent_browser_origin_access_param.rbi +76 -0
- data/rbi/openai/models/beta/agent_create_params.rbi +9 -3
- data/rbi/openai/models/beta/agent_output_item.rbi +422 -0
- data/rbi/openai/models/beta/agent_session.rbi +374 -1
- data/rbi/openai/models/beta/agent_session_input_param.rbi +102 -0
- data/rbi/openai/models/beta/agent_session_item.rbi +614 -0
- data/rbi/openai/models/beta/agent_session_turn_item_added_event.rbi +3 -0
- data/rbi/openai/models/beta/agent_session_turn_item_done_event.rbi +2 -0
- data/rbi/openai/models/beta/agent_tool.rbi +49 -1
- data/rbi/openai/models/beta/agent_tool_param.rbi +52 -1
- data/rbi/openai/models/beta/agent_update_params.rbi +9 -3
- data/rbi/openai/models/beta/agents/environments/environment_template.rbi +53 -2
- data/rbi/openai/models/beta/agents/environments/template_create_params.rbi +77 -7
- data/rbi/openai/models/beta/agents/environments/template_update_params.rbi +77 -10
- data/rbi/openai/models/beta/agents/session_create_params.rbi +9 -3
- data/rbi/openai/models/beta/agents/session_update_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/sessions/event_create_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/vaults/credential.rbi +10 -0
- data/rbi/openai/models/beta/agents/vaults/credential_create_params.rbi +15 -0
- data/rbi/openai/models/beta/agents/vaults/credential_update_params.rbi +35 -6
- data/rbi/openai/models/beta/beta_response.rbi +64 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +128 -0
- data/rbi/openai/models/beta/beta_web_search_preview_tool.rbi +9 -3
- data/rbi/openai/models/beta/beta_web_search_tool.rbi +9 -3
- data/rbi/openai/models/beta/environment.rbi +53 -2
- data/rbi/openai/models/beta/environment_param.rbi +75 -7
- data/rbi/openai/models/beta/persisted_agent_tool.rbi +49 -1
- data/rbi/openai/models/beta/persisted_agent_tool_param.rbi +52 -1
- data/rbi/openai/models/beta/response_compact_params.rbi +1 -0
- data/rbi/openai/models/beta/response_create_params.rbi +100 -0
- data/rbi/openai/models/beta/session_turn_error.rbi +6 -0
- data/rbi/openai/models/chat_model.rbi +1 -0
- data/rbi/openai/models/responses/response.rbi +63 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +1 -0
- data/rbi/openai/models/responses/response_create_params.rbi +106 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +125 -0
- data/rbi/openai/models/responses/web_search_preview_tool.rbi +9 -3
- data/rbi/openai/models/responses/web_search_tool.rbi +9 -3
- data/rbi/openai/resources/audio/transcriptions.rbi +4 -2
- data/rbi/openai/resources/beta/agents/environments/templates.rbi +10 -3
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +1 -0
- data/rbi/openai/resources/beta/agents/vaults/credentials.rbi +11 -3
- data/rbi/openai/resources/beta/agents.rbi +4 -2
- data/rbi/openai/resources/beta/responses.rbi +6 -0
- data/rbi/openai/resources/responses.rbi +11 -0
- data/responses-websocket.md +55 -0
- data/sig/openai/helpers/live/transcript_grouper.rbs +42 -0
- data/sig/openai/helpers/live/websocket.rbs +152 -0
- data/sig/openai/helpers/realtime/translation.rbs +81 -0
- data/sig/openai/helpers/responses_websocket/incremental.rbs +14 -0
- data/sig/openai/helpers/responses_websocket/transports/async_websocket.rbs +21 -0
- data/sig/openai/helpers/streaming/response_stream.rbs +9 -0
- data/sig/openai/internal/type/converter.rbs +3 -1
- data/sig/openai/models/audio/speech_create_params.rbs +6 -0
- data/sig/openai/models/audio/transcription_create_response.rbs +1 -0
- data/sig/openai/models/audio/translation_create_response.rbs +3 -1
- data/sig/openai/models/beta/agent.rbs +3 -1
- data/sig/openai/models/beta/agent_browser_authentication_cancel_param.rbs +21 -0
- data/sig/openai/models/beta/agent_browser_authentication_submit_param.rbs +63 -0
- data/sig/openai/models/beta/agent_browser_origin_access_param.rbs +47 -0
- data/sig/openai/models/beta/agent_create_params.rbs +5 -1
- data/sig/openai/models/beta/agent_output_item.rbs +254 -0
- data/sig/openai/models/beta/agent_session.rbs +218 -2
- data/sig/openai/models/beta/agent_session_input_param.rbs +51 -1
- data/sig/openai/models/beta/agent_session_item.rbs +362 -0
- data/sig/openai/models/beta/agent_tool.rbs +22 -0
- data/sig/openai/models/beta/agent_tool_param.rbs +25 -0
- data/sig/openai/models/beta/agent_update_params.rbs +5 -1
- data/sig/openai/models/beta/agents/environments/environment_template.rbs +29 -3
- data/sig/openai/models/beta/agents/environments/template_create_params.rbs +41 -6
- data/sig/openai/models/beta/agents/environments/template_update_params.rbs +41 -8
- data/sig/openai/models/beta/agents/session_create_params.rbs +5 -1
- data/sig/openai/models/beta/agents/session_update_params.rbs +5 -1
- data/sig/openai/models/beta/agents/vaults/credential.rbs +8 -0
- data/sig/openai/models/beta/agents/vaults/credential_create_params.rbs +14 -0
- data/sig/openai/models/beta/agents/vaults/credential_update_params.rbs +23 -4
- data/sig/openai/models/beta/beta_response.rbs +37 -0
- data/sig/openai/models/beta/beta_responses_client_event.rbs +79 -0
- data/sig/openai/models/beta/beta_web_search_preview_tool.rbs +6 -2
- data/sig/openai/models/beta/beta_web_search_tool.rbs +6 -2
- data/sig/openai/models/beta/environment.rbs +29 -3
- data/sig/openai/models/beta/environment_param.rbs +41 -6
- data/sig/openai/models/beta/persisted_agent_tool.rbs +22 -0
- data/sig/openai/models/beta/persisted_agent_tool_param.rbs +25 -0
- data/sig/openai/models/beta/response_compact_params.rbs +2 -0
- data/sig/openai/models/beta/response_create_params.rbs +79 -0
- data/sig/openai/models/beta/session_turn_error.rbs +4 -0
- data/sig/openai/models/chat_model.rbs +2 -0
- data/sig/openai/models/responses/response.rbs +35 -0
- data/sig/openai/models/responses/response_compact_params.rbs +2 -0
- data/sig/openai/models/responses/response_create_params.rbs +77 -0
- data/sig/openai/models/responses/responses_client_event.rbs +77 -0
- data/sig/openai/models/responses/web_search_preview_tool.rbs +6 -2
- data/sig/openai/models/responses/web_search_tool.rbs +6 -2
- data/sig/openai/resources/beta/agents/environments/templates.rbs +2 -0
- data/sig/openai/resources/beta/agents/vaults/credentials.rbs +3 -1
- data/sig/openai/resources/beta/responses.rbs +2 -0
- data/sig/openai/resources/responses.rbs +4 -0
- metadata +23 -1
|
@@ -28,6 +28,16 @@ module OpenAI
|
|
|
28
28
|
sig { returns(Symbol) }
|
|
29
29
|
attr_accessor :type
|
|
30
30
|
|
|
31
|
+
# Domain-specific access programs to use for this request.
|
|
32
|
+
sig { returns(T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms)) }
|
|
33
|
+
attr_reader :access_programs
|
|
34
|
+
|
|
35
|
+
sig {
|
|
36
|
+
params(access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash)
|
|
37
|
+
.void
|
|
38
|
+
}
|
|
39
|
+
attr_writer :access_programs
|
|
40
|
+
|
|
31
41
|
# Whether to run the model response in the background.
|
|
32
42
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
33
43
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -476,6 +486,8 @@ module OpenAI
|
|
|
476
486
|
sig do
|
|
477
487
|
params(
|
|
478
488
|
|
|
489
|
+
access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash,
|
|
490
|
+
|
|
479
491
|
background: T.nilable(T::Boolean),
|
|
480
492
|
|
|
481
493
|
context_management: T.nilable(
|
|
@@ -579,6 +591,9 @@ module OpenAI
|
|
|
579
591
|
end
|
|
580
592
|
def self.new(
|
|
581
593
|
|
|
594
|
+
# Domain-specific access programs to use for this request.
|
|
595
|
+
access_programs: nil,
|
|
596
|
+
|
|
582
597
|
# Whether to run the model response in the background.
|
|
583
598
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
584
599
|
background: nil,
|
|
@@ -849,6 +864,7 @@ module OpenAI
|
|
|
849
864
|
override.returns(
|
|
850
865
|
{
|
|
851
866
|
type: Symbol,
|
|
867
|
+
access_programs: T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms),
|
|
852
868
|
background: T.nilable(T::Boolean),
|
|
853
869
|
context_management: T.nilable(
|
|
854
870
|
T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement]
|
|
@@ -928,6 +944,115 @@ module OpenAI
|
|
|
928
944
|
def to_hash
|
|
929
945
|
end
|
|
930
946
|
|
|
947
|
+
class AccessPrograms < OpenAI::Internal::Type::BaseModel
|
|
948
|
+
OrHash = T.type_alias do
|
|
949
|
+
T.any(
|
|
950
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms,
|
|
951
|
+
OpenAI::Internal::AnyHash
|
|
952
|
+
)
|
|
953
|
+
end
|
|
954
|
+
|
|
955
|
+
# The Cyber access program to use for this request. Supported values are
|
|
956
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
957
|
+
# the program from the model's Cyber tier and your organization and project
|
|
958
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
959
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
960
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
961
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
962
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
963
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
964
|
+
# field, rather than an explicit Standard selection.
|
|
965
|
+
sig {
|
|
966
|
+
returns(
|
|
967
|
+
T.nilable(OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol)
|
|
968
|
+
)
|
|
969
|
+
}
|
|
970
|
+
attr_reader :cyber
|
|
971
|
+
|
|
972
|
+
sig {
|
|
973
|
+
params(cyber: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol)
|
|
974
|
+
.void
|
|
975
|
+
}
|
|
976
|
+
attr_writer :cyber
|
|
977
|
+
|
|
978
|
+
# Domain-specific access programs to use for this request.
|
|
979
|
+
sig do
|
|
980
|
+
params(
|
|
981
|
+
|
|
982
|
+
cyber: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol
|
|
983
|
+
)
|
|
984
|
+
.returns(T.attached_class)
|
|
985
|
+
end
|
|
986
|
+
def self.new(
|
|
987
|
+
|
|
988
|
+
# The Cyber access program to use for this request. Supported values are
|
|
989
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
990
|
+
# the program from the model's Cyber tier and your organization and project
|
|
991
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
992
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
993
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
994
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
995
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
996
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
997
|
+
# field, rather than an explicit Standard selection.
|
|
998
|
+
|
|
999
|
+
cyber: nil
|
|
1000
|
+
)
|
|
1001
|
+
end
|
|
1002
|
+
|
|
1003
|
+
sig do
|
|
1004
|
+
override.returns(
|
|
1005
|
+
{
|
|
1006
|
+
cyber: T.nilable(
|
|
1007
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::OrSymbol
|
|
1008
|
+
)
|
|
1009
|
+
}
|
|
1010
|
+
)
|
|
1011
|
+
end
|
|
1012
|
+
def to_hash
|
|
1013
|
+
end
|
|
1014
|
+
|
|
1015
|
+
# The Cyber access program to use for this request. Supported values are
|
|
1016
|
+
# `standard`, `daybreak_blue`, and `daybreak_red`. If omitted, the API resolves
|
|
1017
|
+
# the program from the model's Cyber tier and your organization and project
|
|
1018
|
+
# access, subject to model-specific eligibility restrictions. By default, models
|
|
1019
|
+
# without a Cyber tier use Standard. Blue-tier models use Daybreak Blue when
|
|
1020
|
+
# authorized; otherwise they fall back to Standard unless the model requires
|
|
1021
|
+
# Daybreak access. Red-tier models use Daybreak Red and require authorization.
|
|
1022
|
+
# Requests that require unavailable Daybreak access return 403. An implicit
|
|
1023
|
+
# Standard fallback is represented by null in the response's access_programs
|
|
1024
|
+
# field, rather than an explicit Standard selection.
|
|
1025
|
+
module Cyber
|
|
1026
|
+
extend OpenAI::Internal::Type::Enum
|
|
1027
|
+
|
|
1028
|
+
TaggedSymbol = T.type_alias {
|
|
1029
|
+
T.all(Symbol, OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber)
|
|
1030
|
+
}
|
|
1031
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1032
|
+
|
|
1033
|
+
STANDARD = T.let(
|
|
1034
|
+
:standard,
|
|
1035
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol
|
|
1036
|
+
)
|
|
1037
|
+
DAYBREAK_BLUE = T.let(
|
|
1038
|
+
:daybreak_blue,
|
|
1039
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol
|
|
1040
|
+
)
|
|
1041
|
+
DAYBREAK_RED = T.let(
|
|
1042
|
+
:daybreak_red,
|
|
1043
|
+
OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol
|
|
1044
|
+
)
|
|
1045
|
+
|
|
1046
|
+
sig {
|
|
1047
|
+
override.returns(
|
|
1048
|
+
T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::Cyber::TaggedSymbol]
|
|
1049
|
+
)
|
|
1050
|
+
}
|
|
1051
|
+
def self.values
|
|
1052
|
+
end
|
|
1053
|
+
end
|
|
1054
|
+
end
|
|
1055
|
+
|
|
931
1056
|
class ContextManagement < OpenAI::Internal::Type::BaseModel
|
|
932
1057
|
OrHash = T.type_alias do
|
|
933
1058
|
T.any(
|
|
@@ -36,7 +36,9 @@ module OpenAI
|
|
|
36
36
|
sig { params(search_context_size: OpenAI::Responses::WebSearchPreviewTool::SearchContextSize::OrSymbol).void }
|
|
37
37
|
attr_writer :search_context_size
|
|
38
38
|
|
|
39
|
-
# The
|
|
39
|
+
# The approximate location of the user. If omitted or null, defaults to the United
|
|
40
|
+
# States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
41
|
+
# fields. To localize results, provide the relevant location fields.
|
|
40
42
|
sig { returns(T.nilable(OpenAI::Responses::WebSearchPreviewTool::UserLocation)) }
|
|
41
43
|
attr_reader :user_location
|
|
42
44
|
|
|
@@ -71,7 +73,9 @@ module OpenAI
|
|
|
71
73
|
# search. One of `low`, `medium`, or `high`. `medium` is the default.
|
|
72
74
|
search_context_size: nil,
|
|
73
75
|
|
|
74
|
-
# The
|
|
76
|
+
# The approximate location of the user. If omitted or null, defaults to the United
|
|
77
|
+
# States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
78
|
+
# fields. To localize results, provide the relevant location fields.
|
|
75
79
|
|
|
76
80
|
user_location: nil
|
|
77
81
|
)
|
|
@@ -170,7 +174,9 @@ module OpenAI
|
|
|
170
174
|
sig { returns(T.nilable(String)) }
|
|
171
175
|
attr_accessor :timezone
|
|
172
176
|
|
|
173
|
-
# The
|
|
177
|
+
# The approximate location of the user. If omitted or null, defaults to the United
|
|
178
|
+
# States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
179
|
+
# fields. To localize results, provide the relevant location fields.
|
|
174
180
|
sig do
|
|
175
181
|
params(
|
|
176
182
|
|
|
@@ -42,7 +42,9 @@ module OpenAI
|
|
|
42
42
|
sig { params(search_context_size: OpenAI::Responses::WebSearchTool::SearchContextSize::OrSymbol).void }
|
|
43
43
|
attr_writer :search_context_size
|
|
44
44
|
|
|
45
|
-
# The approximate location of the user.
|
|
45
|
+
# The approximate location of the user. If omitted or null, defaults to the United
|
|
46
|
+
# States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
47
|
+
# fields. To localize results, provide the relevant location fields.
|
|
46
48
|
sig { returns(T.nilable(OpenAI::Responses::WebSearchTool::UserLocation)) }
|
|
47
49
|
attr_reader :user_location
|
|
48
50
|
|
|
@@ -83,7 +85,9 @@ module OpenAI
|
|
|
83
85
|
# search. One of `low`, `medium`, or `high`. `medium` is the default.
|
|
84
86
|
search_context_size: nil,
|
|
85
87
|
|
|
86
|
-
# The approximate location of the user.
|
|
88
|
+
# The approximate location of the user. If omitted or null, defaults to the United
|
|
89
|
+
# States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
90
|
+
# fields. To localize results, provide the relevant location fields.
|
|
87
91
|
|
|
88
92
|
user_location: nil
|
|
89
93
|
)
|
|
@@ -212,7 +216,9 @@ module OpenAI
|
|
|
212
216
|
sig { params(type: OpenAI::Responses::WebSearchTool::UserLocation::Type::OrSymbol).void }
|
|
213
217
|
attr_writer :type
|
|
214
218
|
|
|
215
|
-
# The approximate location of the user.
|
|
219
|
+
# The approximate location of the user. If omitted or null, defaults to the United
|
|
220
|
+
# States. To avoid this fallback, pass `{"type": "approximate"}` without location
|
|
221
|
+
# fields. To localize results, provide the relevant location fields.
|
|
216
222
|
sig do
|
|
217
223
|
params(
|
|
218
224
|
|
|
@@ -14,7 +14,8 @@ module OpenAI
|
|
|
14
14
|
# Transcribes audio into the input language.
|
|
15
15
|
#
|
|
16
16
|
# Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
|
|
17
|
-
# format, or a stream of transcript
|
|
17
|
+
# format, plain text in `text`, `srt`, or `vtt` format, or a stream of transcript
|
|
18
|
+
# events. Supported formats depend on the model.
|
|
18
19
|
sig {
|
|
19
20
|
params(
|
|
20
21
|
file: OpenAI::Internal::FileInput,
|
|
@@ -125,7 +126,8 @@ module OpenAI
|
|
|
125
126
|
# Transcribes audio into the input language.
|
|
126
127
|
#
|
|
127
128
|
# Returns a transcription object in `json`, `diarized_json`, or `verbose_json`
|
|
128
|
-
# format, or a stream of transcript
|
|
129
|
+
# format, plain text in `text`, `srt`, or `vtt` format, or a stream of transcript
|
|
130
|
+
# events. Supported formats depend on the model.
|
|
129
131
|
sig {
|
|
130
132
|
params(
|
|
131
133
|
file: OpenAI::Internal::FileInput,
|
|
@@ -17,6 +17,7 @@ module OpenAI
|
|
|
17
17
|
sig {
|
|
18
18
|
params(
|
|
19
19
|
capability_directories: T.nilable(T::Array[String]),
|
|
20
|
+
desktop: T.nilable(OpenAI::Beta::Agents::Environments::TemplateCreateParams::Desktop::OrHash),
|
|
20
21
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
21
22
|
files: T.nilable(
|
|
22
23
|
T::Array[
|
|
@@ -47,6 +48,9 @@ module OpenAI
|
|
|
47
48
|
# Directories that contain capabilities exposed to the agent. Defaults to an empty
|
|
48
49
|
# list.
|
|
49
50
|
capability_directories: nil,
|
|
51
|
+
# Desktop provisioning. Omission or null inherits the template setting, or
|
|
52
|
+
# defaults to disabled.
|
|
53
|
+
desktop: nil,
|
|
50
54
|
# Environment variables made available to the agent.
|
|
51
55
|
env: nil,
|
|
52
56
|
# Files available before the agent starts. Defaults to an empty list.
|
|
@@ -54,7 +58,7 @@ module OpenAI
|
|
|
54
58
|
# An optional human-readable display name for the template.
|
|
55
59
|
name: nil,
|
|
56
60
|
# Network access policy for the environment. Defaults to disabled for GA requests
|
|
57
|
-
# and enabled for
|
|
61
|
+
# and enabled for beta requests.
|
|
58
62
|
network: nil,
|
|
59
63
|
# Packages to install in the environment. Defaults to empty package lists.
|
|
60
64
|
packages: nil,
|
|
@@ -91,6 +95,7 @@ module OpenAI
|
|
|
91
95
|
params(
|
|
92
96
|
environment_template_id: String,
|
|
93
97
|
capability_directories: T.nilable(T::Array[String]),
|
|
98
|
+
desktop: T.nilable(OpenAI::Beta::Agents::Environments::TemplateUpdateParams::Desktop::OrHash),
|
|
94
99
|
env: T.nilable(T::Hash[Symbol, String]),
|
|
95
100
|
files: T.nilable(
|
|
96
101
|
T::Array[
|
|
@@ -122,6 +127,8 @@ module OpenAI
|
|
|
122
127
|
environment_template_id,
|
|
123
128
|
# Directories that expose capabilities to the agent.
|
|
124
129
|
capability_directories: nil,
|
|
130
|
+
# Replacement desktop configuration, or null to disable the desktop.
|
|
131
|
+
desktop: nil,
|
|
125
132
|
# Replacement confidential environment values.
|
|
126
133
|
env: nil,
|
|
127
134
|
# Replacement file configuration materialized for each new session.
|
|
@@ -129,8 +136,8 @@ module OpenAI
|
|
|
129
136
|
# A replacement human-readable display name, or `null` to clear the name.
|
|
130
137
|
name: nil,
|
|
131
138
|
# Network access available after setup completes. Omit to preserve the current
|
|
132
|
-
# policy, or pass `null` to reset to disabled for GA requests or enabled for
|
|
133
|
-
#
|
|
139
|
+
# policy, or pass `null` to reset to disabled for GA requests or enabled for beta
|
|
140
|
+
# requests.
|
|
134
141
|
network: nil,
|
|
135
142
|
# Packages installed before the runtime network policy applies.
|
|
136
143
|
packages: nil,
|
|
@@ -22,6 +22,7 @@ module OpenAI
|
|
|
22
22
|
session_id: String,
|
|
23
23
|
events: T::Array[
|
|
24
24
|
T.any(
|
|
25
|
+
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult::OrHash,
|
|
25
26
|
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputMessage::OrHash,
|
|
26
27
|
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputCancel::OrHash,
|
|
27
28
|
OpenAI::Beta::AgentSessionInputParam::AgentSessionInputToolResult::OrHash
|
|
@@ -23,6 +23,7 @@ module OpenAI
|
|
|
23
23
|
OpenAI::Beta::Agents::Vaults::CredentialAuthCreateParam::EnvironmentVariable::OrHash
|
|
24
24
|
),
|
|
25
25
|
name: String,
|
|
26
|
+
metadata: T::Hash[Symbol, String],
|
|
26
27
|
request_options: OpenAI::RequestOptions::OrHash
|
|
27
28
|
)
|
|
28
29
|
.returns(OpenAI::Beta::Agents::Vaults::Credential)
|
|
@@ -35,6 +36,9 @@ module OpenAI
|
|
|
35
36
|
# The name is trimmed before storage. It must contain 1 to 256 UTF-8 bytes after
|
|
36
37
|
# trimming.
|
|
37
38
|
name:,
|
|
39
|
+
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
40
|
+
# characters. Defaults to an empty map.
|
|
41
|
+
metadata: nil,
|
|
38
42
|
request_options: {}
|
|
39
43
|
)
|
|
40
44
|
end
|
|
@@ -55,8 +59,7 @@ module OpenAI
|
|
|
55
59
|
)
|
|
56
60
|
end
|
|
57
61
|
|
|
58
|
-
#
|
|
59
|
-
# metadata. See
|
|
62
|
+
# Updates credential metadata or rotates its write-only secret. See
|
|
60
63
|
# [vaults](https://developers.openai.com/api/docs/guides/agents-api/tools/vaults).
|
|
61
64
|
sig {
|
|
62
65
|
params(
|
|
@@ -67,6 +70,7 @@ module OpenAI
|
|
|
67
70
|
OpenAI::Beta::Agents::Vaults::CredentialAuthRotateParam::StaticBearer::OrHash,
|
|
68
71
|
OpenAI::Beta::Agents::Vaults::CredentialAuthRotateParam::EnvironmentVariable::OrHash
|
|
69
72
|
),
|
|
73
|
+
metadata: T::Hash[Symbol, String],
|
|
70
74
|
request_options: OpenAI::RequestOptions::OrHash
|
|
71
75
|
)
|
|
72
76
|
.returns(OpenAI::Beta::Agents::Vaults::Credential)
|
|
@@ -78,7 +82,11 @@ module OpenAI
|
|
|
78
82
|
vault_id:,
|
|
79
83
|
# Body param: Replacement values for the credential's existing authentication
|
|
80
84
|
# method.
|
|
81
|
-
auth
|
|
85
|
+
auth: nil,
|
|
86
|
+
# Body param: Replaces all metadata. Omit to preserve it, or pass {} to clear it.
|
|
87
|
+
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
88
|
+
# characters.
|
|
89
|
+
metadata: nil,
|
|
82
90
|
request_options: {}
|
|
83
91
|
)
|
|
84
92
|
end
|
|
@@ -35,7 +35,8 @@ module OpenAI
|
|
|
35
35
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch::OrHash,
|
|
36
36
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling::OrHash,
|
|
37
37
|
OpenAI::Beta::PersistedAgentToolParam::Mcp::OrHash,
|
|
38
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash
|
|
38
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash,
|
|
39
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse::OrHash
|
|
39
40
|
)
|
|
40
41
|
]
|
|
41
42
|
),
|
|
@@ -100,7 +101,8 @@ module OpenAI
|
|
|
100
101
|
OpenAI::Beta::PersistedAgentToolParam::ToolSearch::OrHash,
|
|
101
102
|
OpenAI::Beta::PersistedAgentToolParam::ProgrammaticToolCalling::OrHash,
|
|
102
103
|
OpenAI::Beta::PersistedAgentToolParam::Mcp::OrHash,
|
|
103
|
-
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash
|
|
104
|
+
OpenAI::Beta::PersistedAgentToolParam::WebSearch::OrHash,
|
|
105
|
+
OpenAI::Beta::PersistedAgentToolParam::ComputerUse::OrHash
|
|
104
106
|
)
|
|
105
107
|
]
|
|
106
108
|
),
|
|
@@ -31,6 +31,7 @@ module OpenAI
|
|
|
31
31
|
# to use your own data as input for the model's response.
|
|
32
32
|
sig {
|
|
33
33
|
params(
|
|
34
|
+
access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash,
|
|
34
35
|
background: T.nilable(T::Boolean),
|
|
35
36
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
|
|
36
37
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
|
|
@@ -98,6 +99,8 @@ module OpenAI
|
|
|
98
99
|
.returns(OpenAI::Beta::BetaResponse)
|
|
99
100
|
}
|
|
100
101
|
def create(
|
|
102
|
+
# Body param: Domain-specific access programs to use for this request.
|
|
103
|
+
access_programs: nil,
|
|
101
104
|
# Body param: Whether to run the model response in the background.
|
|
102
105
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
103
106
|
background: nil,
|
|
@@ -346,6 +349,7 @@ module OpenAI
|
|
|
346
349
|
# to use your own data as input for the model's response.
|
|
347
350
|
sig {
|
|
348
351
|
params(
|
|
352
|
+
access_programs: OpenAI::Beta::ResponseCreateParams::AccessPrograms::OrHash,
|
|
349
353
|
background: T.nilable(T::Boolean),
|
|
350
354
|
context_management: T.nilable(T::Array[OpenAI::Beta::ResponseCreateParams::ContextManagement::OrHash]),
|
|
351
355
|
conversation: T.nilable(T.any(String, OpenAI::Beta::BetaResponseConversationParam::OrHash)),
|
|
@@ -417,6 +421,8 @@ module OpenAI
|
|
|
417
421
|
)
|
|
418
422
|
}
|
|
419
423
|
def stream_raw(
|
|
424
|
+
# Body param: Domain-specific access programs to use for this request.
|
|
425
|
+
access_programs: nil,
|
|
420
426
|
# Body param: Whether to run the model response in the background.
|
|
421
427
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
422
428
|
background: nil,
|
|
@@ -29,6 +29,7 @@ module OpenAI
|
|
|
29
29
|
# to use your own data as input for the model's response.
|
|
30
30
|
sig do
|
|
31
31
|
params(
|
|
32
|
+
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash,
|
|
32
33
|
background: T.nilable(T::Boolean),
|
|
33
34
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
|
|
34
35
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
|
|
@@ -97,6 +98,8 @@ module OpenAI
|
|
|
97
98
|
.returns(OpenAI::Responses::Response)
|
|
98
99
|
end
|
|
99
100
|
def create(
|
|
101
|
+
# Domain-specific access programs to use for this request.
|
|
102
|
+
access_programs: nil,
|
|
100
103
|
# Whether to run the model response in the background.
|
|
101
104
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
102
105
|
background: nil,
|
|
@@ -334,6 +337,7 @@ module OpenAI
|
|
|
334
337
|
# to use your own data as input for the model's response.
|
|
335
338
|
sig do
|
|
336
339
|
params(
|
|
340
|
+
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash,
|
|
337
341
|
background: T.nilable(T::Boolean),
|
|
338
342
|
context_management: T.nilable(T::Array[OpenAI::Responses::ResponseCreateParams::ContextManagement::OrHash]),
|
|
339
343
|
conversation: T.nilable(T.any(String, OpenAI::Responses::ResponseConversationParam::OrHash)),
|
|
@@ -408,6 +412,8 @@ module OpenAI
|
|
|
408
412
|
)
|
|
409
413
|
end
|
|
410
414
|
def stream_raw(
|
|
415
|
+
# Domain-specific access programs to use for this request.
|
|
416
|
+
access_programs: nil,
|
|
411
417
|
# Whether to run the model response in the background.
|
|
412
418
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
413
419
|
background: nil,
|
|
@@ -645,6 +651,7 @@ module OpenAI
|
|
|
645
651
|
# your own data as input for the model's response.
|
|
646
652
|
sig do
|
|
647
653
|
params(
|
|
654
|
+
access_programs: OpenAI::Responses::ResponseCreateParams::AccessPrograms::OrHash,
|
|
648
655
|
background: T.nilable(T::Boolean),
|
|
649
656
|
include: T.nilable(
|
|
650
657
|
T::Array[OpenAI::Responses::ResponseIncludable::OrSymbol]
|
|
@@ -715,6 +722,8 @@ module OpenAI
|
|
|
715
722
|
.returns(OpenAI::Streaming::ResponseStream)
|
|
716
723
|
end
|
|
717
724
|
def stream(
|
|
725
|
+
# Domain-specific access programs to use for this request.
|
|
726
|
+
access_programs: nil,
|
|
718
727
|
# Whether to run the model response in the background.
|
|
719
728
|
# [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
720
729
|
background: nil,
|
|
@@ -1134,6 +1143,7 @@ module OpenAI
|
|
|
1134
1143
|
class Response
|
|
1135
1144
|
sig do
|
|
1136
1145
|
params(
|
|
1146
|
+
access_programs: OpenAI::Responses::ResponsesClientEvent::ResponseCreate::AccessPrograms::OrHash,
|
|
1137
1147
|
background: T.nilable(T::Boolean),
|
|
1138
1148
|
context_management: T.nilable(
|
|
1139
1149
|
T::Array[OpenAI::Responses::ResponsesClientEvent::ResponseCreate::ContextManagement::OrHash]
|
|
@@ -1204,6 +1214,7 @@ module OpenAI
|
|
|
1204
1214
|
.void
|
|
1205
1215
|
end
|
|
1206
1216
|
def create(
|
|
1217
|
+
access_programs: nil,
|
|
1207
1218
|
background: nil,
|
|
1208
1219
|
context_management: nil,
|
|
1209
1220
|
conversation: nil,
|
data/responses-websocket.md
CHANGED
|
@@ -60,6 +60,61 @@ event types arrive as `OpenAI::Responses::UnknownServerEvent`. Preserve or handl
|
|
|
60
60
|
them explicitly where your application needs them. Do not assume every event
|
|
61
61
|
has a response, text delta, or lane ID.
|
|
62
62
|
|
|
63
|
+
## Receive limits
|
|
64
|
+
|
|
65
|
+
The default Responses transport accepts `max_message_bytes`,
|
|
66
|
+
`max_wire_message_bytes`, and `max_message_frames` in `transport_options`.
|
|
67
|
+
Each is an optional positive integer; omitted or `nil` keeps its unlimited default. Choose values
|
|
68
|
+
for your application's legitimate largest message, including images and tool
|
|
69
|
+
results. These are caller budgets, not API limits.
|
|
70
|
+
|
|
71
|
+
```ruby
|
|
72
|
+
client.responses.connect(
|
|
73
|
+
transport_options: {max_message_bytes: 64 * 1024 * 1024, max_message_frames: 4_096}
|
|
74
|
+
) do |connection|
|
|
75
|
+
connection.response.create(model: "gpt-5.2", input: "Hello")
|
|
76
|
+
while (event = connection.receive)
|
|
77
|
+
puts event.type
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The decoded byte budget (`max_message_bytes`) covers the payload of each complete
|
|
83
|
+
message after decompression, including all its fragments. The optional wire budget
|
|
84
|
+
(`max_wire_message_bytes`) covers data payload bytes before decompression across those
|
|
85
|
+
fragments, excluding frame headers and control frames. A wire budget alone does
|
|
86
|
+
not impose a decoded byte limit. Oversized frame headers are rejected
|
|
87
|
+
before the advertised payload is read (with up to 125 bytes allowed for a legal
|
|
88
|
+
interleaved control frame). The frame budget counts text, binary and continuation
|
|
89
|
+
frames, including empty continuations; ping/pong and close frames don't count.
|
|
90
|
+
Set both when you need to bound both payload and frame-buffer memory.
|
|
91
|
+
Counters reset at the end of each message.
|
|
92
|
+
|
|
93
|
+
To use WebSocket compression with independently bounded wire and decoded sizes:
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
limits = {
|
|
97
|
+
max_wire_message_bytes: 8 * 1024 * 1024,
|
|
98
|
+
max_message_bytes: 64 * 1024 * 1024,
|
|
99
|
+
max_message_frames: 4_096
|
|
100
|
+
}
|
|
101
|
+
client.responses.connect(transport_options: limits) do |connection|
|
|
102
|
+
connection.response.create(model: "gpt-5.2", input: "Hello")
|
|
103
|
+
while (event = connection.receive)
|
|
104
|
+
puts event.type
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The server can still decline compression, in which case both byte budgets apply
|
|
110
|
+
to the uncompressed message. Existing byte-only configurations continue to
|
|
111
|
+
decline compression, as before; no-limit and frame-only configurations retain
|
|
112
|
+
their normal compression negotiation.
|
|
113
|
+
Exceeding any chosen limit aborts the socket, releases its pool slot, and
|
|
114
|
+
raises `OpenAI::Errors::ResponsesConnectionError`; no requests are replayed.
|
|
115
|
+
Managed sessions accept the same `transport_options`. An injected transport
|
|
116
|
+
still receives its options unchanged and owns their meaning.
|
|
117
|
+
|
|
63
118
|
## Managed sessions
|
|
64
119
|
|
|
65
120
|
`OpenAI::Responses::Session.open` adds routed lanes and final-response collection
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module OpenAI
|
|
2
|
+
module Models
|
|
3
|
+
module Live
|
|
4
|
+
class TranscriptGrouper
|
|
5
|
+
type speaker = :user | :assistant
|
|
6
|
+
type close_reason =
|
|
7
|
+
:speaker_change
|
|
8
|
+
| :inactivity
|
|
9
|
+
| :timestamp_reset
|
|
10
|
+
| :session_closed
|
|
11
|
+
| :manual
|
|
12
|
+
|
|
13
|
+
class Segment < Data
|
|
14
|
+
attr_reader id: String
|
|
15
|
+
attr_reader previous_id: String?
|
|
16
|
+
attr_reader speaker: TranscriptGrouper::speaker
|
|
17
|
+
attr_reader text: String
|
|
18
|
+
attr_reader start_ms: Integer
|
|
19
|
+
attr_reader end_ms: Integer
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
class ClosedSegment < Data
|
|
23
|
+
attr_reader segment: Segment
|
|
24
|
+
attr_reader reason: TranscriptGrouper::close_reason
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
?on_segment_updated: (^(Segment) -> void)?,
|
|
29
|
+
?on_segment_closed: (^(ClosedSegment) -> void)?,
|
|
30
|
+
?min_turn_separation_ms: Integer | Float,
|
|
31
|
+
?assistant_silence_ms: Integer | Float,
|
|
32
|
+
?backchannel_max_duration_ms: Integer | Float,
|
|
33
|
+
?backchannel_isolation_ms: Integer | Float,
|
|
34
|
+
?additional_acknowledgments: Array[String]
|
|
35
|
+
) -> void
|
|
36
|
+
|
|
37
|
+
def push: (top event) -> void
|
|
38
|
+
def close: -> void
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|