telnyx 5.154.0 → 5.156.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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -13
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +1 -0
  5. data/lib/telnyx/internal/type/union.rb +4 -4
  6. data/lib/telnyx/models/ai/assistant_create_params.rb +2 -2
  7. data/lib/telnyx/models/ai/assistant_tool.rb +94 -1
  8. data/lib/telnyx/models/ai/assistant_update_params.rb +2 -2
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +2 -2
  10. data/lib/telnyx/models/ai/inference_embedding.rb +6 -6
  11. data/lib/telnyx/models/ai/tool_create_params.rb +7 -1
  12. data/lib/telnyx/models/ai/tool_update_params.rb +7 -1
  13. data/lib/telnyx/models/ai/transcription_settings.rb +5 -0
  14. data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +3 -0
  15. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +6 -0
  16. data/lib/telnyx/models/calls/action_speak_params.rb +6 -0
  17. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +3 -0
  18. data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +3 -0
  19. data/lib/telnyx/models/calls/telnyx_voice_settings.rb +2 -1
  20. data/lib/telnyx/models/calls/transcription_config.rb +5 -0
  21. data/lib/telnyx/models/conferences/action_speak_params.rb +6 -0
  22. data/lib/telnyx/models/conversation_relay_embedded_config.rb +3 -0
  23. data/lib/telnyx/models/models_response.rb +0 -1
  24. data/lib/telnyx/models/phone_number_delete_response.rb +12 -1
  25. data/lib/telnyx/models/phone_number_detailed.rb +12 -1
  26. data/lib/telnyx/models/phone_number_slim_list_response.rb +12 -1
  27. data/lib/telnyx/models/speech_to_text_list_providers_params.rb +1 -0
  28. data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +2 -0
  29. data/lib/telnyx/models/text_to_speech_generate_speech_params.rb +13 -8
  30. data/lib/telnyx/models/text_to_speech_retrieve_speech_params.rb +4 -4
  31. data/lib/telnyx/models.rb +0 -6
  32. data/lib/telnyx/resources/ai/assistants/versions.rb +1 -1
  33. data/lib/telnyx/resources/ai/assistants.rb +2 -2
  34. data/lib/telnyx/resources/ai/chat.rb +0 -81
  35. data/lib/telnyx/resources/ai/tools.rb +5 -2
  36. data/lib/telnyx/resources/ai.rb +0 -57
  37. data/lib/telnyx/resources/messages.rb +1 -32
  38. data/lib/telnyx/resources/speech_to_text.rb +1 -1
  39. data/lib/telnyx/version.rb +1 -1
  40. data/lib/telnyx.rb +0 -7
  41. data/rbi/telnyx/client.rbi +1 -0
  42. data/rbi/telnyx/models/ai/assistant_create_params.rbi +4 -0
  43. data/rbi/telnyx/models/ai/assistant_tool.rbi +221 -0
  44. data/rbi/telnyx/models/ai/assistant_update_params.rbi +4 -0
  45. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +4 -0
  46. data/rbi/telnyx/models/ai/inference_embedding.rbi +6 -0
  47. data/rbi/telnyx/models/ai/tool_create_params.rbi +9 -0
  48. data/rbi/telnyx/models/ai/tool_update_params.rbi +9 -0
  49. data/rbi/telnyx/models/ai/transcription_settings.rbi +11 -0
  50. data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +6 -0
  51. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +12 -0
  52. data/rbi/telnyx/models/calls/action_speak_params.rbi +12 -0
  53. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +6 -0
  54. data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +6 -0
  55. data/rbi/telnyx/models/calls/telnyx_voice_settings.rbi +4 -2
  56. data/rbi/telnyx/models/calls/transcription_config.rbi +11 -0
  57. data/rbi/telnyx/models/conferences/action_speak_params.rbi +12 -0
  58. data/rbi/telnyx/models/conversation_relay_embedded_config.rbi +6 -0
  59. data/rbi/telnyx/models/phone_number_delete_response.rbi +14 -0
  60. data/rbi/telnyx/models/phone_number_detailed.rbi +14 -0
  61. data/rbi/telnyx/models/phone_number_slim_list_response.rbi +14 -0
  62. data/rbi/telnyx/models/speech_to_text_list_providers_params.rbi +5 -0
  63. data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +10 -0
  64. data/rbi/telnyx/models/text_to_speech_generate_speech_params.rbi +21 -13
  65. data/rbi/telnyx/models/text_to_speech_retrieve_speech_params.rbi +8 -8
  66. data/rbi/telnyx/models.rbi +0 -7
  67. data/rbi/telnyx/resources/ai/assistants/versions.rbi +1 -0
  68. data/rbi/telnyx/resources/ai/assistants.rbi +2 -0
  69. data/rbi/telnyx/resources/ai/chat.rbi +0 -129
  70. data/rbi/telnyx/resources/ai/tools.rbi +4 -0
  71. data/rbi/telnyx/resources/ai.rbi +0 -33
  72. data/rbi/telnyx/resources/calls/actions.rbi +21 -0
  73. data/rbi/telnyx/resources/conferences/actions.rbi +6 -0
  74. data/rbi/telnyx/resources/messages.rbi +1 -28
  75. data/rbi/telnyx/resources/speech_to_text.rbi +1 -1
  76. data/rbi/telnyx/resources/text_to_speech.rbi +11 -9
  77. data/sig/telnyx/models/ai/assistant_tool.rbs +95 -0
  78. data/sig/telnyx/models/ai/tool_create_params.rbs +7 -0
  79. data/sig/telnyx/models/ai/tool_update_params.rbs +7 -0
  80. data/sig/telnyx/models/ai/transcription_settings.rbs +2 -0
  81. data/sig/telnyx/models/calls/transcription_config.rbs +2 -0
  82. data/sig/telnyx/models/phone_number_delete_response.rbs +5 -0
  83. data/sig/telnyx/models/phone_number_detailed.rbs +5 -0
  84. data/sig/telnyx/models/phone_number_slim_list_response.rbs +5 -0
  85. data/sig/telnyx/models/speech_to_text_list_providers_params.rbs +2 -0
  86. data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +11 -1
  87. data/sig/telnyx/models.rbs +0 -6
  88. data/sig/telnyx/resources/ai/chat.rbs +0 -30
  89. data/sig/telnyx/resources/ai/tools.rbs +2 -0
  90. data/sig/telnyx/resources/ai.rbs +0 -9
  91. data/sig/telnyx/resources/messages.rbs +0 -10
  92. metadata +16 -23
  93. data/lib/telnyx/models/ai/chat_create_completion_params.rb +0 -16
  94. data/lib/telnyx/models/ai/chat_create_completion_response.rb +0 -10
  95. data/lib/telnyx/models/ai_create_response_deprecated_params.rb +0 -20
  96. data/lib/telnyx/models/ai_create_response_deprecated_response.rb +0 -8
  97. data/lib/telnyx/models/ai_retrieve_models_params.rb +0 -14
  98. data/lib/telnyx/models/message_send_whatsapp_params.rb +0 -71
  99. data/lib/telnyx/models/message_send_whatsapp_response.rb +0 -178
  100. data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +0 -32
  101. data/rbi/telnyx/models/ai/chat_create_completion_response.rbi +0 -13
  102. data/rbi/telnyx/models/ai_create_response_deprecated_params.rbi +0 -41
  103. data/rbi/telnyx/models/ai_create_response_deprecated_response.rbi +0 -11
  104. data/rbi/telnyx/models/ai_retrieve_models_params.rbi +0 -27
  105. data/rbi/telnyx/models/message_send_whatsapp_params.rbi +0 -124
  106. data/rbi/telnyx/models/message_send_whatsapp_response.rbi +0 -379
  107. data/sig/telnyx/models/ai/chat_create_completion_params.rbs +0 -17
  108. data/sig/telnyx/models/ai/chat_create_completion_response.rbs +0 -9
  109. data/sig/telnyx/models/ai_create_response_deprecated_params.rbs +0 -24
  110. data/sig/telnyx/models/ai_create_response_deprecated_response.rbs +0 -7
  111. data/sig/telnyx/models/ai_retrieve_models_params.rbs +0 -15
  112. data/sig/telnyx/models/message_send_whatsapp_params.rbs +0 -69
  113. data/sig/telnyx/models/message_send_whatsapp_response.rbs +0 -191
@@ -125,6 +125,15 @@ module Telnyx
125
125
  # @return [Symbol, Telnyx::Models::PhoneNumberDetailed::Status]
126
126
  required :status, enum: -> { Telnyx::PhoneNumberDetailed::Status }
127
127
 
128
+ # @!attribute activated_at
129
+ # ISO 8601 formatted date indicating when the phone number was first activated
130
+ # (transitioned from purchase-pending or port-pending to active). Will be null for
131
+ # numbers that have not yet been activated, or for legacy numbers activated before
132
+ # this field was tracked.
133
+ #
134
+ # @return [Time, nil]
135
+ optional :activated_at, Time, nil?: true
136
+
128
137
  # @!attribute call_forwarding_enabled
129
138
  # Indicates if call forwarding will be enabled for this number if forwards_to and
130
139
  # forwarding_type are filled in. Defaults to true for backwards compatibility with
@@ -196,7 +205,7 @@ module Telnyx
196
205
  optional :updated_at, String
197
206
  end
198
207
 
199
- # @!method initialize(id:, country_iso_alpha2:, created_at:, deletion_lock_enabled:, external_pin:, phone_number:, phone_number_type:, purchased_at:, record_type:, status:, tags:, billing_group_id: nil, call_forwarding_enabled: nil, call_recording_enabled: nil, caller_id_name_enabled: nil, cnam_listing_enabled: nil, connection_id: nil, connection_name: nil, customer_reference: nil, emergency_address_id: nil, emergency_enabled: nil, emergency_status: nil, hd_voice_enabled: nil, inbound_call_screening: nil, messaging_profile_id: nil, messaging_profile_name: nil, source_type: nil, t38_fax_gateway_enabled: nil, updated_at: nil)
208
+ # @!method initialize(id:, country_iso_alpha2:, created_at:, deletion_lock_enabled:, external_pin:, phone_number:, phone_number_type:, purchased_at:, record_type:, status:, tags:, activated_at: nil, billing_group_id: nil, call_forwarding_enabled: nil, call_recording_enabled: nil, caller_id_name_enabled: nil, cnam_listing_enabled: nil, connection_id: nil, connection_name: nil, customer_reference: nil, emergency_address_id: nil, emergency_enabled: nil, emergency_status: nil, hd_voice_enabled: nil, inbound_call_screening: nil, messaging_profile_id: nil, messaging_profile_name: nil, source_type: nil, t38_fax_gateway_enabled: nil, updated_at: nil)
200
209
  # Some parameter documentations has been truncated, see
201
210
  # {Telnyx::Models::PhoneNumberDetailed} for more details.
202
211
  #
@@ -222,6 +231,8 @@ module Telnyx
222
231
  #
223
232
  # @param tags [Array<String>] A list of user-assigned tags to help manage the phone number.
224
233
  #
234
+ # @param activated_at [Time, nil] ISO 8601 formatted date indicating when the phone number was first activated (tr
235
+ #
225
236
  # @param billing_group_id [String, nil] Identifies the billing group associated with the phone number.
226
237
  #
227
238
  # @param call_forwarding_enabled [Boolean] Indicates if call forwarding will be enabled for this number if forwards_to and
@@ -57,6 +57,15 @@ module Telnyx
57
57
  # @return [String, nil]
58
58
  optional :id, String
59
59
 
60
+ # @!attribute activated_at
61
+ # ISO 8601 formatted date indicating when the phone number was first activated
62
+ # (transitioned from purchase-pending or port-pending to active). Will be null for
63
+ # numbers that have not yet been activated, or for legacy numbers activated before
64
+ # this field was tracked.
65
+ #
66
+ # @return [Time, nil]
67
+ optional :activated_at, Time, nil?: true
68
+
60
69
  # @!attribute call_forwarding_enabled
61
70
  # Indicates if call forwarding will be enabled for this number if forwards_to and
62
71
  # forwarding_type are filled in. Defaults to true for backwards compatibility with
@@ -158,12 +167,14 @@ module Telnyx
158
167
  optional :updated_at, String
159
168
  end
160
169
 
161
- # @!method initialize(id: nil, billing_group_id: nil, call_forwarding_enabled: nil, call_recording_enabled: nil, caller_id_name_enabled: nil, cnam_listing_enabled: nil, connection_id: nil, country_iso_alpha2: nil, created_at: nil, customer_reference: nil, emergency_address_id: nil, emergency_enabled: nil, emergency_status: nil, external_pin: nil, hd_voice_enabled: nil, inbound_call_screening: nil, phone_number: nil, phone_number_type: nil, purchased_at: nil, record_type: nil, status: nil, t38_fax_gateway_enabled: nil, updated_at: nil)
170
+ # @!method initialize(id: nil, activated_at: nil, billing_group_id: nil, call_forwarding_enabled: nil, call_recording_enabled: nil, caller_id_name_enabled: nil, cnam_listing_enabled: nil, connection_id: nil, country_iso_alpha2: nil, created_at: nil, customer_reference: nil, emergency_address_id: nil, emergency_enabled: nil, emergency_status: nil, external_pin: nil, hd_voice_enabled: nil, inbound_call_screening: nil, phone_number: nil, phone_number_type: nil, purchased_at: nil, record_type: nil, status: nil, t38_fax_gateway_enabled: nil, updated_at: nil)
162
171
  # Some parameter documentations has been truncated, see
163
172
  # {Telnyx::Models::PhoneNumberSlimListResponse} for more details.
164
173
  #
165
174
  # @param id [String] Identifies the resource.
166
175
  #
176
+ # @param activated_at [Time, nil] ISO 8601 formatted date indicating when the phone number was first activated (tr
177
+ #
167
178
  # @param billing_group_id [String] Identifies the billing group associated with the phone number.
168
179
  #
169
180
  # @param call_forwarding_enabled [Boolean] Indicates if call forwarding will be enabled for this number if forwards_to and
@@ -51,6 +51,7 @@ module Telnyx
51
51
  ASSEMBLYAI = :assemblyai
52
52
  XAI = :xai
53
53
  SONIOX = :soniox
54
+ PARAKEET = :parakeet
54
55
  AZURE = :azure
55
56
  OPENAI = :openai
56
57
  GOOGLE = :google
@@ -115,6 +115,7 @@ module Telnyx
115
115
  X_AI = :xAI
116
116
  SPEECHMATICS = :Speechmatics
117
117
  SONIOX = :Soniox
118
+ PARAKEET = :Parakeet
118
119
 
119
120
  # @!method self.values
120
121
  # @return [Array<Symbol>]
@@ -140,6 +141,7 @@ module Telnyx
140
141
  XAI_GROK_STT = :"xai/grok-stt"
141
142
  SPEECHMATICS_STANDARD = :"speechmatics/standard"
142
143
  SONIOX_STT_RT_V4 = :"soniox/stt-rt-v4"
144
+ PARAKEET_TDT_0_6B_V3 = :"parakeet/tdt-0.6b-v3"
143
145
 
144
146
  # @!method self.values
145
147
  # @return [Array<Symbol>]
@@ -71,7 +71,9 @@ module Telnyx
71
71
  # @!attribute telnyx
72
72
  # Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
73
73
  # `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
74
- # `volume`, and `emotion`.
74
+ # `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
75
+ # or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
76
+ # restricted to `mp3` or `pcm` (no `wav`).
75
77
  #
76
78
  # @return [::Telnyx::Models::TextToSpeechGenerateSpeechParams::Telnyx, nil]
77
79
  optional :telnyx, -> { ::Telnyx::TextToSpeechGenerateSpeechParams::Telnyx }
@@ -91,10 +93,10 @@ module Telnyx
91
93
  # @!attribute voice
92
94
  # Voice identifier in the format `provider.model_id.voice_id` or
93
95
  # `provider.voice_id`. Examples: `telnyx.NaturalHD.Alloy`,
94
- # `Telnyx.Ultra.<voice_id>`, `azure.en-US-AvaMultilingualNeural`,
95
- # `aws.Polly.Generative.Lucia`. When provided, `provider`, `model_id`, and
96
- # `voice_id` are extracted automatically and take precedence over individual
97
- # parameters.
96
+ # `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
97
+ # `azure.en-US-AvaMultilingualNeural`, `aws.Polly.Generative.Lucia`. When
98
+ # provided, `provider`, `model_id`, and `voice_id` are extracted automatically and
99
+ # take precedence over individual parameters.
98
100
  #
99
101
  # @return [String, nil]
100
102
  optional :voice, String
@@ -486,7 +488,8 @@ module Telnyx
486
488
  optional :temperature, Float
487
489
 
488
490
  # @!attribute voice_speed
489
- # Voice speed multiplier. Applies to all models. Range: 0.5 to 2.0.
491
+ # Voice speed multiplier. Applies to all models except `Bayan` and `Sukhan`, which
492
+ # don't support it. Range: 0.5 to 2.0.
490
493
  #
491
494
  # @return [Float, nil]
492
495
  optional :voice_speed, Float
@@ -503,7 +506,9 @@ module Telnyx
503
506
  #
504
507
  # Telnyx provider-specific parameters. Use `voice_speed` and `temperature` for
505
508
  # `Natural` and `NaturalHD` models. For the `Ultra` model, use `voice_speed`,
506
- # `volume`, and `emotion`.
509
+ # `volume`, and `emotion`. `Bayan` and `Sukhan` don't use `temperature`, `volume`,
510
+ # or `emotion`, and don't support `voice_speed`. `Sukhan`'s `response_format` is
511
+ # restricted to `mp3` or `pcm` (no `wav`).
507
512
  #
508
513
  # @param emotion [Symbol, ::Telnyx::Models::TextToSpeechGenerateSpeechParams::Telnyx::Emotion] Emotion control for the Ultra model. Adjusts the emotional tone of the synthesiz
509
514
  #
@@ -513,7 +518,7 @@ module Telnyx
513
518
  #
514
519
  # @param temperature [Float] Sampling temperature. Applies to `Natural` and `NaturalHD` models only.
515
520
  #
516
- # @param voice_speed [Float] Voice speed multiplier. Applies to all models. Range: 0.5 to 2.0.
521
+ # @param voice_speed [Float] Voice speed multiplier. Applies to all models except `Bayan` and `Sukhan`, which
517
522
  #
518
523
  # @param volume [Float] Volume level for the Ultra model. Range: 0.0 to 2.0.
519
524
 
@@ -45,10 +45,10 @@ module Telnyx
45
45
  # @!attribute voice
46
46
  # Voice identifier in the format `provider.model_id.voice_id` or
47
47
  # `provider.voice_id` (e.g. `telnyx.NaturalHD.Telnyx_Alloy`,
48
- # `Telnyx.Ultra.<voice_id>`, or `azure.en-US-AvaMultilingualNeural`). When
49
- # provided, the `provider`, `model_id`, and `voice_id` are extracted
50
- # automatically. Takes precedence over individual `provider`/`model_id`/`voice_id`
51
- # parameters.
48
+ # `Telnyx.Ultra.<voice_id>`, `Telnyx.Bayan.Ahmed`, `Telnyx.Sukhan.urdu-professor`,
49
+ # or `azure.en-US-AvaMultilingualNeural`). When provided, the `provider`,
50
+ # `model_id`, and `voice_id` are extracted automatically. Takes precedence over
51
+ # individual `provider`/`model_id`/`voice_id` parameters.
52
52
  #
53
53
  # @return [String, nil]
54
54
  optional :voice, String
data/lib/telnyx/models.rb CHANGED
@@ -85,12 +85,8 @@ module Telnyx
85
85
 
86
86
  AI = Telnyx::Models::AI
87
87
 
88
- AICreateResponseDeprecatedParams = Telnyx::Models::AICreateResponseDeprecatedParams
89
-
90
88
  AIRetrieveConversationHistoriesParams = Telnyx::Models::AIRetrieveConversationHistoriesParams
91
89
 
92
- AIRetrieveModelsParams = Telnyx::Models::AIRetrieveModelsParams
93
-
94
90
  AISummarizeParams = Telnyx::Models::AISummarizeParams
95
91
 
96
92
  AlphanumericSenderID = Telnyx::Models::AlphanumericSenderID
@@ -930,8 +926,6 @@ module Telnyx
930
926
 
931
927
  MessageSendShortCodeParams = Telnyx::Models::MessageSendShortCodeParams
932
928
 
933
- MessageSendWhatsappParams = Telnyx::Models::MessageSendWhatsappParams
934
-
935
929
  MessageSendWithAlphanumericSenderParams = Telnyx::Models::MessageSendWithAlphanumericSenderParams
936
930
 
937
931
  MessageTemplate = Telnyx::Models::MessageTemplate
@@ -97,7 +97,7 @@ module Telnyx
97
97
  #
98
98
  # @param tool_ids [Array<String>] Body param: IDs of shared tools to attach to the assistant. New integrations sho
99
99
  #
100
- # @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Body param: Deprecated for new integrations. Inline tool definitions available t
100
+ # @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Body param: Deprecated for new integrations. Inline tool definitions available t
101
101
  #
102
102
  # @param transcription [Telnyx::Models::AI::TranscriptionSettings] Body param
103
103
  #
@@ -88,7 +88,7 @@ module Telnyx
88
88
  #
89
89
  # @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
90
90
  #
91
- # @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
91
+ # @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
92
92
  #
93
93
  # @param transcription [Telnyx::Models::AI::TranscriptionSettings]
94
94
  #
@@ -202,7 +202,7 @@ module Telnyx
202
202
  #
203
203
  # @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
204
204
  #
205
- # @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
205
+ # @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
206
206
  #
207
207
  # @param transcription [Telnyx::Models::AI::TranscriptionSettings]
208
208
  #
@@ -3,88 +3,7 @@
3
3
  module Telnyx
4
4
  module Resources
5
5
  class AI
6
- # Generate text with LLMs
7
6
  class Chat
8
- # @deprecated
9
- #
10
- # Some parameter documentations has been truncated, see
11
- # {Telnyx::Models::AI::ChatCreateCompletionParams} for more details.
12
- #
13
- # **Deprecated**: Use `POST /v2/ai/openai/chat/completions` instead. Chat with a
14
- # language model. This endpoint is consistent with the
15
- # [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat)
16
- # and may be used with the OpenAI JS or Python SDK.
17
- #
18
- # @overload create_completion(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, guided_choice: nil, guided_json: nil, guided_regex: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, model: nil, n: nil, presence_penalty: nil, response_format: nil, seed: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil, request_options: {})
19
- #
20
- # @param messages [Array<Telnyx::Models::AI::ChatCompletionRequest::Message>] A list of the previous chat messages for context.
21
- #
22
- # @param api_key_ref [String] If you are using an external inference provider like xAI or OpenAI, this field a
23
- #
24
- # @param best_of [Integer] This is used with `use_beam_search` to determine how many candidate beams to exp
25
- #
26
- # @param early_stopping [Boolean] This is used with `use_beam_search`. If `true`, generation stops as soon as ther
27
- #
28
- # @param enable_thinking [Boolean] Whether to enable the thinking/reasoning phase for models that support it (e.g.,
29
- #
30
- # @param frequency_penalty [Float] Higher values will penalize the model from repeating the same output tokens.
31
- #
32
- # @param guided_choice [Array<String>] If specified, the output will be exactly one of the choices.
33
- #
34
- # @param guided_json [Hash{Symbol=>Object}] Must be a valid JSON schema. If specified, the output will follow the JSON schem
35
- #
36
- # @param guided_regex [String] If specified, the output will follow the regex pattern.
37
- #
38
- # @param length_penalty [Float] This is used with `use_beam_search` to prefer shorter or longer completions.
39
- #
40
- # @param logprobs [Boolean] Whether to return log probabilities of the output tokens or not. If true, return
41
- #
42
- # @param max_tokens [Integer] Maximum number of completion tokens the model should generate.
43
- #
44
- # @param min_p [Float] This is an alternative to `top_p` that [many prefer](https://github.com/huggingf
45
- #
46
- # @param model [String] The language model to chat with.
47
- #
48
- # @param n [Float] This will return multiple choices for you instead of a single chat completion.
49
- #
50
- # @param presence_penalty [Float] Higher values will penalize the model from repeating the same output tokens.
51
- #
52
- # @param response_format [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat] Use this is you want to guarantee a JSON output without defining a schema. For c
53
- #
54
- # @param seed [Integer] If specified, the system will make a best effort to sample deterministically, su
55
- #
56
- # @param stop [String, Array<String>] Up to 4 sequences where the API will stop generating further tokens. The returne
57
- #
58
- # @param stream [Boolean] Whether or not to stream data-only server-sent events as they become available.
59
- #
60
- # @param temperature [Float] Adjusts the "creativity" of the model. Lower values make the model more determin
61
- #
62
- # @param tool_choice [Symbol, Telnyx::Models::AI::ChatCompletionRequest::ToolChoice]
63
- #
64
- # @param tools [Array<Telnyx::Models::AI::ChatCompletionRequest::Tool::Function, Telnyx::Models::AI::ChatCompletionRequest::Tool::Retrieval>] The `function` tool type follows the same schema as the [OpenAI Chat Completions
65
- #
66
- # @param top_logprobs [Integer] This is used with `logprobs`. An integer between 0 and 20 specifying the number
67
- #
68
- # @param top_p [Float] An alternative or complement to `temperature`. This adjusts how many of the top
69
- #
70
- # @param use_beam_search [Boolean] Setting this to `true` will allow the model to [explore more completion options]
71
- #
72
- # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
73
- #
74
- # @return [Hash{Symbol=>Object}]
75
- #
76
- # @see Telnyx::Models::AI::ChatCreateCompletionParams
77
- def create_completion(params)
78
- parsed, options = Telnyx::AI::ChatCreateCompletionParams.dump_request(params)
79
- @client.request(
80
- method: :post,
81
- path: "ai/chat/completions",
82
- body: parsed,
83
- model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
84
- options: options
85
- )
86
- end
87
-
88
7
  # @api private
89
8
  #
90
9
  # @param client [Telnyx::Client]
@@ -7,10 +7,11 @@ module Telnyx
7
7
  class Tools
8
8
  # Create Tool
9
9
  #
10
- # @overload create(display_name:, type:, function: nil, handoff: nil, invite: nil, retrieval: nil, timeout_ms: nil, webhook: nil, request_options: {})
10
+ # @overload create(display_name:, type:, client_side_tool: nil, function: nil, handoff: nil, invite: nil, retrieval: nil, timeout_ms: nil, webhook: nil, request_options: {})
11
11
  #
12
12
  # @param display_name [String]
13
13
  # @param type [String]
14
+ # @param client_side_tool [Hash{Symbol=>Object}]
14
15
  # @param function [Hash{Symbol=>Object}]
15
16
  # @param handoff [Hash{Symbol=>Object}]
16
17
  # @param invite [Hash{Symbol=>Object}]
@@ -55,10 +56,12 @@ module Telnyx
55
56
 
56
57
  # Update Tool
57
58
  #
58
- # @overload update(tool_id, display_name: nil, function: nil, handoff: nil, invite: nil, retrieval: nil, timeout_ms: nil, type: nil, webhook: nil, request_options: {})
59
+ # @overload update(tool_id, client_side_tool: nil, display_name: nil, function: nil, handoff: nil, invite: nil, retrieval: nil, timeout_ms: nil, type: nil, webhook: nil, request_options: {})
59
60
  #
60
61
  # @param tool_id [String] Unique identifier of the tool.
61
62
  #
63
+ # @param client_side_tool [Hash{Symbol=>Object}]
64
+ #
62
65
  # @param display_name [String]
63
66
  #
64
67
  # @param function [Hash{Symbol=>Object}]
@@ -10,7 +10,6 @@ module Telnyx
10
10
  # @return [Telnyx::Resources::AI::Audio]
11
11
  attr_reader :audio
12
12
 
13
- # Generate text with LLMs
14
13
  # @return [Telnyx::Resources::AI::Chat]
15
14
  attr_reader :chat
16
15
 
@@ -45,34 +44,6 @@ module Telnyx
45
44
  # @return [Telnyx::Resources::AI::Tools]
46
45
  attr_reader :tools
47
46
 
48
- # @deprecated
49
- #
50
- # **Deprecated**: Use `POST /v2/ai/openai/responses` instead. This endpoint is
51
- # compatible with the
52
- # [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
53
- # and may be used with the OpenAI JS or Python SDK. Response id parameter is not
54
- # supported at the moment. Use the `conversation` parameter with a Telnyx
55
- # Conversation ID to leverage persistent conversations.
56
- #
57
- # @overload create_response_deprecated(response_request:, request_options: {})
58
- #
59
- # @param response_request [Hash{Symbol=>Object}]
60
- # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
61
- #
62
- # @return [Hash{Symbol=>Object}]
63
- #
64
- # @see Telnyx::Models::AICreateResponseDeprecatedParams
65
- def create_response_deprecated(params)
66
- parsed, options = Telnyx::AICreateResponseDeprecatedParams.dump_request(params)
67
- @client.request(
68
- method: :post,
69
- path: "ai/responses",
70
- body: parsed[:response_request],
71
- model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
72
- options: options
73
- )
74
- end
75
-
76
47
  # Some parameter documentations has been truncated, see
77
48
  # {Telnyx::Models::AIRetrieveConversationHistoriesParams} for more details.
78
49
  #
@@ -184,34 +155,6 @@ module Telnyx
184
155
  )
185
156
  end
186
157
 
187
- # @deprecated
188
- #
189
- # **Deprecated**: Use `GET /v2/ai/openai/models` instead.
190
- #
191
- # Returns the same `ModelsResponse` payload as the OpenAI-compatible endpoint —
192
- # open-source LLMs hosted on Telnyx (e.g. `moonshotai/Kimi-K2.6`,
193
- # `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`), embedding models, and
194
- # fine-tuned models — kept around for backwards compatibility. New integrations
195
- # should use `/v2/ai/openai/models`.
196
- #
197
- # Model ids follow the `{organization}/{model_name}` convention from Hugging Face.
198
- #
199
- # @overload retrieve_models(request_options: {})
200
- #
201
- # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
202
- #
203
- # @return [Telnyx::Models::ModelsResponse]
204
- #
205
- # @see Telnyx::Models::AIRetrieveModelsParams
206
- def retrieve_models(params = {})
207
- @client.request(
208
- method: :get,
209
- path: "ai/models",
210
- model: Telnyx::ModelsResponse,
211
- options: params[:request_options]
212
- )
213
- end
214
-
215
158
  # Generate a summary of a file's contents.
216
159
  #
217
160
  # Supports the following text formats:
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Telnyx
4
4
  module Resources
5
+ # Messages
5
6
  class Messages
6
7
  # Send RCS messages
7
8
  # @return [Telnyx::Resources::Messages::Rcs]
@@ -351,38 +352,6 @@ module Telnyx
351
352
  )
352
353
  end
353
354
 
354
- # Send a Whatsapp message
355
- #
356
- # @overload send_whatsapp(from:, to:, whatsapp_message:, messaging_profile_id: nil, type: nil, webhook_url: nil, request_options: {})
357
- #
358
- # @param from [String] Phone number in +E.164 format associated with Whatsapp account
359
- #
360
- # @param to [String] Phone number in +E.164 format
361
- #
362
- # @param whatsapp_message [Telnyx::Models::WhatsappMessageContent]
363
- #
364
- # @param messaging_profile_id [String] Messaging profile ID - required if the 'from' number is not SMS-enabled
365
- #
366
- # @param type [Symbol, Telnyx::Models::MessageSendWhatsappParams::Type] Message type - must be set to "WHATSAPP"
367
- #
368
- # @param webhook_url [String] The URL where webhooks related to this message will be sent.
369
- #
370
- # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
371
- #
372
- # @return [Telnyx::Models::MessageSendWhatsappResponse]
373
- #
374
- # @see Telnyx::Models::MessageSendWhatsappParams
375
- def send_whatsapp(params)
376
- parsed, options = Telnyx::MessageSendWhatsappParams.dump_request(params)
377
- @client.request(
378
- method: :post,
379
- path: "messages/whatsapp",
380
- body: parsed,
381
- model: Telnyx::Models::MessageSendWhatsappResponse,
382
- options: options
383
- )
384
- end
385
-
386
355
  # Send an SMS message using an alphanumeric sender ID. This is SMS only.
387
356
  #
388
357
  # @overload send_with_alphanumeric_sender(from:, messaging_profile_id:, text:, to:, use_profile_webhooks: nil, webhook_failover_url: nil, webhook_url: nil, request_options: {})
@@ -56,7 +56,7 @@ module Telnyx
56
56
  # `Authorization: Bearer <API_KEY>` header.
57
57
  #
58
58
  # Supported engines: `Azure`, `Deepgram`, `Google`, `Telnyx`, `xAI`,
59
- # `Speechmatics`, `Soniox`.
59
+ # `Speechmatics`, `Soniox`, `Parakeet`.
60
60
  #
61
61
  # **Connection flow:**
62
62
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.154.0"
4
+ VERSION = "5.156.0"
5
5
  end
data/lib/telnyx.rb CHANGED
@@ -222,8 +222,6 @@ require_relative "telnyx/models/ai/authentication_method"
222
222
  require_relative "telnyx/models/ai/background_task_status"
223
223
  require_relative "telnyx/models/ai/boolean_op_expression"
224
224
  require_relative "telnyx/models/ai/bucket_ids"
225
- require_relative "telnyx/models/ai/chat_create_completion_params"
226
- require_relative "telnyx/models/ai/chat_create_completion_response"
227
225
  require_relative "telnyx/models/ai/cluster_compute_params"
228
226
  require_relative "telnyx/models/ai/cluster_compute_response"
229
227
  require_relative "telnyx/models/ai/cluster_delete_params"
@@ -424,11 +422,8 @@ require_relative "telnyx/models/ai/transfer_tool"
424
422
  require_relative "telnyx/models/ai/voice_settings"
425
423
  require_relative "telnyx/models/ai/webhook_tool"
426
424
  require_relative "telnyx/models/ai/widget_settings"
427
- require_relative "telnyx/models/ai_create_response_deprecated_params"
428
- require_relative "telnyx/models/ai_create_response_deprecated_response"
429
425
  require_relative "telnyx/models/ai_retrieve_conversation_histories_params"
430
426
  require_relative "telnyx/models/ai_retrieve_conversation_histories_response"
431
- require_relative "telnyx/models/ai_retrieve_models_params"
432
427
  require_relative "telnyx/models/ai_summarize_params"
433
428
  require_relative "telnyx/models/ai_summarize_response"
434
429
  require_relative "telnyx/models/alphanumeric_sender_id"
@@ -1289,8 +1284,6 @@ require_relative "telnyx/models/message_send_params"
1289
1284
  require_relative "telnyx/models/message_send_response"
1290
1285
  require_relative "telnyx/models/message_send_short_code_params"
1291
1286
  require_relative "telnyx/models/message_send_short_code_response"
1292
- require_relative "telnyx/models/message_send_whatsapp_params"
1293
- require_relative "telnyx/models/message_send_whatsapp_response"
1294
1287
  require_relative "telnyx/models/message_send_with_alphanumeric_sender_params"
1295
1288
  require_relative "telnyx/models/message_send_with_alphanumeric_sender_response"
1296
1289
  require_relative "telnyx/models/message_template"
@@ -270,6 +270,7 @@ module Telnyx
270
270
  sig { returns(Telnyx::Resources::Media) }
271
271
  attr_reader :media
272
272
 
273
+ # Messages
273
274
  sig { returns(Telnyx::Resources::Messages) }
274
275
  attr_reader :messages
275
276
 
@@ -262,6 +262,7 @@ module Telnyx
262
262
  T::Array[
263
263
  T.any(
264
264
  Telnyx::AI::InferenceEmbeddingWebhookToolParams,
265
+ Telnyx::AI::AssistantTool::ClientSideTool,
265
266
  Telnyx::AI::RetrievalTool,
266
267
  Telnyx::AI::AssistantTool::Handoff,
267
268
  Telnyx::AI::HangupTool,
@@ -284,6 +285,7 @@ module Telnyx
284
285
  T::Array[
285
286
  T.any(
286
287
  Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
288
+ Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
287
289
  Telnyx::AI::RetrievalTool::OrHash,
288
290
  Telnyx::AI::AssistantTool::Handoff::OrHash,
289
291
  Telnyx::AI::HangupTool::OrHash,
@@ -352,6 +354,7 @@ module Telnyx
352
354
  T::Array[
353
355
  T.any(
354
356
  Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
357
+ Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
355
358
  Telnyx::AI::RetrievalTool::OrHash,
356
359
  Telnyx::AI::AssistantTool::Handoff::OrHash,
357
360
  Telnyx::AI::HangupTool::OrHash,
@@ -498,6 +501,7 @@ module Telnyx
498
501
  T::Array[
499
502
  T.any(
500
503
  Telnyx::AI::InferenceEmbeddingWebhookToolParams,
504
+ Telnyx::AI::AssistantTool::ClientSideTool,
501
505
  Telnyx::AI::RetrievalTool,
502
506
  Telnyx::AI::AssistantTool::Handoff,
503
507
  Telnyx::AI::HangupTool,