openai 0.61.0 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/usage_audio_speeches_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_audio_transcriptions_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_code_interpreter_sessions_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_completions_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_costs_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_embeddings_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_images_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_moderations_response.rb +10 -1
- data/lib/openai/models/admin/organization/usage_vector_stores_response.rb +10 -1
- data/lib/openai/models/chat/chat_completion_token_logprob.rb +1 -2
- data/lib/openai/models/chat/completion_create_params.rb +4 -3
- data/lib/openai/models/image_edit_params.rb +85 -31
- data/lib/openai/models/image_generate_params.rb +78 -26
- data/lib/openai/models/image_model.rb +5 -2
- data/lib/openai/models/realtime/audio_transcription.rb +37 -5
- data/lib/openai/models/realtime/client_secret_create_response.rb +1 -2
- data/lib/openai/models/realtime/realtime_audio_config_input.rb +3 -0
- data/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +3 -0
- data/lib/openai/models/realtime/realtime_reasoning.rb +24 -0
- data/lib/openai/models/realtime/realtime_reasoning_effort.rb +22 -0
- data/lib/openai/models/realtime/realtime_response_create_params.rb +18 -1
- data/lib/openai/models/realtime/realtime_session.rb +6 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +21 -1
- data/lib/openai/models/realtime/realtime_session_create_response.rb +41 -17
- data/lib/openai/models/realtime/realtime_transcription_session_audio_input.rb +3 -0
- data/lib/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rb +3 -0
- data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +9 -5
- data/lib/openai/models/realtime/realtime_transcription_session_turn_detection.rb +2 -1
- data/lib/openai/models/realtime/realtime_translation_client_event.rb +45 -0
- data/lib/openai/models/realtime/realtime_translation_client_secret_create_request.rb +85 -0
- data/lib/openai/models/realtime/realtime_translation_client_secret_create_response.rb +42 -0
- data/lib/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rb +51 -0
- data/lib/openai/models/realtime/realtime_translation_input_transcript_delta_event.rb +55 -0
- data/lib/openai/models/realtime/realtime_translation_output_audio_delta_event.rb +89 -0
- data/lib/openai/models/realtime/realtime_translation_output_transcript_delta_event.rb +54 -0
- data/lib/openai/models/realtime/realtime_translation_server_event.rb +53 -0
- data/lib/openai/models/realtime/realtime_translation_session.rb +158 -0
- data/lib/openai/models/realtime/realtime_translation_session_close_event.rb +30 -0
- data/lib/openai/models/realtime/realtime_translation_session_closed_event.rb +28 -0
- data/lib/openai/models/realtime/realtime_translation_session_create_request.rb +138 -0
- data/lib/openai/models/realtime/realtime_translation_session_created_event.rb +38 -0
- data/lib/openai/models/realtime/realtime_translation_session_update_event.rb +43 -0
- data/lib/openai/models/realtime/realtime_translation_session_update_request.rb +129 -0
- data/lib/openai/models/realtime/realtime_translation_session_updated_event.rb +37 -0
- data/lib/openai/models/realtime/transcription_session_updated_event.rb +1 -2
- data/lib/openai/models/responses/response.rb +4 -3
- data/lib/openai/models/responses/response_create_params.rb +4 -3
- data/lib/openai/models/responses/response_includable.rb +2 -0
- data/lib/openai/models/responses/response_text_delta_event.rb +2 -2
- data/lib/openai/models/responses/response_text_done_event.rb +2 -2
- data/lib/openai/models/responses/responses_client_event.rb +4 -3
- data/lib/openai/models/responses/tool.rb +81 -16
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/images.rb +6 -6
- data/lib/openai/resources/realtime/calls.rb +5 -1
- data/lib/openai/resources/responses.rb +2 -2
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +18 -1
- data/rbi/openai/models/admin/organization/usage_audio_speeches_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_audio_transcriptions_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_completions_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_costs_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_embeddings_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_images_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_moderations_response.rbi +11 -1
- data/rbi/openai/models/admin/organization/usage_vector_stores_response.rbi +11 -1
- data/rbi/openai/models/chat/chat_completion_token_logprob.rbi +2 -4
- data/rbi/openai/models/chat/completion_create_params.rbi +6 -4
- data/rbi/openai/models/image_edit_params.rbi +102 -45
- data/rbi/openai/models/image_generate_params.rbi +93 -39
- data/rbi/openai/models/image_model.rbi +8 -3
- data/rbi/openai/models/realtime/audio_transcription.rbi +85 -6
- data/rbi/openai/models/realtime/realtime_audio_config_input.rbi +6 -0
- data/rbi/openai/models/realtime/realtime_audio_input_turn_detection.rbi +3 -0
- data/rbi/openai/models/realtime/realtime_reasoning.rbi +54 -0
- data/rbi/openai/models/realtime/realtime_reasoning_effort.rbi +44 -0
- data/rbi/openai/models/realtime/realtime_response_create_params.rbi +26 -0
- data/rbi/openai/models/realtime/realtime_session.rbi +9 -0
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +31 -0
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +53 -32
- data/rbi/openai/models/realtime/realtime_transcription_session_audio_input.rbi +6 -0
- data/rbi/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbi +3 -0
- data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +13 -7
- data/rbi/openai/models/realtime/realtime_transcription_session_turn_detection.rbi +2 -1
- data/rbi/openai/models/realtime/realtime_translation_client_event.rbi +29 -0
- data/rbi/openai/models/realtime/realtime_translation_client_secret_create_request.rbi +193 -0
- data/rbi/openai/models/realtime/realtime_translation_client_secret_create_response.rbi +69 -0
- data/rbi/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbi +69 -0
- data/rbi/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbi +77 -0
- data/rbi/openai/models/realtime/realtime_translation_output_audio_delta_event.rbi +148 -0
- data/rbi/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbi +76 -0
- data/rbi/openai/models/realtime/realtime_translation_server_event.rbi +33 -0
- data/rbi/openai/models/realtime/realtime_translation_session.rbi +339 -0
- data/rbi/openai/models/realtime/realtime_translation_session_close_event.rbi +44 -0
- data/rbi/openai/models/realtime/realtime_translation_session_closed_event.rbi +39 -0
- data/rbi/openai/models/realtime/realtime_translation_session_create_request.rbi +322 -0
- data/rbi/openai/models/realtime/realtime_translation_session_created_event.rbi +68 -0
- data/rbi/openai/models/realtime/realtime_translation_session_update_event.rbi +78 -0
- data/rbi/openai/models/realtime/realtime_translation_session_update_request.rbi +313 -0
- data/rbi/openai/models/realtime/realtime_translation_session_updated_event.rbi +67 -0
- data/rbi/openai/models/realtime/transcription_session_updated_event.rbi +0 -2
- data/rbi/openai/models/responses/response.rbi +6 -4
- data/rbi/openai/models/responses/response_create_params.rbi +6 -4
- data/rbi/openai/models/responses/response_includable.rbi +2 -0
- data/rbi/openai/models/responses/response_text_delta_event.rbi +2 -2
- data/rbi/openai/models/responses/response_text_done_event.rbi +2 -2
- data/rbi/openai/models/responses/responses_client_event.rbi +6 -4
- data/rbi/openai/models/responses/tool.rbi +122 -27
- data/rbi/openai/resources/chat/completions.rbi +6 -4
- data/rbi/openai/resources/images.rbi +110 -44
- data/rbi/openai/resources/realtime/calls.rbi +7 -0
- data/rbi/openai/resources/responses.rbi +6 -4
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_images_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +7 -2
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +7 -2
- data/sig/openai/models/image_edit_params.rbs +5 -4
- data/sig/openai/models/image_generate_params.rbs +5 -4
- data/sig/openai/models/image_model.rbs +11 -5
- data/sig/openai/models/realtime/audio_transcription.rbs +25 -0
- data/sig/openai/models/realtime/realtime_reasoning.rbs +24 -0
- data/sig/openai/models/realtime/realtime_reasoning_effort.rbs +20 -0
- data/sig/openai/models/realtime/realtime_response_create_params.rbs +16 -0
- data/sig/openai/models/realtime/realtime_session_create_request.rbs +18 -0
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +27 -4
- data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +4 -8
- data/sig/openai/models/realtime/realtime_translation_client_event.rbs +16 -0
- data/sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs +69 -0
- data/sig/openai/models/realtime/realtime_translation_client_secret_create_response.rbs +32 -0
- data/sig/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbs +34 -0
- data/sig/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbs +37 -0
- data/sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs +70 -0
- data/sig/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbs +37 -0
- data/sig/openai/models/realtime/realtime_translation_server_event.rbs +20 -0
- data/sig/openai/models/realtime/realtime_translation_session.rbs +131 -0
- data/sig/openai/models/realtime/realtime_translation_session_close_event.rbs +20 -0
- data/sig/openai/models/realtime/realtime_translation_session_closed_event.rbs +18 -0
- data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +120 -0
- data/sig/openai/models/realtime/realtime_translation_session_created_event.rbs +32 -0
- data/sig/openai/models/realtime/realtime_translation_session_update_event.rbs +34 -0
- data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +115 -0
- data/sig/openai/models/realtime/realtime_translation_session_updated_event.rbs +32 -0
- data/sig/openai/models/responses/tool.rbs +15 -5
- data/sig/openai/resources/realtime/calls.rbs +2 -0
- metadata +56 -5
- data/lib/openai/models/realtime/realtime_session_client_secret.rb +0 -36
- data/rbi/openai/models/realtime/realtime_session_client_secret.rbi +0 -49
- data/sig/openai/models/realtime/realtime_session_client_secret.rbs +0 -20
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSession < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Unique identifier for the session that looks like `sess_1234567890abcdef`.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute audio
|
|
14
|
+
# Configuration for translation input and output audio.
|
|
15
|
+
#
|
|
16
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio]
|
|
17
|
+
required :audio, -> { OpenAI::Realtime::RealtimeTranslationSession::Audio }
|
|
18
|
+
|
|
19
|
+
# @!attribute expires_at
|
|
20
|
+
# Expiration timestamp for the session, in seconds since epoch.
|
|
21
|
+
#
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
required :expires_at, Integer
|
|
24
|
+
|
|
25
|
+
# @!attribute model
|
|
26
|
+
# The Realtime translation model used for this session. This field is set at
|
|
27
|
+
# session creation and cannot be changed with `session.update`.
|
|
28
|
+
#
|
|
29
|
+
# @return [String]
|
|
30
|
+
required :model, String
|
|
31
|
+
|
|
32
|
+
# @!attribute type
|
|
33
|
+
# The session type. Always `translation` for Realtime translation sessions.
|
|
34
|
+
#
|
|
35
|
+
# @return [Symbol, :translation]
|
|
36
|
+
required :type, const: :translation
|
|
37
|
+
|
|
38
|
+
# @!method initialize(id:, audio:, expires_at:, model:, type: :translation)
|
|
39
|
+
# Some parameter documentations has been truncated, see
|
|
40
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSession} for more details.
|
|
41
|
+
#
|
|
42
|
+
# A Realtime translation session. Translation sessions continuously translate
|
|
43
|
+
# input audio into the configured output language.
|
|
44
|
+
#
|
|
45
|
+
# @param id [String] Unique identifier for the session that looks like `sess_1234567890abcdef`.
|
|
46
|
+
#
|
|
47
|
+
# @param audio [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio] Configuration for translation input and output audio.
|
|
48
|
+
#
|
|
49
|
+
# @param expires_at [Integer] Expiration timestamp for the session, in seconds since epoch.
|
|
50
|
+
#
|
|
51
|
+
# @param model [String] The Realtime translation model used for this session. This field is set at
|
|
52
|
+
#
|
|
53
|
+
# @param type [Symbol, :translation] The session type. Always `translation` for Realtime translation sessions.
|
|
54
|
+
|
|
55
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSession#audio
|
|
56
|
+
class Audio < OpenAI::Internal::Type::BaseModel
|
|
57
|
+
# @!attribute input
|
|
58
|
+
#
|
|
59
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input, nil]
|
|
60
|
+
optional :input, -> { OpenAI::Realtime::RealtimeTranslationSession::Audio::Input }
|
|
61
|
+
|
|
62
|
+
# @!attribute output
|
|
63
|
+
#
|
|
64
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Output, nil]
|
|
65
|
+
optional :output, -> { OpenAI::Realtime::RealtimeTranslationSession::Audio::Output }
|
|
66
|
+
|
|
67
|
+
# @!method initialize(input: nil, output: nil)
|
|
68
|
+
# Configuration for translation input and output audio.
|
|
69
|
+
#
|
|
70
|
+
# @param input [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input]
|
|
71
|
+
# @param output [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Output]
|
|
72
|
+
|
|
73
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSession::Audio#input
|
|
74
|
+
class Input < OpenAI::Internal::Type::BaseModel
|
|
75
|
+
# @!attribute noise_reduction
|
|
76
|
+
# Optional input noise reduction.
|
|
77
|
+
#
|
|
78
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::NoiseReduction, nil]
|
|
79
|
+
optional :noise_reduction,
|
|
80
|
+
-> { OpenAI::Realtime::RealtimeTranslationSession::Audio::Input::NoiseReduction },
|
|
81
|
+
nil?: true
|
|
82
|
+
|
|
83
|
+
# @!attribute transcription
|
|
84
|
+
# Optional source-language transcription. When configured, the server emits
|
|
85
|
+
# `session.input_transcript.delta` events. Translation itself still runs from the
|
|
86
|
+
# input audio stream.
|
|
87
|
+
#
|
|
88
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::Transcription, nil]
|
|
89
|
+
optional :transcription,
|
|
90
|
+
-> { OpenAI::Realtime::RealtimeTranslationSession::Audio::Input::Transcription },
|
|
91
|
+
nil?: true
|
|
92
|
+
|
|
93
|
+
# @!method initialize(noise_reduction: nil, transcription: nil)
|
|
94
|
+
# Some parameter documentations has been truncated, see
|
|
95
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input} for more
|
|
96
|
+
# details.
|
|
97
|
+
#
|
|
98
|
+
# @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::NoiseReduction, nil] Optional input noise reduction.
|
|
99
|
+
#
|
|
100
|
+
# @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::Transcription, nil] Optional source-language transcription. When configured, the server emits
|
|
101
|
+
|
|
102
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input#noise_reduction
|
|
103
|
+
class NoiseReduction < OpenAI::Internal::Type::BaseModel
|
|
104
|
+
# @!attribute type
|
|
105
|
+
# Type of noise reduction. `near_field` is for close-talking microphones such as
|
|
106
|
+
# headphones, `far_field` is for far-field microphones such as laptop or
|
|
107
|
+
# conference room microphones.
|
|
108
|
+
#
|
|
109
|
+
# @return [Symbol, OpenAI::Models::Realtime::NoiseReductionType]
|
|
110
|
+
required :type, enum: -> { OpenAI::Realtime::NoiseReductionType }
|
|
111
|
+
|
|
112
|
+
# @!method initialize(type:)
|
|
113
|
+
# Some parameter documentations has been truncated, see
|
|
114
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input::NoiseReduction}
|
|
115
|
+
# for more details.
|
|
116
|
+
#
|
|
117
|
+
# Optional input noise reduction.
|
|
118
|
+
#
|
|
119
|
+
# @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Input#transcription
|
|
123
|
+
class Transcription < OpenAI::Internal::Type::BaseModel
|
|
124
|
+
# @!attribute model
|
|
125
|
+
# The transcription model used for source transcript deltas.
|
|
126
|
+
#
|
|
127
|
+
# @return [String]
|
|
128
|
+
required :model, String
|
|
129
|
+
|
|
130
|
+
# @!method initialize(model:)
|
|
131
|
+
# Optional source-language transcription. When configured, the server emits
|
|
132
|
+
# `session.input_transcript.delta` events. Translation itself still runs from the
|
|
133
|
+
# input audio stream.
|
|
134
|
+
#
|
|
135
|
+
# @param model [String] The transcription model used for source transcript deltas.
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSession::Audio#output
|
|
140
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
141
|
+
# @!attribute language
|
|
142
|
+
# Target language for translated output audio and transcript deltas.
|
|
143
|
+
#
|
|
144
|
+
# @return [String, nil]
|
|
145
|
+
optional :language, String
|
|
146
|
+
|
|
147
|
+
# @!method initialize(language: nil)
|
|
148
|
+
# Some parameter documentations has been truncated, see
|
|
149
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSession::Audio::Output} for more
|
|
150
|
+
# details.
|
|
151
|
+
#
|
|
152
|
+
# @param language [String] Target language for translated output audio and transcript deltas.
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSessionCloseEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute type
|
|
8
|
+
# The event type, must be `session.close`.
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :"session.close"]
|
|
11
|
+
required :type, const: :"session.close"
|
|
12
|
+
|
|
13
|
+
# @!attribute event_id
|
|
14
|
+
# Optional client-generated ID used to identify this event.
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :event_id, String
|
|
18
|
+
|
|
19
|
+
# @!method initialize(event_id: nil, type: :"session.close")
|
|
20
|
+
# Gracefully close the realtime translation session. The server flushes pending
|
|
21
|
+
# input audio and emits any remaining translated output before closing the
|
|
22
|
+
# session.
|
|
23
|
+
#
|
|
24
|
+
# @param event_id [String] Optional client-generated ID used to identify this event.
|
|
25
|
+
#
|
|
26
|
+
# @param type [Symbol, :"session.close"] The event type, must be `session.close`.
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSessionClosedEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute event_id
|
|
8
|
+
# The unique ID of the server event.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :event_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute type
|
|
14
|
+
# The event type, must be `session.closed`.
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, :"session.closed"]
|
|
17
|
+
required :type, const: :"session.closed"
|
|
18
|
+
|
|
19
|
+
# @!method initialize(event_id:, type: :"session.closed")
|
|
20
|
+
# Returned when a realtime translation session is closed.
|
|
21
|
+
#
|
|
22
|
+
# @param event_id [String] The unique ID of the server event.
|
|
23
|
+
#
|
|
24
|
+
# @param type [Symbol, :"session.closed"] The event type, must be `session.closed`.
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSessionCreateRequest < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute model
|
|
8
|
+
# The Realtime translation model used for this session.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :model, String
|
|
12
|
+
|
|
13
|
+
# @!attribute audio
|
|
14
|
+
# Configuration for translation input and output audio.
|
|
15
|
+
#
|
|
16
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio, nil]
|
|
17
|
+
optional :audio, -> { OpenAI::Realtime::RealtimeTranslationSessionCreateRequest::Audio }
|
|
18
|
+
|
|
19
|
+
# @!method initialize(model:, audio: nil)
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest} for more
|
|
22
|
+
# details.
|
|
23
|
+
#
|
|
24
|
+
# Realtime translation session configuration. Translation sessions stream source
|
|
25
|
+
# audio in and translated audio plus transcript deltas out continuously.
|
|
26
|
+
#
|
|
27
|
+
# @param model [String] The Realtime translation model used for this session.
|
|
28
|
+
#
|
|
29
|
+
# @param audio [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio] Configuration for translation input and output audio.
|
|
30
|
+
|
|
31
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest#audio
|
|
32
|
+
class Audio < OpenAI::Internal::Type::BaseModel
|
|
33
|
+
# @!attribute input
|
|
34
|
+
#
|
|
35
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input, nil]
|
|
36
|
+
optional :input, -> { OpenAI::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input }
|
|
37
|
+
|
|
38
|
+
# @!attribute output
|
|
39
|
+
#
|
|
40
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Output, nil]
|
|
41
|
+
optional :output, -> { OpenAI::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Output }
|
|
42
|
+
|
|
43
|
+
# @!method initialize(input: nil, output: nil)
|
|
44
|
+
# Configuration for translation input and output audio.
|
|
45
|
+
#
|
|
46
|
+
# @param input [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input]
|
|
47
|
+
# @param output [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Output]
|
|
48
|
+
|
|
49
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio#input
|
|
50
|
+
class Input < OpenAI::Internal::Type::BaseModel
|
|
51
|
+
# @!attribute noise_reduction
|
|
52
|
+
# Optional input noise reduction. Set to `null` to disable it.
|
|
53
|
+
#
|
|
54
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction, nil]
|
|
55
|
+
optional :noise_reduction,
|
|
56
|
+
-> {
|
|
57
|
+
OpenAI::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction
|
|
58
|
+
},
|
|
59
|
+
nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute transcription
|
|
62
|
+
# Optional source-language transcription. When configured, the server emits
|
|
63
|
+
# `session.input_transcript.delta` events. Translation itself still runs from the
|
|
64
|
+
# input audio stream.
|
|
65
|
+
#
|
|
66
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::Transcription, nil]
|
|
67
|
+
optional :transcription,
|
|
68
|
+
-> {
|
|
69
|
+
OpenAI::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::Transcription
|
|
70
|
+
},
|
|
71
|
+
nil?: true
|
|
72
|
+
|
|
73
|
+
# @!method initialize(noise_reduction: nil, transcription: nil)
|
|
74
|
+
# Some parameter documentations has been truncated, see
|
|
75
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input}
|
|
76
|
+
# for more details.
|
|
77
|
+
#
|
|
78
|
+
# @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction, nil] Optional input noise reduction. Set to `null` to disable it.
|
|
79
|
+
#
|
|
80
|
+
# @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::Transcription, nil] Optional source-language transcription. When configured, the server emits
|
|
81
|
+
|
|
82
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input#noise_reduction
|
|
83
|
+
class NoiseReduction < OpenAI::Internal::Type::BaseModel
|
|
84
|
+
# @!attribute type
|
|
85
|
+
# Type of noise reduction. `near_field` is for close-talking microphones such as
|
|
86
|
+
# headphones, `far_field` is for far-field microphones such as laptop or
|
|
87
|
+
# conference room microphones.
|
|
88
|
+
#
|
|
89
|
+
# @return [Symbol, OpenAI::Models::Realtime::NoiseReductionType]
|
|
90
|
+
required :type, enum: -> { OpenAI::Realtime::NoiseReductionType }
|
|
91
|
+
|
|
92
|
+
# @!method initialize(type:)
|
|
93
|
+
# Some parameter documentations has been truncated, see
|
|
94
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input::NoiseReduction}
|
|
95
|
+
# for more details.
|
|
96
|
+
#
|
|
97
|
+
# Optional input noise reduction. Set to `null` to disable it.
|
|
98
|
+
#
|
|
99
|
+
# @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Input#transcription
|
|
103
|
+
class Transcription < OpenAI::Internal::Type::BaseModel
|
|
104
|
+
# @!attribute model
|
|
105
|
+
# The transcription model to use for source transcript deltas.
|
|
106
|
+
#
|
|
107
|
+
# @return [String]
|
|
108
|
+
required :model, String
|
|
109
|
+
|
|
110
|
+
# @!method initialize(model:)
|
|
111
|
+
# Optional source-language transcription. When configured, the server emits
|
|
112
|
+
# `session.input_transcript.delta` events. Translation itself still runs from the
|
|
113
|
+
# input audio stream.
|
|
114
|
+
#
|
|
115
|
+
# @param model [String] The transcription model to use for source transcript deltas.
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio#output
|
|
120
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
121
|
+
# @!attribute language
|
|
122
|
+
# Target language for translated output audio and transcript deltas.
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :language, String
|
|
126
|
+
|
|
127
|
+
# @!method initialize(language: nil)
|
|
128
|
+
# Some parameter documentations has been truncated, see
|
|
129
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionCreateRequest::Audio::Output}
|
|
130
|
+
# for more details.
|
|
131
|
+
#
|
|
132
|
+
# @param language [String] Target language for translated output audio and transcript deltas.
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSessionCreatedEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute event_id
|
|
8
|
+
# The unique ID of the server event.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :event_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute session
|
|
14
|
+
# The translation session configuration.
|
|
15
|
+
#
|
|
16
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSession]
|
|
17
|
+
required :session, -> { OpenAI::Realtime::RealtimeTranslationSession }
|
|
18
|
+
|
|
19
|
+
# @!attribute type
|
|
20
|
+
# The event type, must be `session.created`.
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, :"session.created"]
|
|
23
|
+
required :type, const: :"session.created"
|
|
24
|
+
|
|
25
|
+
# @!method initialize(event_id:, session:, type: :"session.created")
|
|
26
|
+
# Returned when a translation session is created. Emitted automatically when a new
|
|
27
|
+
# connection is established as the first server event. This event contains the
|
|
28
|
+
# default translation session configuration.
|
|
29
|
+
#
|
|
30
|
+
# @param event_id [String] The unique ID of the server event.
|
|
31
|
+
#
|
|
32
|
+
# @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] The translation session configuration.
|
|
33
|
+
#
|
|
34
|
+
# @param type [Symbol, :"session.created"] The event type, must be `session.created`.
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSessionUpdateEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute session
|
|
8
|
+
# Translation session fields to update. The session `type` and `model` are set at
|
|
9
|
+
# creation and cannot be changed with `session.update`.
|
|
10
|
+
#
|
|
11
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest]
|
|
12
|
+
required :session, -> { OpenAI::Realtime::RealtimeTranslationSessionUpdateRequest }
|
|
13
|
+
|
|
14
|
+
# @!attribute type
|
|
15
|
+
# The event type, must be `session.update`.
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, :"session.update"]
|
|
18
|
+
required :type, const: :"session.update"
|
|
19
|
+
|
|
20
|
+
# @!attribute event_id
|
|
21
|
+
# Optional client-generated ID used to identify this event.
|
|
22
|
+
#
|
|
23
|
+
# @return [String, nil]
|
|
24
|
+
optional :event_id, String
|
|
25
|
+
|
|
26
|
+
# @!method initialize(session:, event_id: nil, type: :"session.update")
|
|
27
|
+
# Some parameter documentations has been truncated, see
|
|
28
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateEvent} for more
|
|
29
|
+
# details.
|
|
30
|
+
#
|
|
31
|
+
# Send this event to update the translation session configuration. Translation
|
|
32
|
+
# sessions support updates to `audio.output.language`,
|
|
33
|
+
# `audio.input.transcription`, and `audio.input.noise_reduction`.
|
|
34
|
+
#
|
|
35
|
+
# @param session [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest] Translation session fields to update. The session `type` and `model` are set
|
|
36
|
+
#
|
|
37
|
+
# @param event_id [String] Optional client-generated ID used to identify this event.
|
|
38
|
+
#
|
|
39
|
+
# @param type [Symbol, :"session.update"] The event type, must be `session.update`.
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSessionUpdateRequest < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute audio
|
|
8
|
+
# Configuration for translation input and output audio.
|
|
9
|
+
#
|
|
10
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio, nil]
|
|
11
|
+
optional :audio, -> { OpenAI::Realtime::RealtimeTranslationSessionUpdateRequest::Audio }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(audio: nil)
|
|
14
|
+
# Some parameter documentations has been truncated, see
|
|
15
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest} for more
|
|
16
|
+
# details.
|
|
17
|
+
#
|
|
18
|
+
# Realtime translation session fields that can be updated with `session.update`.
|
|
19
|
+
#
|
|
20
|
+
# @param audio [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio] Configuration for translation input and output audio.
|
|
21
|
+
|
|
22
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest#audio
|
|
23
|
+
class Audio < OpenAI::Internal::Type::BaseModel
|
|
24
|
+
# @!attribute input
|
|
25
|
+
#
|
|
26
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input, nil]
|
|
27
|
+
optional :input, -> { OpenAI::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input }
|
|
28
|
+
|
|
29
|
+
# @!attribute output
|
|
30
|
+
#
|
|
31
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Output, nil]
|
|
32
|
+
optional :output, -> { OpenAI::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Output }
|
|
33
|
+
|
|
34
|
+
# @!method initialize(input: nil, output: nil)
|
|
35
|
+
# Configuration for translation input and output audio.
|
|
36
|
+
#
|
|
37
|
+
# @param input [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input]
|
|
38
|
+
# @param output [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Output]
|
|
39
|
+
|
|
40
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio#input
|
|
41
|
+
class Input < OpenAI::Internal::Type::BaseModel
|
|
42
|
+
# @!attribute noise_reduction
|
|
43
|
+
# Optional input noise reduction. Set to `null` to disable it.
|
|
44
|
+
#
|
|
45
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::NoiseReduction, nil]
|
|
46
|
+
optional :noise_reduction,
|
|
47
|
+
-> {
|
|
48
|
+
OpenAI::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::NoiseReduction
|
|
49
|
+
},
|
|
50
|
+
nil?: true
|
|
51
|
+
|
|
52
|
+
# @!attribute transcription
|
|
53
|
+
# Optional source-language transcription. When configured, the server emits
|
|
54
|
+
# `session.input_transcript.delta` events. Translation itself still runs from the
|
|
55
|
+
# input audio stream.
|
|
56
|
+
#
|
|
57
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::Transcription, nil]
|
|
58
|
+
optional :transcription,
|
|
59
|
+
-> {
|
|
60
|
+
OpenAI::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::Transcription
|
|
61
|
+
},
|
|
62
|
+
nil?: true
|
|
63
|
+
|
|
64
|
+
# @!method initialize(noise_reduction: nil, transcription: nil)
|
|
65
|
+
# Some parameter documentations has been truncated, see
|
|
66
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input}
|
|
67
|
+
# for more details.
|
|
68
|
+
#
|
|
69
|
+
# @param noise_reduction [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::NoiseReduction, nil] Optional input noise reduction. Set to `null` to disable it.
|
|
70
|
+
#
|
|
71
|
+
# @param transcription [OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::Transcription, nil] Optional source-language transcription. When configured, the server emits
|
|
72
|
+
|
|
73
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input#noise_reduction
|
|
74
|
+
class NoiseReduction < OpenAI::Internal::Type::BaseModel
|
|
75
|
+
# @!attribute type
|
|
76
|
+
# Type of noise reduction. `near_field` is for close-talking microphones such as
|
|
77
|
+
# headphones, `far_field` is for far-field microphones such as laptop or
|
|
78
|
+
# conference room microphones.
|
|
79
|
+
#
|
|
80
|
+
# @return [Symbol, OpenAI::Models::Realtime::NoiseReductionType]
|
|
81
|
+
required :type, enum: -> { OpenAI::Realtime::NoiseReductionType }
|
|
82
|
+
|
|
83
|
+
# @!method initialize(type:)
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input::NoiseReduction}
|
|
86
|
+
# for more details.
|
|
87
|
+
#
|
|
88
|
+
# Optional input noise reduction. Set to `null` to disable it.
|
|
89
|
+
#
|
|
90
|
+
# @param type [Symbol, OpenAI::Models::Realtime::NoiseReductionType] Type of noise reduction. `near_field` is for close-talking microphones such as h
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Input#transcription
|
|
94
|
+
class Transcription < OpenAI::Internal::Type::BaseModel
|
|
95
|
+
# @!attribute model
|
|
96
|
+
# The transcription model to use for source transcript deltas.
|
|
97
|
+
#
|
|
98
|
+
# @return [String]
|
|
99
|
+
required :model, String
|
|
100
|
+
|
|
101
|
+
# @!method initialize(model:)
|
|
102
|
+
# Optional source-language transcription. When configured, the server emits
|
|
103
|
+
# `session.input_transcript.delta` events. Translation itself still runs from the
|
|
104
|
+
# input audio stream.
|
|
105
|
+
#
|
|
106
|
+
# @param model [String] The transcription model to use for source transcript deltas.
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# @see OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio#output
|
|
111
|
+
class Output < OpenAI::Internal::Type::BaseModel
|
|
112
|
+
# @!attribute language
|
|
113
|
+
# Target language for translated output audio and transcript deltas.
|
|
114
|
+
#
|
|
115
|
+
# @return [String, nil]
|
|
116
|
+
optional :language, String
|
|
117
|
+
|
|
118
|
+
# @!method initialize(language: nil)
|
|
119
|
+
# Some parameter documentations has been truncated, see
|
|
120
|
+
# {OpenAI::Models::Realtime::RealtimeTranslationSessionUpdateRequest::Audio::Output}
|
|
121
|
+
# for more details.
|
|
122
|
+
#
|
|
123
|
+
# @param language [String] Target language for translated output audio and transcript deltas.
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Realtime
|
|
6
|
+
class RealtimeTranslationSessionUpdatedEvent < OpenAI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute event_id
|
|
8
|
+
# The unique ID of the server event.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :event_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute session
|
|
14
|
+
# The translation session configuration.
|
|
15
|
+
#
|
|
16
|
+
# @return [OpenAI::Models::Realtime::RealtimeTranslationSession]
|
|
17
|
+
required :session, -> { OpenAI::Realtime::RealtimeTranslationSession }
|
|
18
|
+
|
|
19
|
+
# @!attribute type
|
|
20
|
+
# The event type, must be `session.updated`.
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, :"session.updated"]
|
|
23
|
+
required :type, const: :"session.updated"
|
|
24
|
+
|
|
25
|
+
# @!method initialize(event_id:, session:, type: :"session.updated")
|
|
26
|
+
# Returned when a translation session is updated with a `session.update` event,
|
|
27
|
+
# unless there is an error.
|
|
28
|
+
#
|
|
29
|
+
# @param event_id [String] The unique ID of the server event.
|
|
30
|
+
#
|
|
31
|
+
# @param session [OpenAI::Models::Realtime::RealtimeTranslationSession] The translation session configuration.
|
|
32
|
+
#
|
|
33
|
+
# @param type [Symbol, :"session.updated"] The event type, must be `session.updated`.
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -55,7 +55,6 @@ module OpenAI
|
|
|
55
55
|
optional :input_audio_format, String
|
|
56
56
|
|
|
57
57
|
# @!attribute input_audio_transcription
|
|
58
|
-
# Configuration of the transcription model.
|
|
59
58
|
#
|
|
60
59
|
# @return [OpenAI::Models::Realtime::AudioTranscription, nil]
|
|
61
60
|
optional :input_audio_transcription, -> { OpenAI::Realtime::AudioTranscription }
|
|
@@ -92,7 +91,7 @@ module OpenAI
|
|
|
92
91
|
#
|
|
93
92
|
# @param input_audio_format [String] The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
|
94
93
|
#
|
|
95
|
-
# @param input_audio_transcription [OpenAI::Models::Realtime::AudioTranscription]
|
|
94
|
+
# @param input_audio_transcription [OpenAI::Models::Realtime::AudioTranscription]
|
|
96
95
|
#
|
|
97
96
|
# @param modalities [Array<Symbol, OpenAI::Models::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality>] The set of modalities the model can respond with. To disable audio,
|
|
98
97
|
#
|
|
@@ -269,8 +269,9 @@ module OpenAI
|
|
|
269
269
|
optional :text, -> { OpenAI::Responses::ResponseTextConfig }
|
|
270
270
|
|
|
271
271
|
# @!attribute top_logprobs
|
|
272
|
-
# An integer between 0 and 20 specifying the number of most likely tokens
|
|
273
|
-
# return at each token position, each with an associated log probability.
|
|
272
|
+
# An integer between 0 and 20 specifying the maximum number of most likely tokens
|
|
273
|
+
# to return at each token position, each with an associated log probability. In
|
|
274
|
+
# some cases, the number of returned tokens may be fewer than requested.
|
|
274
275
|
#
|
|
275
276
|
# @return [Integer, nil]
|
|
276
277
|
optional :top_logprobs, Integer, nil?: true
|
|
@@ -384,7 +385,7 @@ module OpenAI
|
|
|
384
385
|
#
|
|
385
386
|
# @param text [OpenAI::Models::Responses::ResponseTextConfig] Configuration options for a text response from the model. Can be plain
|
|
386
387
|
#
|
|
387
|
-
# @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the number of most likely
|
|
388
|
+
# @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely
|
|
388
389
|
#
|
|
389
390
|
# @param truncation [Symbol, OpenAI::Models::Responses::Response::Truncation, nil] The truncation strategy to use for the model response.
|
|
390
391
|
#
|
|
@@ -279,8 +279,9 @@ module OpenAI
|
|
|
279
279
|
optional :tools, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::Tool] }
|
|
280
280
|
|
|
281
281
|
# @!attribute top_logprobs
|
|
282
|
-
# An integer between 0 and 20 specifying the number of most likely tokens
|
|
283
|
-
# return at each token position, each with an associated log probability.
|
|
282
|
+
# An integer between 0 and 20 specifying the maximum number of most likely tokens
|
|
283
|
+
# to return at each token position, each with an associated log probability. In
|
|
284
|
+
# some cases, the number of returned tokens may be fewer than requested.
|
|
284
285
|
#
|
|
285
286
|
# @return [Integer, nil]
|
|
286
287
|
optional :top_logprobs, Integer, nil?: true
|
|
@@ -371,7 +372,7 @@ module OpenAI
|
|
|
371
372
|
#
|
|
372
373
|
# @param tools [Array<OpenAI::Models::Responses::FunctionTool, OpenAI::Models::Responses::FileSearchTool, OpenAI::Models::Responses::ComputerTool, OpenAI::Models::Responses::ComputerUsePreviewTool, OpenAI::Models::Responses::Tool::Mcp, OpenAI::Models::Responses::Tool::CodeInterpreter, OpenAI::Models::Responses::Tool::ImageGeneration, OpenAI::Models::Responses::Tool::LocalShell, OpenAI::Models::Responses::FunctionShellTool, OpenAI::Models::Responses::CustomTool, OpenAI::Models::Responses::NamespaceTool, OpenAI::Models::Responses::ToolSearchTool, OpenAI::Models::Responses::ApplyPatchTool, OpenAI::Models::Responses::WebSearchTool, OpenAI::Models::Responses::WebSearchPreviewTool>] An array of tools the model may call while generating a response. You
|
|
373
374
|
#
|
|
374
|
-
# @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the number of most likely
|
|
375
|
+
# @param top_logprobs [Integer, nil] An integer between 0 and 20 specifying the maximum number of most likely
|
|
375
376
|
#
|
|
376
377
|
# @param top_p [Float, nil] An alternative to sampling with temperature, called nucleus sampling,
|
|
377
378
|
#
|