telnyx 5.97.0 → 5.99.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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/assistant_create_params.rb +9 -231
  5. data/lib/telnyx/models/ai/assistant_update_params.rb +9 -231
  6. data/lib/telnyx/models/ai/assistants/update_assistant.rb +9 -236
  7. data/lib/telnyx/models/ai/external_llm.rb +89 -0
  8. data/lib/telnyx/models/ai/external_llm_req.rb +89 -0
  9. data/lib/telnyx/models/ai/fallback_config.rb +37 -0
  10. data/lib/telnyx/models/ai/fallback_config_req.rb +37 -0
  11. data/lib/telnyx/models/ai/inference_embedding.rb +9 -234
  12. data/lib/telnyx/models/ai/observability.rb +57 -1
  13. data/lib/telnyx/models/ai/observability_req.rb +57 -1
  14. data/lib/telnyx/models/ai/post_conversation_settings.rb +30 -0
  15. data/lib/telnyx/models/ai/post_conversation_settings_req.rb +30 -0
  16. data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +26 -3
  17. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +26 -3
  18. data/lib/telnyx/models/calls/action_speak_params.rb +26 -3
  19. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +26 -3
  20. data/lib/telnyx/models/conferences/action_speak_params.rb +26 -3
  21. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -3
  22. data/lib/telnyx/resources/ai/assistants.rb +6 -6
  23. data/lib/telnyx/resources/calls/actions.rb +4 -4
  24. data/lib/telnyx/resources/conferences/actions.rb +1 -1
  25. data/lib/telnyx/version.rb +1 -1
  26. data/lib/telnyx.rb +6 -0
  27. data/rbi/telnyx/models/ai/assistant_create_params.rbi +12 -463
  28. data/rbi/telnyx/models/ai/assistant_update_params.rbi +12 -463
  29. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +12 -469
  30. data/rbi/telnyx/models/ai/external_llm.rbi +161 -0
  31. data/rbi/telnyx/models/ai/external_llm_req.rbi +161 -0
  32. data/rbi/telnyx/models/ai/fallback_config.rbi +64 -0
  33. data/rbi/telnyx/models/ai/fallback_config_req.rbi +64 -0
  34. data/rbi/telnyx/models/ai/inference_embedding.rbi +12 -460
  35. data/rbi/telnyx/models/ai/observability.rbi +85 -0
  36. data/rbi/telnyx/models/ai/observability_req.rbi +86 -0
  37. data/rbi/telnyx/models/ai/post_conversation_settings.rbi +45 -0
  38. data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +45 -0
  39. data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +50 -5
  40. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +50 -5
  41. data/rbi/telnyx/models/calls/action_speak_params.rbi +50 -5
  42. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +50 -5
  43. data/rbi/telnyx/models/conferences/action_speak_params.rbi +50 -5
  44. data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -5
  45. data/rbi/telnyx/resources/ai/assistants.rbi +6 -10
  46. data/rbi/telnyx/resources/calls/actions.rbi +16 -4
  47. data/rbi/telnyx/resources/conferences/actions.rbi +4 -1
  48. data/sig/telnyx/models/ai/assistant_create_params.rbs +18 -205
  49. data/sig/telnyx/models/ai/assistant_update_params.rbs +18 -205
  50. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +18 -205
  51. data/sig/telnyx/models/ai/external_llm.rbs +75 -0
  52. data/sig/telnyx/models/ai/external_llm_req.rbs +75 -0
  53. data/sig/telnyx/models/ai/fallback_config.rbs +38 -0
  54. data/sig/telnyx/models/ai/fallback_config_req.rbs +40 -0
  55. data/sig/telnyx/models/ai/inference_embedding.rbs +17 -206
  56. data/sig/telnyx/models/ai/observability.rbs +41 -0
  57. data/sig/telnyx/models/ai/observability_req.rbs +41 -0
  58. data/sig/telnyx/models/ai/post_conversation_settings.rbs +17 -0
  59. data/sig/telnyx/models/ai/post_conversation_settings_req.rbs +17 -0
  60. data/sig/telnyx/models/calls/action_gather_using_ai_params.rbs +15 -0
  61. data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +15 -0
  62. data/sig/telnyx/models/calls/action_speak_params.rbs +15 -0
  63. data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +15 -0
  64. data/sig/telnyx/models/conferences/action_speak_params.rbs +15 -0
  65. data/sig/telnyx/resources/ai/assistants/versions.rbs +3 -3
  66. data/sig/telnyx/resources/ai/assistants.rbs +6 -6
  67. metadata +20 -2
@@ -15,6 +15,41 @@ module Telnyx
15
15
  sig { params(host: String).void }
16
16
  attr_writer :host
17
17
 
18
+ sig { returns(T.nilable(String)) }
19
+ attr_reader :prompt_label
20
+
21
+ sig { params(prompt_label: String).void }
22
+ attr_writer :prompt_label
23
+
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :prompt_name
26
+
27
+ sig { params(prompt_name: String).void }
28
+ attr_writer :prompt_name
29
+
30
+ # Whether to auto-publish the assistant's instructions as a Langfuse prompt.
31
+ #
32
+ # When ENABLED + prompt_name set, every assistant create/update pushes
33
+ # `instructions` to Langfuse via create_prompt and stores the returned version in
34
+ # prompt_version.
35
+ sig do
36
+ returns(T.nilable(Telnyx::AI::ObservabilityReq::PromptSync::OrSymbol))
37
+ end
38
+ attr_reader :prompt_sync
39
+
40
+ sig do
41
+ params(
42
+ prompt_sync: Telnyx::AI::ObservabilityReq::PromptSync::OrSymbol
43
+ ).void
44
+ end
45
+ attr_writer :prompt_sync
46
+
47
+ sig { returns(T.nilable(Integer)) }
48
+ attr_reader :prompt_version
49
+
50
+ sig { params(prompt_version: Integer).void }
51
+ attr_writer :prompt_version
52
+
18
53
  sig { returns(T.nilable(String)) }
19
54
  attr_reader :public_key_ref
20
55
 
@@ -40,6 +75,10 @@ module Telnyx
40
75
  sig do
41
76
  params(
42
77
  host: String,
78
+ prompt_label: String,
79
+ prompt_name: String,
80
+ prompt_sync: Telnyx::AI::ObservabilityReq::PromptSync::OrSymbol,
81
+ prompt_version: Integer,
43
82
  public_key_ref: String,
44
83
  secret_key_ref: String,
45
84
  status: Telnyx::AI::ObservabilityReq::Status::OrSymbol
@@ -47,6 +86,15 @@ module Telnyx
47
86
  end
48
87
  def self.new(
49
88
  host: nil,
89
+ prompt_label: nil,
90
+ prompt_name: nil,
91
+ # Whether to auto-publish the assistant's instructions as a Langfuse prompt.
92
+ #
93
+ # When ENABLED + prompt_name set, every assistant create/update pushes
94
+ # `instructions` to Langfuse via create_prompt and stores the returned version in
95
+ # prompt_version.
96
+ prompt_sync: nil,
97
+ prompt_version: nil,
50
98
  public_key_ref: nil,
51
99
  secret_key_ref: nil,
52
100
  status: nil
@@ -57,6 +105,10 @@ module Telnyx
57
105
  override.returns(
58
106
  {
59
107
  host: String,
108
+ prompt_label: String,
109
+ prompt_name: String,
110
+ prompt_sync: Telnyx::AI::ObservabilityReq::PromptSync::OrSymbol,
111
+ prompt_version: Integer,
60
112
  public_key_ref: String,
61
113
  secret_key_ref: String,
62
114
  status: Telnyx::AI::ObservabilityReq::Status::OrSymbol
@@ -66,6 +118,40 @@ module Telnyx
66
118
  def to_hash
67
119
  end
68
120
 
121
+ # Whether to auto-publish the assistant's instructions as a Langfuse prompt.
122
+ #
123
+ # When ENABLED + prompt_name set, every assistant create/update pushes
124
+ # `instructions` to Langfuse via create_prompt and stores the returned version in
125
+ # prompt_version.
126
+ module PromptSync
127
+ extend Telnyx::Internal::Type::Enum
128
+
129
+ TaggedSymbol =
130
+ T.type_alias do
131
+ T.all(Symbol, Telnyx::AI::ObservabilityReq::PromptSync)
132
+ end
133
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
134
+
135
+ ENABLED =
136
+ T.let(
137
+ :enabled,
138
+ Telnyx::AI::ObservabilityReq::PromptSync::TaggedSymbol
139
+ )
140
+ DISABLED =
141
+ T.let(
142
+ :disabled,
143
+ Telnyx::AI::ObservabilityReq::PromptSync::TaggedSymbol
144
+ )
145
+
146
+ sig do
147
+ override.returns(
148
+ T::Array[Telnyx::AI::ObservabilityReq::PromptSync::TaggedSymbol]
149
+ )
150
+ end
151
+ def self.values
152
+ end
153
+ end
154
+
69
155
  module Status
70
156
  extend Telnyx::Internal::Type::Enum
71
157
 
@@ -0,0 +1,45 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class PostConversationSettings < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Telnyx::AI::PostConversationSettings,
11
+ Telnyx::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Whether post-conversation processing is enabled. When true, the assistant will
16
+ # be invoked after the conversation ends to perform any final tool calls. Defaults
17
+ # to false.
18
+ sig { returns(T.nilable(T::Boolean)) }
19
+ attr_reader :enabled
20
+
21
+ sig { params(enabled: T::Boolean).void }
22
+ attr_writer :enabled
23
+
24
+ # Configuration for post-conversation processing. When enabled, the assistant
25
+ # receives one additional LLM turn after the conversation ends, allowing it to
26
+ # execute tool calls such as logging to a CRM or sending a summary. The assistant
27
+ # can execute multiple parallel or sequential tools during this phase.
28
+ # Telephony-control tools (e.g. hangup, transfer) are unavailable
29
+ # post-conversation. Beta feature.
30
+ sig { params(enabled: T::Boolean).returns(T.attached_class) }
31
+ def self.new(
32
+ # Whether post-conversation processing is enabled. When true, the assistant will
33
+ # be invoked after the conversation ends to perform any final tool calls. Defaults
34
+ # to false.
35
+ enabled: nil
36
+ )
37
+ end
38
+
39
+ sig { override.returns({ enabled: T::Boolean }) }
40
+ def to_hash
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,45 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class PostConversationSettingsReq < Telnyx::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Telnyx::AI::PostConversationSettingsReq,
11
+ Telnyx::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Whether post-conversation processing is enabled. When true, the assistant will
16
+ # be invoked after the conversation ends to perform any final tool calls. Defaults
17
+ # to false.
18
+ sig { returns(T.nilable(T::Boolean)) }
19
+ attr_reader :enabled
20
+
21
+ sig { params(enabled: T::Boolean).void }
22
+ attr_writer :enabled
23
+
24
+ # Configuration for post-conversation processing. When enabled, the assistant
25
+ # receives one additional LLM turn after the conversation ends, allowing it to
26
+ # execute tool calls such as logging to a CRM or sending a summary. The assistant
27
+ # can execute multiple parallel or sequential tools during this phase.
28
+ # Telephony-control tools (e.g. hangup, transfer) are unavailable
29
+ # post-conversation. Beta feature.
30
+ sig { params(enabled: T::Boolean).returns(T.attached_class) }
31
+ def self.new(
32
+ # Whether post-conversation processing is enabled. When true, the assistant will
33
+ # be invoked after the conversation ends to perform any final tool calls. Defaults
34
+ # to false.
35
+ enabled: nil
36
+ )
37
+ end
38
+
39
+ sig { override.returns({ enabled: T::Boolean }) }
40
+ def to_hash
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -175,6 +175,8 @@ module Telnyx
175
175
  # - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
176
176
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
177
177
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
178
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
179
+ # `ara`, `rex`, `sal`, `leo`.
178
180
  sig { returns(T.nilable(String)) }
179
181
  attr_reader :voice
180
182
 
@@ -191,7 +193,8 @@ module Telnyx
191
193
  Telnyx::Calls::AwsVoiceSettings,
192
194
  Telnyx::AzureVoiceSettings,
193
195
  Telnyx::RimeVoiceSettings,
194
- Telnyx::ResembleVoiceSettings
196
+ Telnyx::ResembleVoiceSettings,
197
+ Telnyx::Calls::ActionGatherUsingAIParams::VoiceSettings::Xai
195
198
  )
196
199
  )
197
200
  )
@@ -207,7 +210,8 @@ module Telnyx
207
210
  Telnyx::Calls::AwsVoiceSettings::OrHash,
208
211
  Telnyx::AzureVoiceSettings::OrHash,
209
212
  Telnyx::RimeVoiceSettings::OrHash,
210
- Telnyx::ResembleVoiceSettings::OrHash
213
+ Telnyx::ResembleVoiceSettings::OrHash,
214
+ Telnyx::Calls::ActionGatherUsingAIParams::VoiceSettings::Xai::OrHash
211
215
  )
212
216
  ).void
213
217
  end
@@ -240,7 +244,8 @@ module Telnyx
240
244
  Telnyx::Calls::AwsVoiceSettings::OrHash,
241
245
  Telnyx::AzureVoiceSettings::OrHash,
242
246
  Telnyx::RimeVoiceSettings::OrHash,
243
- Telnyx::ResembleVoiceSettings::OrHash
247
+ Telnyx::ResembleVoiceSettings::OrHash,
248
+ Telnyx::Calls::ActionGatherUsingAIParams::VoiceSettings::Xai::OrHash
244
249
  ),
245
250
  request_options: Telnyx::RequestOptions::OrHash
246
251
  ).returns(T.attached_class)
@@ -315,6 +320,8 @@ module Telnyx
315
320
  # - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
316
321
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
317
322
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
323
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
324
+ # `ara`, `rex`, `sal`, `leo`.
318
325
  voice: nil,
319
326
  # The settings associated with the voice selected
320
327
  voice_settings: nil,
@@ -350,7 +357,8 @@ module Telnyx
350
357
  Telnyx::Calls::AwsVoiceSettings,
351
358
  Telnyx::AzureVoiceSettings,
352
359
  Telnyx::RimeVoiceSettings,
353
- Telnyx::ResembleVoiceSettings
360
+ Telnyx::ResembleVoiceSettings,
361
+ Telnyx::Calls::ActionGatherUsingAIParams::VoiceSettings::Xai
354
362
  ),
355
363
  request_options: Telnyx::RequestOptions
356
364
  }
@@ -468,10 +476,47 @@ module Telnyx
468
476
  Telnyx::Calls::AwsVoiceSettings,
469
477
  Telnyx::AzureVoiceSettings,
470
478
  Telnyx::RimeVoiceSettings,
471
- Telnyx::ResembleVoiceSettings
479
+ Telnyx::ResembleVoiceSettings,
480
+ Telnyx::Calls::ActionGatherUsingAIParams::VoiceSettings::Xai
472
481
  )
473
482
  end
474
483
 
484
+ class Xai < Telnyx::Internal::Type::BaseModel
485
+ OrHash =
486
+ T.type_alias do
487
+ T.any(
488
+ Telnyx::Calls::ActionGatherUsingAIParams::VoiceSettings::Xai,
489
+ Telnyx::Internal::AnyHash
490
+ )
491
+ end
492
+
493
+ # Voice settings provider type
494
+ sig { returns(Symbol) }
495
+ attr_accessor :type
496
+
497
+ # Language code, or `auto` to detect automatically.
498
+ sig { returns(T.nilable(String)) }
499
+ attr_reader :language
500
+
501
+ sig { params(language: String).void }
502
+ attr_writer :language
503
+
504
+ sig do
505
+ params(language: String, type: Symbol).returns(T.attached_class)
506
+ end
507
+ def self.new(
508
+ # Language code, or `auto` to detect automatically.
509
+ language: nil,
510
+ # Voice settings provider type
511
+ type: :xai
512
+ )
513
+ end
514
+
515
+ sig { override.returns({ type: Symbol, language: String }) }
516
+ def to_hash
517
+ end
518
+ end
519
+
475
520
  sig do
476
521
  override.returns(
477
522
  T::Array[
@@ -61,6 +61,8 @@ module Telnyx
61
61
  # `voice_settings` to configure precision, sample_rate, and format.
62
62
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
63
63
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
64
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
65
+ # `ara`, `rex`, `sal`, `leo`.
64
66
  #
65
67
  # For service_level basic, you may define the gender of the speaker (male or
66
68
  # female).
@@ -214,7 +216,8 @@ module Telnyx
214
216
  Telnyx::AzureVoiceSettings,
215
217
  Telnyx::RimeVoiceSettings,
216
218
  Telnyx::ResembleVoiceSettings,
217
- Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld
219
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld,
220
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Xai
218
221
  )
219
222
  )
220
223
  )
@@ -232,7 +235,8 @@ module Telnyx
232
235
  Telnyx::AzureVoiceSettings::OrHash,
233
236
  Telnyx::RimeVoiceSettings::OrHash,
234
237
  Telnyx::ResembleVoiceSettings::OrHash,
235
- Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld::OrHash
238
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld::OrHash,
239
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Xai::OrHash
236
240
  )
237
241
  ).void
238
242
  end
@@ -268,7 +272,8 @@ module Telnyx
268
272
  Telnyx::AzureVoiceSettings::OrHash,
269
273
  Telnyx::RimeVoiceSettings::OrHash,
270
274
  Telnyx::ResembleVoiceSettings::OrHash,
271
- Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld::OrHash
275
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld::OrHash,
276
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Xai::OrHash
272
277
  ),
273
278
  request_options: Telnyx::RequestOptions::OrHash
274
279
  ).returns(T.attached_class)
@@ -316,6 +321,8 @@ module Telnyx
316
321
  # `voice_settings` to configure precision, sample_rate, and format.
317
322
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
318
323
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
324
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
325
+ # `ara`, `rex`, `sal`, `leo`.
319
326
  #
320
327
  # For service_level basic, you may define the gender of the speaker (male or
321
328
  # female).
@@ -394,7 +401,8 @@ module Telnyx
394
401
  Telnyx::AzureVoiceSettings,
395
402
  Telnyx::RimeVoiceSettings,
396
403
  Telnyx::ResembleVoiceSettings,
397
- Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld
404
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld,
405
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Xai
398
406
  ),
399
407
  request_options: Telnyx::RequestOptions
400
408
  }
@@ -660,7 +668,8 @@ module Telnyx
660
668
  Telnyx::AzureVoiceSettings,
661
669
  Telnyx::RimeVoiceSettings,
662
670
  Telnyx::ResembleVoiceSettings,
663
- Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld
671
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Inworld,
672
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Xai
664
673
  )
665
674
  end
666
675
 
@@ -689,6 +698,42 @@ module Telnyx
689
698
  end
690
699
  end
691
700
 
701
+ class Xai < Telnyx::Internal::Type::BaseModel
702
+ OrHash =
703
+ T.type_alias do
704
+ T.any(
705
+ Telnyx::Calls::ActionGatherUsingSpeakParams::VoiceSettings::Xai,
706
+ Telnyx::Internal::AnyHash
707
+ )
708
+ end
709
+
710
+ # Voice settings provider type
711
+ sig { returns(Symbol) }
712
+ attr_accessor :type
713
+
714
+ # Language code, or `auto` to detect automatically.
715
+ sig { returns(T.nilable(String)) }
716
+ attr_reader :language
717
+
718
+ sig { params(language: String).void }
719
+ attr_writer :language
720
+
721
+ sig do
722
+ params(language: String, type: Symbol).returns(T.attached_class)
723
+ end
724
+ def self.new(
725
+ # Language code, or `auto` to detect automatically.
726
+ language: nil,
727
+ # Voice settings provider type
728
+ type: :xai
729
+ )
730
+ end
731
+
732
+ sig { override.returns({ type: Symbol, language: String }) }
733
+ def to_hash
734
+ end
735
+ end
736
+
692
737
  sig do
693
738
  override.returns(
694
739
  T::Array[
@@ -58,6 +58,8 @@ module Telnyx
58
58
  # `voice_settings` to configure precision, sample_rate, and format.
59
59
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
60
60
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
61
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
62
+ # `ara`, `rex`, `sal`, `leo`.
61
63
  #
62
64
  # For service_level basic, you may define the gender of the speaker (male or
63
65
  # female).
@@ -175,7 +177,8 @@ module Telnyx
175
177
  Telnyx::AzureVoiceSettings,
176
178
  Telnyx::RimeVoiceSettings,
177
179
  Telnyx::ResembleVoiceSettings,
178
- Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld
180
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld,
181
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Xai
179
182
  )
180
183
  )
181
184
  )
@@ -193,7 +196,8 @@ module Telnyx
193
196
  Telnyx::AzureVoiceSettings::OrHash,
194
197
  Telnyx::RimeVoiceSettings::OrHash,
195
198
  Telnyx::ResembleVoiceSettings::OrHash,
196
- Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld::OrHash
199
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld::OrHash,
200
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Xai::OrHash
197
201
  )
198
202
  ).void
199
203
  end
@@ -223,7 +227,8 @@ module Telnyx
223
227
  Telnyx::AzureVoiceSettings::OrHash,
224
228
  Telnyx::RimeVoiceSettings::OrHash,
225
229
  Telnyx::ResembleVoiceSettings::OrHash,
226
- Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld::OrHash
230
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld::OrHash,
231
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Xai::OrHash
227
232
  ),
228
233
  request_options: Telnyx::RequestOptions::OrHash
229
234
  ).returns(T.attached_class)
@@ -271,6 +276,8 @@ module Telnyx
271
276
  # `voice_settings` to configure precision, sample_rate, and format.
272
277
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
273
278
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
279
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
280
+ # `ara`, `rex`, `sal`, `leo`.
274
281
  #
275
282
  # For service_level basic, you may define the gender of the speaker (male or
276
283
  # female).
@@ -332,7 +339,8 @@ module Telnyx
332
339
  Telnyx::AzureVoiceSettings,
333
340
  Telnyx::RimeVoiceSettings,
334
341
  Telnyx::ResembleVoiceSettings,
335
- Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld
342
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld,
343
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Xai
336
344
  ),
337
345
  request_options: Telnyx::RequestOptions
338
346
  }
@@ -624,7 +632,8 @@ module Telnyx
624
632
  Telnyx::AzureVoiceSettings,
625
633
  Telnyx::RimeVoiceSettings,
626
634
  Telnyx::ResembleVoiceSettings,
627
- Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld
635
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Inworld,
636
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Xai
628
637
  )
629
638
  end
630
639
 
@@ -653,6 +662,42 @@ module Telnyx
653
662
  end
654
663
  end
655
664
 
665
+ class Xai < Telnyx::Internal::Type::BaseModel
666
+ OrHash =
667
+ T.type_alias do
668
+ T.any(
669
+ Telnyx::Calls::ActionSpeakParams::VoiceSettings::Xai,
670
+ Telnyx::Internal::AnyHash
671
+ )
672
+ end
673
+
674
+ # Voice settings provider type
675
+ sig { returns(Symbol) }
676
+ attr_accessor :type
677
+
678
+ # Language code, or `auto` to detect automatically.
679
+ sig { returns(T.nilable(String)) }
680
+ attr_reader :language
681
+
682
+ sig { params(language: String).void }
683
+ attr_writer :language
684
+
685
+ sig do
686
+ params(language: String, type: Symbol).returns(T.attached_class)
687
+ end
688
+ def self.new(
689
+ # Language code, or `auto` to detect automatically.
690
+ language: nil,
691
+ # Voice settings provider type
692
+ type: :xai
693
+ )
694
+ end
695
+
696
+ sig { override.returns({ type: Symbol, language: String }) }
697
+ def to_hash
698
+ end
699
+ end
700
+
656
701
  sig do
657
702
  override.returns(
658
703
  T::Array[
@@ -162,6 +162,8 @@ module Telnyx
162
162
  # - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
163
163
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
164
164
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
165
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
166
+ # `ara`, `rex`, `sal`, `leo`.
165
167
  sig { returns(T.nilable(String)) }
166
168
  attr_reader :voice
167
169
 
@@ -178,7 +180,8 @@ module Telnyx
178
180
  Telnyx::Calls::AwsVoiceSettings,
179
181
  Telnyx::AzureVoiceSettings,
180
182
  Telnyx::RimeVoiceSettings,
181
- Telnyx::ResembleVoiceSettings
183
+ Telnyx::ResembleVoiceSettings,
184
+ Telnyx::Calls::ActionStartAIAssistantParams::VoiceSettings::Xai
182
185
  )
183
186
  )
184
187
  )
@@ -194,7 +197,8 @@ module Telnyx
194
197
  Telnyx::Calls::AwsVoiceSettings::OrHash,
195
198
  Telnyx::AzureVoiceSettings::OrHash,
196
199
  Telnyx::RimeVoiceSettings::OrHash,
197
- Telnyx::ResembleVoiceSettings::OrHash
200
+ Telnyx::ResembleVoiceSettings::OrHash,
201
+ Telnyx::Calls::ActionStartAIAssistantParams::VoiceSettings::Xai::OrHash
198
202
  )
199
203
  ).void
200
204
  end
@@ -232,7 +236,8 @@ module Telnyx
232
236
  Telnyx::Calls::AwsVoiceSettings::OrHash,
233
237
  Telnyx::AzureVoiceSettings::OrHash,
234
238
  Telnyx::RimeVoiceSettings::OrHash,
235
- Telnyx::ResembleVoiceSettings::OrHash
239
+ Telnyx::ResembleVoiceSettings::OrHash,
240
+ Telnyx::Calls::ActionStartAIAssistantParams::VoiceSettings::Xai::OrHash
236
241
  ),
237
242
  request_options: Telnyx::RequestOptions::OrHash
238
243
  ).returns(T.attached_class)
@@ -292,6 +297,8 @@ module Telnyx
292
297
  # - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
293
298
  # - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
294
299
  # `Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
300
+ # - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
301
+ # `ara`, `rex`, `sal`, `leo`.
295
302
  voice: nil,
296
303
  # The settings associated with the voice selected
297
304
  voice_settings: nil,
@@ -332,7 +339,8 @@ module Telnyx
332
339
  Telnyx::Calls::AwsVoiceSettings,
333
340
  Telnyx::AzureVoiceSettings,
334
341
  Telnyx::RimeVoiceSettings,
335
- Telnyx::ResembleVoiceSettings
342
+ Telnyx::ResembleVoiceSettings,
343
+ Telnyx::Calls::ActionStartAIAssistantParams::VoiceSettings::Xai
336
344
  ),
337
345
  request_options: Telnyx::RequestOptions
338
346
  }
@@ -975,10 +983,47 @@ module Telnyx
975
983
  Telnyx::Calls::AwsVoiceSettings,
976
984
  Telnyx::AzureVoiceSettings,
977
985
  Telnyx::RimeVoiceSettings,
978
- Telnyx::ResembleVoiceSettings
986
+ Telnyx::ResembleVoiceSettings,
987
+ Telnyx::Calls::ActionStartAIAssistantParams::VoiceSettings::Xai
979
988
  )
980
989
  end
981
990
 
991
+ class Xai < Telnyx::Internal::Type::BaseModel
992
+ OrHash =
993
+ T.type_alias do
994
+ T.any(
995
+ Telnyx::Calls::ActionStartAIAssistantParams::VoiceSettings::Xai,
996
+ Telnyx::Internal::AnyHash
997
+ )
998
+ end
999
+
1000
+ # Voice settings provider type
1001
+ sig { returns(Symbol) }
1002
+ attr_accessor :type
1003
+
1004
+ # Language code, or `auto` to detect automatically.
1005
+ sig { returns(T.nilable(String)) }
1006
+ attr_reader :language
1007
+
1008
+ sig { params(language: String).void }
1009
+ attr_writer :language
1010
+
1011
+ sig do
1012
+ params(language: String, type: Symbol).returns(T.attached_class)
1013
+ end
1014
+ def self.new(
1015
+ # Language code, or `auto` to detect automatically.
1016
+ language: nil,
1017
+ # Voice settings provider type
1018
+ type: :xai
1019
+ )
1020
+ end
1021
+
1022
+ sig { override.returns({ type: Symbol, language: String }) }
1023
+ def to_hash
1024
+ end
1025
+ end
1026
+
982
1027
  sig do
983
1028
  override.returns(
984
1029
  T::Array[