telnyx 5.91.0 → 5.93.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 +16 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/assistant_create_params.rb +480 -34
- data/lib/telnyx/models/ai/assistant_update_params.rb +481 -27
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +487 -27
- data/lib/telnyx/models/ai/inference_embedding.rb +505 -26
- data/lib/telnyx/models/calls/transcription_start_request.rb +171 -3
- data/lib/telnyx/resources/ai/assistants/versions.rb +21 -9
- data/lib/telnyx/resources/ai/assistants.rb +41 -19
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +0 -6
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +945 -44
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +945 -36
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +967 -36
- data/rbi/telnyx/models/ai/inference_embedding.rbi +972 -36
- data/rbi/telnyx/models/calls/transcription_start_request.rbi +490 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +66 -16
- data/rbi/telnyx/resources/ai/assistants.rbi +122 -33
- data/rbi/telnyx/resources/calls/actions.rbi +2 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +377 -23
- data/sig/telnyx/models/ai/assistant_update_params.rbs +377 -18
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +380 -18
- data/sig/telnyx/models/ai/inference_embedding.rbs +399 -17
- data/sig/telnyx/models/calls/transcription_start_request.rbs +187 -1
- data/sig/telnyx/resources/ai/assistants/versions.rbs +9 -3
- data/sig/telnyx/resources/ai/assistants.rbs +18 -7
- metadata +1 -19
- data/lib/telnyx/models/ai/external_llm.rb +0 -87
- data/lib/telnyx/models/ai/external_llm_req.rb +0 -87
- data/lib/telnyx/models/ai/fallback_config.rb +0 -37
- data/lib/telnyx/models/ai/fallback_config_req.rb +0 -37
- data/lib/telnyx/models/ai/post_conversation_settings.rb +0 -30
- data/lib/telnyx/models/ai/post_conversation_settings_req.rb +0 -30
- data/rbi/telnyx/models/ai/external_llm.rbi +0 -157
- data/rbi/telnyx/models/ai/external_llm_req.rbi +0 -157
- data/rbi/telnyx/models/ai/fallback_config.rbi +0 -64
- data/rbi/telnyx/models/ai/fallback_config_req.rbi +0 -64
- data/rbi/telnyx/models/ai/post_conversation_settings.rbi +0 -45
- data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +0 -45
- data/sig/telnyx/models/ai/external_llm.rbs +0 -75
- data/sig/telnyx/models/ai/external_llm_req.rbs +0 -75
- data/sig/telnyx/models/ai/fallback_config.rbs +0 -38
- data/sig/telnyx/models/ai/fallback_config_req.rbs +0 -40
- data/sig/telnyx/models/ai/post_conversation_settings.rbs +0 -17
- data/sig/telnyx/models/ai/post_conversation_settings_req.rbs +0 -17
|
@@ -54,6 +54,8 @@ module Telnyx
|
|
|
54
54
|
Telnyx::Calls::TranscriptionEngineGoogleConfig,
|
|
55
55
|
Telnyx::Calls::TranscriptionEngineTelnyxConfig,
|
|
56
56
|
Telnyx::Calls::TranscriptionEngineAzureConfig,
|
|
57
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI,
|
|
58
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI,
|
|
57
59
|
Telnyx::Calls::TranscriptionEngineAConfig,
|
|
58
60
|
Telnyx::Calls::TranscriptionEngineBConfig,
|
|
59
61
|
Telnyx::Calls::DeepgramNova2Config,
|
|
@@ -71,6 +73,8 @@ module Telnyx
|
|
|
71
73
|
Telnyx::Calls::TranscriptionEngineGoogleConfig::OrHash,
|
|
72
74
|
Telnyx::Calls::TranscriptionEngineTelnyxConfig::OrHash,
|
|
73
75
|
Telnyx::Calls::TranscriptionEngineAzureConfig::OrHash,
|
|
76
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::OrHash,
|
|
77
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::OrHash,
|
|
74
78
|
Telnyx::Calls::TranscriptionEngineAConfig::OrHash,
|
|
75
79
|
Telnyx::Calls::TranscriptionEngineBConfig::OrHash,
|
|
76
80
|
Telnyx::Calls::DeepgramNova2Config::OrHash,
|
|
@@ -100,6 +104,8 @@ module Telnyx
|
|
|
100
104
|
Telnyx::Calls::TranscriptionEngineGoogleConfig::OrHash,
|
|
101
105
|
Telnyx::Calls::TranscriptionEngineTelnyxConfig::OrHash,
|
|
102
106
|
Telnyx::Calls::TranscriptionEngineAzureConfig::OrHash,
|
|
107
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::OrHash,
|
|
108
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::OrHash,
|
|
103
109
|
Telnyx::Calls::TranscriptionEngineAConfig::OrHash,
|
|
104
110
|
Telnyx::Calls::TranscriptionEngineBConfig::OrHash,
|
|
105
111
|
Telnyx::Calls::DeepgramNova2Config::OrHash,
|
|
@@ -138,6 +144,8 @@ module Telnyx
|
|
|
138
144
|
Telnyx::Calls::TranscriptionEngineGoogleConfig,
|
|
139
145
|
Telnyx::Calls::TranscriptionEngineTelnyxConfig,
|
|
140
146
|
Telnyx::Calls::TranscriptionEngineAzureConfig,
|
|
147
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI,
|
|
148
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI,
|
|
141
149
|
Telnyx::Calls::TranscriptionEngineAConfig,
|
|
142
150
|
Telnyx::Calls::TranscriptionEngineBConfig,
|
|
143
151
|
Telnyx::Calls::DeepgramNova2Config,
|
|
@@ -184,6 +192,16 @@ module Telnyx
|
|
|
184
192
|
:Azure,
|
|
185
193
|
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngine::TaggedSymbol
|
|
186
194
|
)
|
|
195
|
+
X_AI =
|
|
196
|
+
T.let(
|
|
197
|
+
:xAI,
|
|
198
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngine::TaggedSymbol
|
|
199
|
+
)
|
|
200
|
+
ASSEMBLY_AI =
|
|
201
|
+
T.let(
|
|
202
|
+
:AssemblyAI,
|
|
203
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngine::TaggedSymbol
|
|
204
|
+
)
|
|
187
205
|
A =
|
|
188
206
|
T.let(
|
|
189
207
|
:A,
|
|
@@ -215,6 +233,8 @@ module Telnyx
|
|
|
215
233
|
Telnyx::Calls::TranscriptionEngineGoogleConfig,
|
|
216
234
|
Telnyx::Calls::TranscriptionEngineTelnyxConfig,
|
|
217
235
|
Telnyx::Calls::TranscriptionEngineAzureConfig,
|
|
236
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI,
|
|
237
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI,
|
|
218
238
|
Telnyx::Calls::TranscriptionEngineAConfig,
|
|
219
239
|
Telnyx::Calls::TranscriptionEngineBConfig,
|
|
220
240
|
Telnyx::Calls::DeepgramNova2Config,
|
|
@@ -222,6 +242,476 @@ module Telnyx
|
|
|
222
242
|
)
|
|
223
243
|
end
|
|
224
244
|
|
|
245
|
+
class XAI < Telnyx::Internal::Type::BaseModel
|
|
246
|
+
OrHash =
|
|
247
|
+
T.type_alias do
|
|
248
|
+
T.any(
|
|
249
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI,
|
|
250
|
+
Telnyx::Internal::AnyHash
|
|
251
|
+
)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Whether to send also interim results. If set to false, only final results will
|
|
255
|
+
# be sent.
|
|
256
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
257
|
+
attr_reader :interim_results
|
|
258
|
+
|
|
259
|
+
sig { params(interim_results: T::Boolean).void }
|
|
260
|
+
attr_writer :interim_results
|
|
261
|
+
|
|
262
|
+
# Language to use for speech recognition
|
|
263
|
+
sig do
|
|
264
|
+
returns(
|
|
265
|
+
T.nilable(
|
|
266
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::OrSymbol
|
|
267
|
+
)
|
|
268
|
+
)
|
|
269
|
+
end
|
|
270
|
+
attr_reader :language
|
|
271
|
+
|
|
272
|
+
sig do
|
|
273
|
+
params(
|
|
274
|
+
language:
|
|
275
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::OrSymbol
|
|
276
|
+
).void
|
|
277
|
+
end
|
|
278
|
+
attr_writer :language
|
|
279
|
+
|
|
280
|
+
# Engine identifier for xAI transcription service
|
|
281
|
+
sig do
|
|
282
|
+
returns(
|
|
283
|
+
T.nilable(
|
|
284
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionEngine::OrSymbol
|
|
285
|
+
)
|
|
286
|
+
)
|
|
287
|
+
end
|
|
288
|
+
attr_reader :transcription_engine
|
|
289
|
+
|
|
290
|
+
sig do
|
|
291
|
+
params(
|
|
292
|
+
transcription_engine:
|
|
293
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionEngine::OrSymbol
|
|
294
|
+
).void
|
|
295
|
+
end
|
|
296
|
+
attr_writer :transcription_engine
|
|
297
|
+
|
|
298
|
+
# The model to use for transcription.
|
|
299
|
+
sig do
|
|
300
|
+
returns(
|
|
301
|
+
T.nilable(
|
|
302
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionModel::OrSymbol
|
|
303
|
+
)
|
|
304
|
+
)
|
|
305
|
+
end
|
|
306
|
+
attr_reader :transcription_model
|
|
307
|
+
|
|
308
|
+
sig do
|
|
309
|
+
params(
|
|
310
|
+
transcription_model:
|
|
311
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionModel::OrSymbol
|
|
312
|
+
).void
|
|
313
|
+
end
|
|
314
|
+
attr_writer :transcription_model
|
|
315
|
+
|
|
316
|
+
sig do
|
|
317
|
+
params(
|
|
318
|
+
interim_results: T::Boolean,
|
|
319
|
+
language:
|
|
320
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::OrSymbol,
|
|
321
|
+
transcription_engine:
|
|
322
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionEngine::OrSymbol,
|
|
323
|
+
transcription_model:
|
|
324
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionModel::OrSymbol
|
|
325
|
+
).returns(T.attached_class)
|
|
326
|
+
end
|
|
327
|
+
def self.new(
|
|
328
|
+
# Whether to send also interim results. If set to false, only final results will
|
|
329
|
+
# be sent.
|
|
330
|
+
interim_results: nil,
|
|
331
|
+
# Language to use for speech recognition
|
|
332
|
+
language: nil,
|
|
333
|
+
# Engine identifier for xAI transcription service
|
|
334
|
+
transcription_engine: nil,
|
|
335
|
+
# The model to use for transcription.
|
|
336
|
+
transcription_model: nil
|
|
337
|
+
)
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
sig do
|
|
341
|
+
override.returns(
|
|
342
|
+
{
|
|
343
|
+
interim_results: T::Boolean,
|
|
344
|
+
language:
|
|
345
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::OrSymbol,
|
|
346
|
+
transcription_engine:
|
|
347
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionEngine::OrSymbol,
|
|
348
|
+
transcription_model:
|
|
349
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionModel::OrSymbol
|
|
350
|
+
}
|
|
351
|
+
)
|
|
352
|
+
end
|
|
353
|
+
def to_hash
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Language to use for speech recognition
|
|
357
|
+
module Language
|
|
358
|
+
extend Telnyx::Internal::Type::Enum
|
|
359
|
+
|
|
360
|
+
TaggedSymbol =
|
|
361
|
+
T.type_alias do
|
|
362
|
+
T.all(
|
|
363
|
+
Symbol,
|
|
364
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
368
|
+
|
|
369
|
+
AR =
|
|
370
|
+
T.let(
|
|
371
|
+
:ar,
|
|
372
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
373
|
+
)
|
|
374
|
+
CS =
|
|
375
|
+
T.let(
|
|
376
|
+
:cs,
|
|
377
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
378
|
+
)
|
|
379
|
+
DA =
|
|
380
|
+
T.let(
|
|
381
|
+
:da,
|
|
382
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
383
|
+
)
|
|
384
|
+
DE =
|
|
385
|
+
T.let(
|
|
386
|
+
:de,
|
|
387
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
388
|
+
)
|
|
389
|
+
EN =
|
|
390
|
+
T.let(
|
|
391
|
+
:en,
|
|
392
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
393
|
+
)
|
|
394
|
+
ES =
|
|
395
|
+
T.let(
|
|
396
|
+
:es,
|
|
397
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
398
|
+
)
|
|
399
|
+
FA =
|
|
400
|
+
T.let(
|
|
401
|
+
:fa,
|
|
402
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
403
|
+
)
|
|
404
|
+
FIL =
|
|
405
|
+
T.let(
|
|
406
|
+
:fil,
|
|
407
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
408
|
+
)
|
|
409
|
+
FR =
|
|
410
|
+
T.let(
|
|
411
|
+
:fr,
|
|
412
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
413
|
+
)
|
|
414
|
+
HI =
|
|
415
|
+
T.let(
|
|
416
|
+
:hi,
|
|
417
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
418
|
+
)
|
|
419
|
+
ID =
|
|
420
|
+
T.let(
|
|
421
|
+
:id,
|
|
422
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
423
|
+
)
|
|
424
|
+
IT =
|
|
425
|
+
T.let(
|
|
426
|
+
:it,
|
|
427
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
428
|
+
)
|
|
429
|
+
JA =
|
|
430
|
+
T.let(
|
|
431
|
+
:ja,
|
|
432
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
433
|
+
)
|
|
434
|
+
KO =
|
|
435
|
+
T.let(
|
|
436
|
+
:ko,
|
|
437
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
438
|
+
)
|
|
439
|
+
MK =
|
|
440
|
+
T.let(
|
|
441
|
+
:mk,
|
|
442
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
443
|
+
)
|
|
444
|
+
MS =
|
|
445
|
+
T.let(
|
|
446
|
+
:ms,
|
|
447
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
448
|
+
)
|
|
449
|
+
NL =
|
|
450
|
+
T.let(
|
|
451
|
+
:nl,
|
|
452
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
453
|
+
)
|
|
454
|
+
PL =
|
|
455
|
+
T.let(
|
|
456
|
+
:pl,
|
|
457
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
458
|
+
)
|
|
459
|
+
PT =
|
|
460
|
+
T.let(
|
|
461
|
+
:pt,
|
|
462
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
463
|
+
)
|
|
464
|
+
RO =
|
|
465
|
+
T.let(
|
|
466
|
+
:ro,
|
|
467
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
468
|
+
)
|
|
469
|
+
RU =
|
|
470
|
+
T.let(
|
|
471
|
+
:ru,
|
|
472
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
473
|
+
)
|
|
474
|
+
SV =
|
|
475
|
+
T.let(
|
|
476
|
+
:sv,
|
|
477
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
478
|
+
)
|
|
479
|
+
TH =
|
|
480
|
+
T.let(
|
|
481
|
+
:th,
|
|
482
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
483
|
+
)
|
|
484
|
+
TR =
|
|
485
|
+
T.let(
|
|
486
|
+
:tr,
|
|
487
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
488
|
+
)
|
|
489
|
+
VI =
|
|
490
|
+
T.let(
|
|
491
|
+
:vi,
|
|
492
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
sig do
|
|
496
|
+
override.returns(
|
|
497
|
+
T::Array[
|
|
498
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::Language::TaggedSymbol
|
|
499
|
+
]
|
|
500
|
+
)
|
|
501
|
+
end
|
|
502
|
+
def self.values
|
|
503
|
+
end
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# Engine identifier for xAI transcription service
|
|
507
|
+
module TranscriptionEngine
|
|
508
|
+
extend Telnyx::Internal::Type::Enum
|
|
509
|
+
|
|
510
|
+
TaggedSymbol =
|
|
511
|
+
T.type_alias do
|
|
512
|
+
T.all(
|
|
513
|
+
Symbol,
|
|
514
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionEngine
|
|
515
|
+
)
|
|
516
|
+
end
|
|
517
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
518
|
+
|
|
519
|
+
X_AI =
|
|
520
|
+
T.let(
|
|
521
|
+
:xAI,
|
|
522
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionEngine::TaggedSymbol
|
|
523
|
+
)
|
|
524
|
+
|
|
525
|
+
sig do
|
|
526
|
+
override.returns(
|
|
527
|
+
T::Array[
|
|
528
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionEngine::TaggedSymbol
|
|
529
|
+
]
|
|
530
|
+
)
|
|
531
|
+
end
|
|
532
|
+
def self.values
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# The model to use for transcription.
|
|
537
|
+
module TranscriptionModel
|
|
538
|
+
extend Telnyx::Internal::Type::Enum
|
|
539
|
+
|
|
540
|
+
TaggedSymbol =
|
|
541
|
+
T.type_alias do
|
|
542
|
+
T.all(
|
|
543
|
+
Symbol,
|
|
544
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionModel
|
|
545
|
+
)
|
|
546
|
+
end
|
|
547
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
548
|
+
|
|
549
|
+
XAI_GROK_STT =
|
|
550
|
+
T.let(
|
|
551
|
+
:"xai/grok-stt",
|
|
552
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionModel::TaggedSymbol
|
|
553
|
+
)
|
|
554
|
+
|
|
555
|
+
sig do
|
|
556
|
+
override.returns(
|
|
557
|
+
T::Array[
|
|
558
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::TranscriptionModel::TaggedSymbol
|
|
559
|
+
]
|
|
560
|
+
)
|
|
561
|
+
end
|
|
562
|
+
def self.values
|
|
563
|
+
end
|
|
564
|
+
end
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
class AssemblyAI < Telnyx::Internal::Type::BaseModel
|
|
568
|
+
OrHash =
|
|
569
|
+
T.type_alias do
|
|
570
|
+
T.any(
|
|
571
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI,
|
|
572
|
+
Telnyx::Internal::AnyHash
|
|
573
|
+
)
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
# Whether to send also interim results. If set to false, only final results will
|
|
577
|
+
# be sent.
|
|
578
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
579
|
+
attr_reader :interim_results
|
|
580
|
+
|
|
581
|
+
sig { params(interim_results: T::Boolean).void }
|
|
582
|
+
attr_writer :interim_results
|
|
583
|
+
|
|
584
|
+
# Engine identifier for AssemblyAI transcription service
|
|
585
|
+
sig do
|
|
586
|
+
returns(
|
|
587
|
+
T.nilable(
|
|
588
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionEngine::OrSymbol
|
|
589
|
+
)
|
|
590
|
+
)
|
|
591
|
+
end
|
|
592
|
+
attr_reader :transcription_engine
|
|
593
|
+
|
|
594
|
+
sig do
|
|
595
|
+
params(
|
|
596
|
+
transcription_engine:
|
|
597
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionEngine::OrSymbol
|
|
598
|
+
).void
|
|
599
|
+
end
|
|
600
|
+
attr_writer :transcription_engine
|
|
601
|
+
|
|
602
|
+
# The model to use for transcription.
|
|
603
|
+
sig do
|
|
604
|
+
returns(
|
|
605
|
+
T.nilable(
|
|
606
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionModel::OrSymbol
|
|
607
|
+
)
|
|
608
|
+
)
|
|
609
|
+
end
|
|
610
|
+
attr_reader :transcription_model
|
|
611
|
+
|
|
612
|
+
sig do
|
|
613
|
+
params(
|
|
614
|
+
transcription_model:
|
|
615
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionModel::OrSymbol
|
|
616
|
+
).void
|
|
617
|
+
end
|
|
618
|
+
attr_writer :transcription_model
|
|
619
|
+
|
|
620
|
+
sig do
|
|
621
|
+
params(
|
|
622
|
+
interim_results: T::Boolean,
|
|
623
|
+
transcription_engine:
|
|
624
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionEngine::OrSymbol,
|
|
625
|
+
transcription_model:
|
|
626
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionModel::OrSymbol
|
|
627
|
+
).returns(T.attached_class)
|
|
628
|
+
end
|
|
629
|
+
def self.new(
|
|
630
|
+
# Whether to send also interim results. If set to false, only final results will
|
|
631
|
+
# be sent.
|
|
632
|
+
interim_results: nil,
|
|
633
|
+
# Engine identifier for AssemblyAI transcription service
|
|
634
|
+
transcription_engine: nil,
|
|
635
|
+
# The model to use for transcription.
|
|
636
|
+
transcription_model: nil
|
|
637
|
+
)
|
|
638
|
+
end
|
|
639
|
+
|
|
640
|
+
sig do
|
|
641
|
+
override.returns(
|
|
642
|
+
{
|
|
643
|
+
interim_results: T::Boolean,
|
|
644
|
+
transcription_engine:
|
|
645
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionEngine::OrSymbol,
|
|
646
|
+
transcription_model:
|
|
647
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionModel::OrSymbol
|
|
648
|
+
}
|
|
649
|
+
)
|
|
650
|
+
end
|
|
651
|
+
def to_hash
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
# Engine identifier for AssemblyAI transcription service
|
|
655
|
+
module TranscriptionEngine
|
|
656
|
+
extend Telnyx::Internal::Type::Enum
|
|
657
|
+
|
|
658
|
+
TaggedSymbol =
|
|
659
|
+
T.type_alias do
|
|
660
|
+
T.all(
|
|
661
|
+
Symbol,
|
|
662
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionEngine
|
|
663
|
+
)
|
|
664
|
+
end
|
|
665
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
666
|
+
|
|
667
|
+
ASSEMBLY_AI =
|
|
668
|
+
T.let(
|
|
669
|
+
:AssemblyAI,
|
|
670
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionEngine::TaggedSymbol
|
|
671
|
+
)
|
|
672
|
+
|
|
673
|
+
sig do
|
|
674
|
+
override.returns(
|
|
675
|
+
T::Array[
|
|
676
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionEngine::TaggedSymbol
|
|
677
|
+
]
|
|
678
|
+
)
|
|
679
|
+
end
|
|
680
|
+
def self.values
|
|
681
|
+
end
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
# The model to use for transcription.
|
|
685
|
+
module TranscriptionModel
|
|
686
|
+
extend Telnyx::Internal::Type::Enum
|
|
687
|
+
|
|
688
|
+
TaggedSymbol =
|
|
689
|
+
T.type_alias do
|
|
690
|
+
T.all(
|
|
691
|
+
Symbol,
|
|
692
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionModel
|
|
693
|
+
)
|
|
694
|
+
end
|
|
695
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
696
|
+
|
|
697
|
+
ASSEMBLYAI_UNIVERSAL_STREAMING =
|
|
698
|
+
T.let(
|
|
699
|
+
:"assemblyai/universal-streaming",
|
|
700
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionModel::TaggedSymbol
|
|
701
|
+
)
|
|
702
|
+
|
|
703
|
+
sig do
|
|
704
|
+
override.returns(
|
|
705
|
+
T::Array[
|
|
706
|
+
Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::TranscriptionModel::TaggedSymbol
|
|
707
|
+
]
|
|
708
|
+
)
|
|
709
|
+
end
|
|
710
|
+
def self.values
|
|
711
|
+
end
|
|
712
|
+
end
|
|
713
|
+
end
|
|
714
|
+
|
|
225
715
|
sig do
|
|
226
716
|
override.returns(
|
|
227
717
|
T::Array[
|
|
@@ -34,21 +34,35 @@ module Telnyx
|
|
|
34
34
|
assistant_id: String,
|
|
35
35
|
description: String,
|
|
36
36
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
37
|
+
dynamic_variables_webhook_timeout_ms: Integer,
|
|
37
38
|
dynamic_variables_webhook_url: String,
|
|
38
39
|
enabled_features: T::Array[Telnyx::AI::EnabledFeatures::OrSymbol],
|
|
39
|
-
external_llm:
|
|
40
|
-
|
|
40
|
+
external_llm:
|
|
41
|
+
Telnyx::AI::Assistants::UpdateAssistant::ExternalLlm::OrHash,
|
|
42
|
+
fallback_config:
|
|
43
|
+
Telnyx::AI::Assistants::UpdateAssistant::FallbackConfig::OrHash,
|
|
41
44
|
greeting: String,
|
|
42
45
|
insight_settings: Telnyx::AI::InsightSettings::OrHash,
|
|
43
46
|
instructions: String,
|
|
47
|
+
integrations:
|
|
48
|
+
T::Array[
|
|
49
|
+
Telnyx::AI::Assistants::UpdateAssistant::Integration::OrHash
|
|
50
|
+
],
|
|
51
|
+
interruption_settings:
|
|
52
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::OrHash,
|
|
44
53
|
llm_api_key_ref: String,
|
|
54
|
+
mcp_servers:
|
|
55
|
+
T::Array[
|
|
56
|
+
Telnyx::AI::Assistants::UpdateAssistant::McpServer::OrHash
|
|
57
|
+
],
|
|
45
58
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
46
59
|
model: String,
|
|
47
60
|
name: String,
|
|
48
61
|
observability_settings: Telnyx::AI::ObservabilityReq::OrHash,
|
|
49
62
|
post_conversation_settings:
|
|
50
|
-
Telnyx::AI::
|
|
63
|
+
Telnyx::AI::Assistants::UpdateAssistant::PostConversationSettings::OrHash,
|
|
51
64
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
65
|
+
tags: T::Array[String],
|
|
52
66
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
53
67
|
tool_ids: T::Array[String],
|
|
54
68
|
tools:
|
|
@@ -67,6 +81,7 @@ module Telnyx
|
|
|
67
81
|
)
|
|
68
82
|
],
|
|
69
83
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
84
|
+
version_name: String,
|
|
70
85
|
voice_settings: Telnyx::AI::VoiceSettings::OrHash,
|
|
71
86
|
widget_settings: Telnyx::AI::WidgetSettings::OrHash,
|
|
72
87
|
request_options: Telnyx::RequestOptions::OrHash
|
|
@@ -81,10 +96,19 @@ module Telnyx
|
|
|
81
96
|
description: nil,
|
|
82
97
|
# Body param: Map of dynamic variables and their default values
|
|
83
98
|
dynamic_variables: nil,
|
|
84
|
-
# Body param:
|
|
85
|
-
#
|
|
86
|
-
#
|
|
87
|
-
#
|
|
99
|
+
# Body param: Timeout in milliseconds for the dynamic variables webhook. Must be
|
|
100
|
+
# between 1 and 10000 ms. If the webhook does not respond within this timeout, the
|
|
101
|
+
# call proceeds with default values. See the
|
|
102
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables).
|
|
103
|
+
dynamic_variables_webhook_timeout_ms: nil,
|
|
104
|
+
# Body param: If `dynamic_variables_webhook_url` is set, Telnyx sends a POST
|
|
105
|
+
# request to this URL at the start of the conversation to resolve dynamic
|
|
106
|
+
# variables. **Gotcha:** the webhook response must wrap variables under a
|
|
107
|
+
# top-level `dynamic_variables` object, e.g.
|
|
108
|
+
# `{"dynamic_variables": {"customer_name": "Jane"}}`. Returning a flat object will
|
|
109
|
+
# be ignored and variables will fall back to their defaults. See the
|
|
110
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
111
|
+
# for the full request/response format and timeout behavior.
|
|
88
112
|
dynamic_variables_webhook_url: nil,
|
|
89
113
|
# Body param
|
|
90
114
|
enabled_features: nil,
|
|
@@ -104,17 +128,36 @@ module Telnyx
|
|
|
104
128
|
# Body param: System instructions for the assistant. These may be templated with
|
|
105
129
|
# [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
106
130
|
instructions: nil,
|
|
107
|
-
# Body param:
|
|
108
|
-
#
|
|
131
|
+
# Body param: Connected integrations attached to the assistant. The catalog of
|
|
132
|
+
# available integrations is at `/ai/integrations`; the user's connected
|
|
133
|
+
# integrations are at `/ai/integrations/connections`. Each item references a
|
|
134
|
+
# catalog integration by `integration_id`.
|
|
135
|
+
integrations: nil,
|
|
136
|
+
# Body param: Settings for interruptions and how the assistant decides the user
|
|
137
|
+
# has finished speaking. These timings are most relevant when using non
|
|
138
|
+
# turn-taking transcription models. For turn-taking models like `deepgram/flux`,
|
|
139
|
+
# end-of-turn behavior is controlled by the transcription end-of-turn settings
|
|
140
|
+
# under `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
|
|
141
|
+
# `eager_eot_threshold`).
|
|
142
|
+
interruption_settings: nil,
|
|
143
|
+
# Body param: This is only needed when using third-party inference providers
|
|
144
|
+
# selected by `model`. The `identifier` for an integration secret
|
|
109
145
|
# [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
110
|
-
# that refers to your LLM provider's API key.
|
|
111
|
-
#
|
|
146
|
+
# that refers to your LLM provider's API key. For bring-your-own endpoint
|
|
147
|
+
# authentication, use `external_llm.llm_api_key_ref` instead. Warning: Free plans
|
|
148
|
+
# are unlikely to work with this integration.
|
|
112
149
|
llm_api_key_ref: nil,
|
|
150
|
+
# Body param: MCP servers attached to the assistant. Create MCP servers with
|
|
151
|
+
# `/ai/mcp_servers`, then reference them by `id` here.
|
|
152
|
+
mcp_servers: nil,
|
|
113
153
|
# Body param
|
|
114
154
|
messaging_settings: nil,
|
|
115
|
-
# Body param: ID of the model to use. You can use
|
|
155
|
+
# Body param: ID of the model to use when `external_llm` is not set. You can use
|
|
156
|
+
# the
|
|
116
157
|
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
117
|
-
# to see
|
|
158
|
+
# to see available models. If `external_llm` is provided, the assistant uses
|
|
159
|
+
# `external_llm` instead of this field. If neither `model` nor `external_llm` is
|
|
160
|
+
# provided, Telnyx applies the default model.
|
|
118
161
|
model: nil,
|
|
119
162
|
# Body param
|
|
120
163
|
name: nil,
|
|
@@ -129,15 +172,22 @@ module Telnyx
|
|
|
129
172
|
post_conversation_settings: nil,
|
|
130
173
|
# Body param
|
|
131
174
|
privacy_settings: nil,
|
|
175
|
+
# Body param: Tags associated with the assistant. Tags can also be managed with
|
|
176
|
+
# the assistant tag endpoints.
|
|
177
|
+
tags: nil,
|
|
132
178
|
# Body param
|
|
133
179
|
telephony_settings: nil,
|
|
134
|
-
# Body param
|
|
180
|
+
# Body param: IDs of shared tools to attach to the assistant. New integrations
|
|
181
|
+
# should prefer `tool_ids` over inline `tools`.
|
|
135
182
|
tool_ids: nil,
|
|
136
|
-
# Body param:
|
|
137
|
-
#
|
|
183
|
+
# Body param: Deprecated for new integrations. Inline tool definitions available
|
|
184
|
+
# to the assistant. Prefer `tool_ids` to attach shared tools created with the AI
|
|
185
|
+
# Tools endpoints.
|
|
138
186
|
tools: nil,
|
|
139
187
|
# Body param
|
|
140
188
|
transcription: nil,
|
|
189
|
+
# Body param: Human-readable name for the assistant version.
|
|
190
|
+
version_name: nil,
|
|
141
191
|
# Body param
|
|
142
192
|
voice_settings: nil,
|
|
143
193
|
# Body param: Configuration settings for the assistant's web widget.
|