openai 0.23.0 → 0.23.1
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 +8 -0
- data/README.md +1 -1
- data/lib/openai/models/realtime/client_secret_create_response.rb +6 -8
- data/lib/openai/models/realtime/realtime_audio_input_turn_detection.rb +1 -1
- data/lib/openai/models/realtime/realtime_client_event.rb +2 -6
- data/lib/openai/models/realtime/{models.rb → realtime_function_tool.rb} +6 -6
- data/lib/openai/models/realtime/realtime_response_create_params.rb +4 -4
- data/lib/openai/models/realtime/realtime_server_event.rb +1 -8
- data/lib/openai/models/realtime/realtime_session.rb +3 -3
- data/lib/openai/models/realtime/realtime_session_create_request.rb +2 -2
- data/lib/openai/models/realtime/realtime_session_create_response.rb +21 -33
- data/lib/openai/models/realtime/realtime_tools_config_union.rb +2 -2
- data/lib/openai/models/realtime/realtime_transcription_session_create_response.rb +117 -40
- data/lib/openai/models/realtime/transcription_session_updated_event.rb +152 -3
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +1 -4
- data/rbi/openai/models/realtime/realtime_audio_input_turn_detection.rbi +2 -2
- data/rbi/openai/models/realtime/realtime_client_event.rbi +1 -2
- data/rbi/openai/models/realtime/{models.rbi → realtime_function_tool.rbi} +27 -9
- data/rbi/openai/models/realtime/realtime_response_create_params.rbi +5 -5
- data/rbi/openai/models/realtime/realtime_server_event.rbi +0 -2
- data/rbi/openai/models/realtime/realtime_session.rbi +10 -4
- data/rbi/openai/models/realtime/realtime_session_create_request.rbi +4 -4
- data/rbi/openai/models/realtime/realtime_session_create_response.rbi +29 -77
- data/rbi/openai/models/realtime/realtime_tools_config_union.rbi +1 -1
- data/rbi/openai/models/realtime/realtime_transcription_session_create_response.rbi +290 -101
- data/rbi/openai/models/realtime/transcription_session_updated_event.rbi +311 -4
- data/sig/openai/models/realtime/realtime_client_event.rbs +0 -1
- data/sig/openai/models/realtime/{models.rbs → realtime_function_tool.rbs} +9 -9
- data/sig/openai/models/realtime/realtime_response_create_params.rbs +1 -1
- data/sig/openai/models/realtime/realtime_server_event.rbs +0 -2
- data/sig/openai/models/realtime/realtime_session.rbs +6 -6
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +13 -31
- data/sig/openai/models/realtime/realtime_tools_config_union.rbs +1 -1
- data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +123 -35
- data/sig/openai/models/realtime/transcription_session_updated_event.rbs +118 -4
- metadata +5 -14
- data/lib/openai/models/realtime/realtime_transcription_session_client_secret.rb +0 -38
- data/lib/openai/models/realtime/realtime_transcription_session_input_audio_transcription.rb +0 -66
- data/lib/openai/models/realtime/transcription_session_created.rb +0 -43
- data/rbi/openai/models/realtime/realtime_transcription_session_client_secret.rbi +0 -51
- data/rbi/openai/models/realtime/realtime_transcription_session_input_audio_transcription.rbi +0 -144
- data/rbi/openai/models/realtime/transcription_session_created.rbi +0 -79
- data/sig/openai/models/realtime/realtime_transcription_session_client_secret.rbs +0 -20
- data/sig/openai/models/realtime/realtime_transcription_session_input_audio_transcription.rbs +0 -59
- data/sig/openai/models/realtime/transcription_session_created.rbs +0 -32
@@ -22,14 +22,14 @@ module OpenAI
|
|
22
22
|
# contains an ephemeral key. Default TTL for keys is 10 minutes. This property is
|
23
23
|
# not present when a session is updated via the WebSocket API.
|
24
24
|
sig do
|
25
|
-
returns(OpenAI::Realtime::
|
25
|
+
returns(OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session)
|
26
26
|
end
|
27
27
|
attr_reader :session
|
28
28
|
|
29
29
|
sig do
|
30
30
|
params(
|
31
31
|
session:
|
32
|
-
OpenAI::Realtime::
|
32
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::OrHash
|
33
33
|
).void
|
34
34
|
end
|
35
35
|
attr_writer :session
|
@@ -44,7 +44,7 @@ module OpenAI
|
|
44
44
|
params(
|
45
45
|
event_id: String,
|
46
46
|
session:
|
47
|
-
OpenAI::Realtime::
|
47
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::OrHash,
|
48
48
|
type: Symbol
|
49
49
|
).returns(T.attached_class)
|
50
50
|
end
|
@@ -67,13 +67,320 @@ module OpenAI
|
|
67
67
|
{
|
68
68
|
event_id: String,
|
69
69
|
session:
|
70
|
-
OpenAI::Realtime::
|
70
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session,
|
71
71
|
type: Symbol
|
72
72
|
}
|
73
73
|
)
|
74
74
|
end
|
75
75
|
def to_hash
|
76
76
|
end
|
77
|
+
|
78
|
+
class Session < OpenAI::Internal::Type::BaseModel
|
79
|
+
OrHash =
|
80
|
+
T.type_alias do
|
81
|
+
T.any(
|
82
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session,
|
83
|
+
OpenAI::Internal::AnyHash
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Ephemeral key returned by the API. Only present when the session is created on
|
88
|
+
# the server via REST API.
|
89
|
+
sig do
|
90
|
+
returns(
|
91
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret
|
92
|
+
)
|
93
|
+
end
|
94
|
+
attr_reader :client_secret
|
95
|
+
|
96
|
+
sig do
|
97
|
+
params(
|
98
|
+
client_secret:
|
99
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret::OrHash
|
100
|
+
).void
|
101
|
+
end
|
102
|
+
attr_writer :client_secret
|
103
|
+
|
104
|
+
# The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
105
|
+
sig { returns(T.nilable(String)) }
|
106
|
+
attr_reader :input_audio_format
|
107
|
+
|
108
|
+
sig { params(input_audio_format: String).void }
|
109
|
+
attr_writer :input_audio_format
|
110
|
+
|
111
|
+
# Configuration of the transcription model.
|
112
|
+
sig { returns(T.nilable(OpenAI::Realtime::AudioTranscription)) }
|
113
|
+
attr_reader :input_audio_transcription
|
114
|
+
|
115
|
+
sig do
|
116
|
+
params(
|
117
|
+
input_audio_transcription:
|
118
|
+
OpenAI::Realtime::AudioTranscription::OrHash
|
119
|
+
).void
|
120
|
+
end
|
121
|
+
attr_writer :input_audio_transcription
|
122
|
+
|
123
|
+
# The set of modalities the model can respond with. To disable audio, set this to
|
124
|
+
# ["text"].
|
125
|
+
sig do
|
126
|
+
returns(
|
127
|
+
T.nilable(
|
128
|
+
T::Array[
|
129
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality::OrSymbol
|
130
|
+
]
|
131
|
+
)
|
132
|
+
)
|
133
|
+
end
|
134
|
+
attr_reader :modalities
|
135
|
+
|
136
|
+
sig do
|
137
|
+
params(
|
138
|
+
modalities:
|
139
|
+
T::Array[
|
140
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality::OrSymbol
|
141
|
+
]
|
142
|
+
).void
|
143
|
+
end
|
144
|
+
attr_writer :modalities
|
145
|
+
|
146
|
+
# Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
147
|
+
# means that the model will detect the start and end of speech based on audio
|
148
|
+
# volume and respond at the end of user speech.
|
149
|
+
sig do
|
150
|
+
returns(
|
151
|
+
T.nilable(
|
152
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection
|
153
|
+
)
|
154
|
+
)
|
155
|
+
end
|
156
|
+
attr_reader :turn_detection
|
157
|
+
|
158
|
+
sig do
|
159
|
+
params(
|
160
|
+
turn_detection:
|
161
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection::OrHash
|
162
|
+
).void
|
163
|
+
end
|
164
|
+
attr_writer :turn_detection
|
165
|
+
|
166
|
+
# A new Realtime transcription session configuration.
|
167
|
+
#
|
168
|
+
# When a session is created on the server via REST API, the session object also
|
169
|
+
# contains an ephemeral key. Default TTL for keys is 10 minutes. This property is
|
170
|
+
# not present when a session is updated via the WebSocket API.
|
171
|
+
sig do
|
172
|
+
params(
|
173
|
+
client_secret:
|
174
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret::OrHash,
|
175
|
+
input_audio_format: String,
|
176
|
+
input_audio_transcription:
|
177
|
+
OpenAI::Realtime::AudioTranscription::OrHash,
|
178
|
+
modalities:
|
179
|
+
T::Array[
|
180
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality::OrSymbol
|
181
|
+
],
|
182
|
+
turn_detection:
|
183
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection::OrHash
|
184
|
+
).returns(T.attached_class)
|
185
|
+
end
|
186
|
+
def self.new(
|
187
|
+
# Ephemeral key returned by the API. Only present when the session is created on
|
188
|
+
# the server via REST API.
|
189
|
+
client_secret:,
|
190
|
+
# The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.
|
191
|
+
input_audio_format: nil,
|
192
|
+
# Configuration of the transcription model.
|
193
|
+
input_audio_transcription: nil,
|
194
|
+
# The set of modalities the model can respond with. To disable audio, set this to
|
195
|
+
# ["text"].
|
196
|
+
modalities: nil,
|
197
|
+
# Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
198
|
+
# means that the model will detect the start and end of speech based on audio
|
199
|
+
# volume and respond at the end of user speech.
|
200
|
+
turn_detection: nil
|
201
|
+
)
|
202
|
+
end
|
203
|
+
|
204
|
+
sig do
|
205
|
+
override.returns(
|
206
|
+
{
|
207
|
+
client_secret:
|
208
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret,
|
209
|
+
input_audio_format: String,
|
210
|
+
input_audio_transcription: OpenAI::Realtime::AudioTranscription,
|
211
|
+
modalities:
|
212
|
+
T::Array[
|
213
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality::OrSymbol
|
214
|
+
],
|
215
|
+
turn_detection:
|
216
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection
|
217
|
+
}
|
218
|
+
)
|
219
|
+
end
|
220
|
+
def to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
class ClientSecret < OpenAI::Internal::Type::BaseModel
|
224
|
+
OrHash =
|
225
|
+
T.type_alias do
|
226
|
+
T.any(
|
227
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::ClientSecret,
|
228
|
+
OpenAI::Internal::AnyHash
|
229
|
+
)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Timestamp for when the token expires. Currently, all tokens expire after one
|
233
|
+
# minute.
|
234
|
+
sig { returns(Integer) }
|
235
|
+
attr_accessor :expires_at
|
236
|
+
|
237
|
+
# Ephemeral key usable in client environments to authenticate connections to the
|
238
|
+
# Realtime API. Use this in client-side environments rather than a standard API
|
239
|
+
# token, which should only be used server-side.
|
240
|
+
sig { returns(String) }
|
241
|
+
attr_accessor :value
|
242
|
+
|
243
|
+
# Ephemeral key returned by the API. Only present when the session is created on
|
244
|
+
# the server via REST API.
|
245
|
+
sig do
|
246
|
+
params(expires_at: Integer, value: String).returns(
|
247
|
+
T.attached_class
|
248
|
+
)
|
249
|
+
end
|
250
|
+
def self.new(
|
251
|
+
# Timestamp for when the token expires. Currently, all tokens expire after one
|
252
|
+
# minute.
|
253
|
+
expires_at:,
|
254
|
+
# Ephemeral key usable in client environments to authenticate connections to the
|
255
|
+
# Realtime API. Use this in client-side environments rather than a standard API
|
256
|
+
# token, which should only be used server-side.
|
257
|
+
value:
|
258
|
+
)
|
259
|
+
end
|
260
|
+
|
261
|
+
sig { override.returns({ expires_at: Integer, value: String }) }
|
262
|
+
def to_hash
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
module Modality
|
267
|
+
extend OpenAI::Internal::Type::Enum
|
268
|
+
|
269
|
+
TaggedSymbol =
|
270
|
+
T.type_alias do
|
271
|
+
T.all(
|
272
|
+
Symbol,
|
273
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality
|
274
|
+
)
|
275
|
+
end
|
276
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
277
|
+
|
278
|
+
TEXT =
|
279
|
+
T.let(
|
280
|
+
:text,
|
281
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality::TaggedSymbol
|
282
|
+
)
|
283
|
+
AUDIO =
|
284
|
+
T.let(
|
285
|
+
:audio,
|
286
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality::TaggedSymbol
|
287
|
+
)
|
288
|
+
|
289
|
+
sig do
|
290
|
+
override.returns(
|
291
|
+
T::Array[
|
292
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::Modality::TaggedSymbol
|
293
|
+
]
|
294
|
+
)
|
295
|
+
end
|
296
|
+
def self.values
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
class TurnDetection < OpenAI::Internal::Type::BaseModel
|
301
|
+
OrHash =
|
302
|
+
T.type_alias do
|
303
|
+
T.any(
|
304
|
+
OpenAI::Realtime::TranscriptionSessionUpdatedEvent::Session::TurnDetection,
|
305
|
+
OpenAI::Internal::AnyHash
|
306
|
+
)
|
307
|
+
end
|
308
|
+
|
309
|
+
# Amount of audio to include before the VAD detected speech (in milliseconds).
|
310
|
+
# Defaults to 300ms.
|
311
|
+
sig { returns(T.nilable(Integer)) }
|
312
|
+
attr_reader :prefix_padding_ms
|
313
|
+
|
314
|
+
sig { params(prefix_padding_ms: Integer).void }
|
315
|
+
attr_writer :prefix_padding_ms
|
316
|
+
|
317
|
+
# Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
|
318
|
+
# With shorter values the model will respond more quickly, but may jump in on
|
319
|
+
# short pauses from the user.
|
320
|
+
sig { returns(T.nilable(Integer)) }
|
321
|
+
attr_reader :silence_duration_ms
|
322
|
+
|
323
|
+
sig { params(silence_duration_ms: Integer).void }
|
324
|
+
attr_writer :silence_duration_ms
|
325
|
+
|
326
|
+
# Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
|
327
|
+
# threshold will require louder audio to activate the model, and thus might
|
328
|
+
# perform better in noisy environments.
|
329
|
+
sig { returns(T.nilable(Float)) }
|
330
|
+
attr_reader :threshold
|
331
|
+
|
332
|
+
sig { params(threshold: Float).void }
|
333
|
+
attr_writer :threshold
|
334
|
+
|
335
|
+
# Type of turn detection, only `server_vad` is currently supported.
|
336
|
+
sig { returns(T.nilable(String)) }
|
337
|
+
attr_reader :type
|
338
|
+
|
339
|
+
sig { params(type: String).void }
|
340
|
+
attr_writer :type
|
341
|
+
|
342
|
+
# Configuration for turn detection. Can be set to `null` to turn off. Server VAD
|
343
|
+
# means that the model will detect the start and end of speech based on audio
|
344
|
+
# volume and respond at the end of user speech.
|
345
|
+
sig do
|
346
|
+
params(
|
347
|
+
prefix_padding_ms: Integer,
|
348
|
+
silence_duration_ms: Integer,
|
349
|
+
threshold: Float,
|
350
|
+
type: String
|
351
|
+
).returns(T.attached_class)
|
352
|
+
end
|
353
|
+
def self.new(
|
354
|
+
# Amount of audio to include before the VAD detected speech (in milliseconds).
|
355
|
+
# Defaults to 300ms.
|
356
|
+
prefix_padding_ms: nil,
|
357
|
+
# Duration of silence to detect speech stop (in milliseconds). Defaults to 500ms.
|
358
|
+
# With shorter values the model will respond more quickly, but may jump in on
|
359
|
+
# short pauses from the user.
|
360
|
+
silence_duration_ms: nil,
|
361
|
+
# Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher
|
362
|
+
# threshold will require louder audio to activate the model, and thus might
|
363
|
+
# perform better in noisy environments.
|
364
|
+
threshold: nil,
|
365
|
+
# Type of turn detection, only `server_vad` is currently supported.
|
366
|
+
type: nil
|
367
|
+
)
|
368
|
+
end
|
369
|
+
|
370
|
+
sig do
|
371
|
+
override.returns(
|
372
|
+
{
|
373
|
+
prefix_padding_ms: Integer,
|
374
|
+
silence_duration_ms: Integer,
|
375
|
+
threshold: Float,
|
376
|
+
type: String
|
377
|
+
}
|
378
|
+
)
|
379
|
+
end
|
380
|
+
def to_hash
|
381
|
+
end
|
382
|
+
end
|
383
|
+
end
|
77
384
|
end
|
78
385
|
end
|
79
386
|
end
|
@@ -13,7 +13,6 @@ module OpenAI
|
|
13
13
|
| OpenAI::Realtime::ResponseCancelEvent
|
14
14
|
| OpenAI::Realtime::ResponseCreateEvent
|
15
15
|
| OpenAI::Realtime::SessionUpdateEvent
|
16
|
-
| OpenAI::Realtime::TranscriptionSessionUpdate
|
17
16
|
|
18
17
|
module RealtimeClientEvent
|
19
18
|
extend OpenAI::Internal::Type::Union
|
@@ -1,15 +1,15 @@
|
|
1
1
|
module OpenAI
|
2
2
|
module Models
|
3
3
|
module Realtime
|
4
|
-
type
|
4
|
+
type realtime_function_tool =
|
5
5
|
{
|
6
6
|
description: String,
|
7
7
|
name: String,
|
8
8
|
parameters: top,
|
9
|
-
type: OpenAI::Models::Realtime::
|
9
|
+
type: OpenAI::Models::Realtime::RealtimeFunctionTool::type_
|
10
10
|
}
|
11
11
|
|
12
|
-
class
|
12
|
+
class RealtimeFunctionTool < OpenAI::Internal::Type::BaseModel
|
13
13
|
attr_reader description: String?
|
14
14
|
|
15
15
|
def description=: (String) -> String
|
@@ -22,24 +22,24 @@ module OpenAI
|
|
22
22
|
|
23
23
|
def parameters=: (top) -> top
|
24
24
|
|
25
|
-
attr_reader type: OpenAI::Models::Realtime::
|
25
|
+
attr_reader type: OpenAI::Models::Realtime::RealtimeFunctionTool::type_?
|
26
26
|
|
27
27
|
def type=: (
|
28
|
-
OpenAI::Models::Realtime::
|
29
|
-
) -> OpenAI::Models::Realtime::
|
28
|
+
OpenAI::Models::Realtime::RealtimeFunctionTool::type_
|
29
|
+
) -> OpenAI::Models::Realtime::RealtimeFunctionTool::type_
|
30
30
|
|
31
31
|
def initialize: (
|
32
32
|
?description: String,
|
33
33
|
?name: String,
|
34
34
|
?parameters: top,
|
35
|
-
?type: OpenAI::Models::Realtime::
|
35
|
+
?type: OpenAI::Models::Realtime::RealtimeFunctionTool::type_
|
36
36
|
) -> void
|
37
37
|
|
38
38
|
def to_hash: -> {
|
39
39
|
description: String,
|
40
40
|
name: String,
|
41
41
|
parameters: top,
|
42
|
-
type: OpenAI::Models::Realtime::
|
42
|
+
type: OpenAI::Models::Realtime::RealtimeFunctionTool::type_
|
43
43
|
}
|
44
44
|
|
45
45
|
type type_ = :function
|
@@ -49,7 +49,7 @@ module OpenAI
|
|
49
49
|
|
50
50
|
FUNCTION: :function
|
51
51
|
|
52
|
-
def self?.values: -> ::Array[OpenAI::Models::Realtime::
|
52
|
+
def self?.values: -> ::Array[OpenAI::Models::Realtime::RealtimeFunctionTool::type_]
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
@@ -32,8 +32,6 @@ module OpenAI
|
|
32
32
|
| OpenAI::Realtime::ResponseTextDoneEvent
|
33
33
|
| OpenAI::Realtime::SessionCreatedEvent
|
34
34
|
| OpenAI::Realtime::SessionUpdatedEvent
|
35
|
-
| OpenAI::Realtime::TranscriptionSessionUpdatedEvent
|
36
|
-
| OpenAI::Realtime::TranscriptionSessionCreated
|
37
35
|
| OpenAI::Realtime::RealtimeServerEvent::OutputAudioBufferStarted
|
38
36
|
| OpenAI::Realtime::RealtimeServerEvent::OutputAudioBufferStopped
|
39
37
|
| OpenAI::Realtime::RealtimeServerEvent::OutputAudioBufferCleared
|
@@ -19,7 +19,7 @@ module OpenAI
|
|
19
19
|
speed: Float,
|
20
20
|
temperature: Float,
|
21
21
|
tool_choice: String,
|
22
|
-
tools: ::Array[OpenAI::Realtime::
|
22
|
+
tools: ::Array[OpenAI::Realtime::RealtimeFunctionTool],
|
23
23
|
tracing: OpenAI::Models::Realtime::RealtimeSession::tracing?,
|
24
24
|
turn_detection: OpenAI::Realtime::RealtimeSession::TurnDetection?,
|
25
25
|
voice: OpenAI::Models::Realtime::RealtimeSession::voice
|
@@ -98,11 +98,11 @@ module OpenAI
|
|
98
98
|
|
99
99
|
def tool_choice=: (String) -> String
|
100
100
|
|
101
|
-
attr_reader tools: ::Array[OpenAI::Realtime::
|
101
|
+
attr_reader tools: ::Array[OpenAI::Realtime::RealtimeFunctionTool]?
|
102
102
|
|
103
103
|
def tools=: (
|
104
|
-
::Array[OpenAI::Realtime::
|
105
|
-
) -> ::Array[OpenAI::Realtime::
|
104
|
+
::Array[OpenAI::Realtime::RealtimeFunctionTool]
|
105
|
+
) -> ::Array[OpenAI::Realtime::RealtimeFunctionTool]
|
106
106
|
|
107
107
|
attr_accessor tracing: OpenAI::Models::Realtime::RealtimeSession::tracing?
|
108
108
|
|
@@ -131,7 +131,7 @@ module OpenAI
|
|
131
131
|
?speed: Float,
|
132
132
|
?temperature: Float,
|
133
133
|
?tool_choice: String,
|
134
|
-
?tools: ::Array[OpenAI::Realtime::
|
134
|
+
?tools: ::Array[OpenAI::Realtime::RealtimeFunctionTool],
|
135
135
|
?tracing: OpenAI::Models::Realtime::RealtimeSession::tracing?,
|
136
136
|
?turn_detection: OpenAI::Realtime::RealtimeSession::TurnDetection?,
|
137
137
|
?voice: OpenAI::Models::Realtime::RealtimeSession::voice
|
@@ -154,7 +154,7 @@ module OpenAI
|
|
154
154
|
speed: Float,
|
155
155
|
temperature: Float,
|
156
156
|
tool_choice: String,
|
157
|
-
tools: ::Array[OpenAI::Realtime::
|
157
|
+
tools: ::Array[OpenAI::Realtime::RealtimeFunctionTool],
|
158
158
|
tracing: OpenAI::Models::Realtime::RealtimeSession::tracing?,
|
159
159
|
turn_detection: OpenAI::Realtime::RealtimeSession::TurnDetection?,
|
160
160
|
voice: OpenAI::Models::Realtime::RealtimeSession::voice
|
@@ -5,8 +5,9 @@ module OpenAI
|
|
5
5
|
module Realtime
|
6
6
|
type realtime_session_create_response =
|
7
7
|
{
|
8
|
-
audio: OpenAI::Realtime::RealtimeSessionCreateResponse::Audio,
|
9
8
|
client_secret: OpenAI::Realtime::RealtimeSessionClientSecret,
|
9
|
+
type: :realtime,
|
10
|
+
audio: OpenAI::Realtime::RealtimeSessionCreateResponse::Audio,
|
10
11
|
include: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::include_],
|
11
12
|
instructions: String,
|
12
13
|
max_output_tokens: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::max_output_tokens,
|
@@ -16,23 +17,20 @@ module OpenAI
|
|
16
17
|
tool_choice: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tool_choice,
|
17
18
|
tools: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tool],
|
18
19
|
tracing: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tracing?,
|
19
|
-
truncation: OpenAI::Models::Realtime::realtime_truncation
|
20
|
-
type: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::type_
|
20
|
+
truncation: OpenAI::Models::Realtime::realtime_truncation
|
21
21
|
}
|
22
22
|
|
23
23
|
class RealtimeSessionCreateResponse < OpenAI::Internal::Type::BaseModel
|
24
|
+
attr_accessor client_secret: OpenAI::Realtime::RealtimeSessionClientSecret
|
25
|
+
|
26
|
+
attr_accessor type: :realtime
|
27
|
+
|
24
28
|
attr_reader audio: OpenAI::Realtime::RealtimeSessionCreateResponse::Audio?
|
25
29
|
|
26
30
|
def audio=: (
|
27
31
|
OpenAI::Realtime::RealtimeSessionCreateResponse::Audio
|
28
32
|
) -> OpenAI::Realtime::RealtimeSessionCreateResponse::Audio
|
29
33
|
|
30
|
-
attr_reader client_secret: OpenAI::Realtime::RealtimeSessionClientSecret?
|
31
|
-
|
32
|
-
def client_secret=: (
|
33
|
-
OpenAI::Realtime::RealtimeSessionClientSecret
|
34
|
-
) -> OpenAI::Realtime::RealtimeSessionClientSecret
|
35
|
-
|
36
34
|
attr_reader include: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::include_]?
|
37
35
|
|
38
36
|
def include=: (
|
@@ -83,15 +81,9 @@ module OpenAI
|
|
83
81
|
OpenAI::Models::Realtime::realtime_truncation
|
84
82
|
) -> OpenAI::Models::Realtime::realtime_truncation
|
85
83
|
|
86
|
-
attr_reader type: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::type_?
|
87
|
-
|
88
|
-
def type=: (
|
89
|
-
OpenAI::Models::Realtime::RealtimeSessionCreateResponse::type_
|
90
|
-
) -> OpenAI::Models::Realtime::RealtimeSessionCreateResponse::type_
|
91
|
-
|
92
84
|
def initialize: (
|
85
|
+
client_secret: OpenAI::Realtime::RealtimeSessionClientSecret,
|
93
86
|
?audio: OpenAI::Realtime::RealtimeSessionCreateResponse::Audio,
|
94
|
-
?client_secret: OpenAI::Realtime::RealtimeSessionClientSecret,
|
95
87
|
?include: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::include_],
|
96
88
|
?instructions: String,
|
97
89
|
?max_output_tokens: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::max_output_tokens,
|
@@ -102,12 +94,13 @@ module OpenAI
|
|
102
94
|
?tools: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tool],
|
103
95
|
?tracing: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tracing?,
|
104
96
|
?truncation: OpenAI::Models::Realtime::realtime_truncation,
|
105
|
-
?type:
|
97
|
+
?type: :realtime
|
106
98
|
) -> void
|
107
99
|
|
108
100
|
def to_hash: -> {
|
109
|
-
audio: OpenAI::Realtime::RealtimeSessionCreateResponse::Audio,
|
110
101
|
client_secret: OpenAI::Realtime::RealtimeSessionClientSecret,
|
102
|
+
type: :realtime,
|
103
|
+
audio: OpenAI::Realtime::RealtimeSessionCreateResponse::Audio,
|
111
104
|
include: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::include_],
|
112
105
|
instructions: String,
|
113
106
|
max_output_tokens: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::max_output_tokens,
|
@@ -117,8 +110,7 @@ module OpenAI
|
|
117
110
|
tool_choice: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tool_choice,
|
118
111
|
tools: ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tool],
|
119
112
|
tracing: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tracing?,
|
120
|
-
truncation: OpenAI::Models::Realtime::realtime_truncation
|
121
|
-
type: OpenAI::Models::Realtime::RealtimeSessionCreateResponse::type_
|
113
|
+
truncation: OpenAI::Models::Realtime::realtime_truncation
|
122
114
|
}
|
123
115
|
|
124
116
|
type audio =
|
@@ -446,7 +438,7 @@ module OpenAI
|
|
446
438
|
end
|
447
439
|
|
448
440
|
type tool =
|
449
|
-
OpenAI::Realtime::
|
441
|
+
OpenAI::Realtime::RealtimeFunctionTool
|
450
442
|
| OpenAI::Realtime::RealtimeSessionCreateResponse::Tool::McpTool
|
451
443
|
|
452
444
|
module Tool
|
@@ -712,16 +704,6 @@ module OpenAI
|
|
712
704
|
|
713
705
|
def self?.variants: -> ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::tracing]
|
714
706
|
end
|
715
|
-
|
716
|
-
type type_ = :realtime
|
717
|
-
|
718
|
-
module Type
|
719
|
-
extend OpenAI::Internal::Type::Enum
|
720
|
-
|
721
|
-
REALTIME: :realtime
|
722
|
-
|
723
|
-
def self?.values: -> ::Array[OpenAI::Models::Realtime::RealtimeSessionCreateResponse::type_]
|
724
|
-
end
|
725
707
|
end
|
726
708
|
end
|
727
709
|
end
|