telnyx 5.167.0 → 5.169.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 (396) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +44 -0
  5. data/lib/telnyx/internal/type/union.rb +6 -6
  6. data/lib/telnyx/models/ai/assistant_a2_a_agent.rb +195 -0
  7. data/lib/telnyx/models/ai/assistant_create_params.rb +22 -7
  8. data/lib/telnyx/models/ai/assistant_tool.rb +285 -12
  9. data/lib/telnyx/models/ai/assistant_update_params.rb +37 -10
  10. data/lib/telnyx/models/ai/assistants/update_assistant.rb +37 -10
  11. data/lib/telnyx/models/ai/audio_transcribe_params.rb +33 -13
  12. data/lib/telnyx/models/ai/audio_transcribe_response.rb +34 -56
  13. data/lib/telnyx/models/ai/audio_transcription_response_word.rb +74 -0
  14. data/lib/telnyx/models/ai/chat_completion_request.rb +128 -74
  15. data/lib/telnyx/models/ai/flow_node.rb +2 -2
  16. data/lib/telnyx/models/ai/inference_embedding.rb +29 -11
  17. data/lib/telnyx/models/ai/inference_embedding_interruption_settings.rb +10 -1
  18. data/lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb +21 -1
  19. data/lib/telnyx/models/ai/openai/function_definition.rb +31 -0
  20. data/lib/telnyx/models/ai/post_conversation_settings.rb +4 -4
  21. data/lib/telnyx/models/ai/post_conversation_settings_req.rb +4 -4
  22. data/lib/telnyx/models/ai/privacy_settings.rb +20 -1
  23. data/lib/telnyx/models/ai/retrieval_tool.rb +21 -1
  24. data/lib/telnyx/models/ai/telephony_settings.rb +101 -17
  25. data/lib/telnyx/models/ai/tool_node.rb +2 -2
  26. data/lib/telnyx/models/ai/transcription_settings.rb +12 -4
  27. data/lib/telnyx/models/ai/transcription_settings_config.rb +12 -11
  28. data/lib/telnyx/models/ai/typesafe/v1_systemone_params.rb +268 -0
  29. data/lib/telnyx/models/ai/typesafe/v1_systemone_response.rb +222 -0
  30. data/lib/telnyx/models/bot_challenge_create_params.rb +38 -0
  31. data/lib/telnyx/models/bot_challenge_create_response.rb +87 -0
  32. data/lib/telnyx/models/bot_session_list_params.rb +34 -0
  33. data/lib/telnyx/models/bot_session_list_response.rb +32 -0
  34. data/lib/telnyx/models/bot_signup_create_params.rb +103 -0
  35. data/lib/telnyx/models/bot_signup_resend_magic_link_params.rb +22 -0
  36. data/lib/telnyx/models/call_dial_params.rb +75 -7
  37. data/lib/telnyx/models/calls/action_transfer_params.rb +75 -7
  38. data/lib/telnyx/models/calls/transcription_config.rb +14 -3
  39. data/lib/telnyx/models/calls/transcription_engine_assemblyai_config.rb +6 -3
  40. data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -0
  41. data/lib/telnyx/models/compute/func_retrieve_logs_params.rb +66 -0
  42. data/lib/telnyx/models/compute/func_retrieve_logs_response.rb +161 -0
  43. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_params.rb +69 -0
  44. data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_response.rb +137 -0
  45. data/lib/telnyx/models/compute/func_retrieve_revisions_params.rb +34 -0
  46. data/lib/telnyx/models/compute/func_retrieve_revisions_response.rb +101 -0
  47. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_params.rb +22 -0
  48. data/lib/telnyx/models/compute/func_retrieve_ship_inspection_response.rb +94 -0
  49. data/lib/telnyx/models/compute/funcs/export_create_params.rb +62 -0
  50. data/lib/telnyx/models/compute/funcs/export_delete_all_params.rb +24 -0
  51. data/lib/telnyx/models/compute/funcs/export_list_params.rb +24 -0
  52. data/lib/telnyx/models/compute/funcs/func_log_export_config_response.rb +113 -0
  53. data/lib/telnyx/models/compute/functions_observability_pagination_meta.rb +35 -0
  54. data/lib/telnyx/models/compute/logs_meta.rb +23 -0
  55. data/lib/telnyx/models/connection_retrieve_count_params.rb +14 -0
  56. data/lib/telnyx/models/connection_retrieve_count_response.rb +215 -0
  57. data/lib/telnyx/models/credential_connection.rb +4 -1
  58. data/lib/telnyx/models/detail_record_list_params.rb +19 -2
  59. data/lib/telnyx/models/email_inboxes/email_message.rb +12 -1
  60. data/lib/telnyx/models/email_message_batch_params.rb +4 -1
  61. data/lib/telnyx/models/email_message_batch_response.rb +1 -0
  62. data/lib/telnyx/models/fqdn_connection.rb +5 -2
  63. data/lib/telnyx/models/fqdn_connections/fqdn_authentication.rb +9 -2
  64. data/lib/telnyx/models/inbound_message_webhook_event.rb +3 -70
  65. data/lib/telnyx/models/machine_payment_account_credit_params.rb +29 -0
  66. data/lib/telnyx/models/machine_payment_account_credit_response.rb +223 -0
  67. data/lib/telnyx/models/message_retrieve_group_messages_response.rb +3 -3
  68. data/lib/telnyx/models/message_retrieve_response.rb +4 -4
  69. data/lib/telnyx/models/message_schedule_response.rb +3 -3
  70. data/lib/telnyx/models/message_send_group_mms_response.rb +3 -3
  71. data/lib/telnyx/models/message_send_long_code_response.rb +3 -3
  72. data/lib/telnyx/models/message_send_number_pool_response.rb +3 -3
  73. data/lib/telnyx/models/message_send_response.rb +3 -3
  74. data/lib/telnyx/models/message_send_short_code_response.rb +3 -3
  75. data/lib/telnyx/models/messaging_inbound_message.rb +71 -0
  76. data/lib/telnyx/models/messaging_inbound_message_payload.rb +412 -66
  77. data/lib/telnyx/models/messaging_messaging_profile.rb +11 -1
  78. data/lib/telnyx/models/messaging_outbound_message_payload.rb +42 -2
  79. data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
  80. data/lib/telnyx/models/messaging_profile_features.rb +26 -0
  81. data/lib/telnyx/models/messaging_profile_update_params.rb +11 -1
  82. data/lib/telnyx/models/noise_suppression_engine_list_params.rb +14 -0
  83. data/lib/telnyx/models/noise_suppression_engine_list_response.rb +50 -0
  84. data/lib/telnyx/models/number_order_status_update.rb +15 -3
  85. data/lib/telnyx/models/number_order_status_update_webhook_event.rb +15 -3
  86. data/lib/telnyx/models/outbound_message.rb +1 -0
  87. data/lib/telnyx/models/outbound_message_payload.rb +45 -5
  88. data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -0
  89. data/lib/telnyx/models/success_response.rb +27 -0
  90. data/lib/telnyx/models/texml/accounts/call_calls_params.rb +246 -3
  91. data/lib/telnyx/models/texml/accounts/conferences/participant_participants_params.rb +82 -1
  92. data/lib/telnyx/models/texml/call_create_params.rb +78 -0
  93. data/lib/telnyx/models/texml/call_create_response.rb +55 -0
  94. data/lib/telnyx/models/texml_initiate_ai_call_params.rb +76 -1
  95. data/lib/telnyx/models/uac_connection.rb +4 -1
  96. data/lib/telnyx/models/uac_external_settings.rb +6 -2
  97. data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
  98. data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
  99. data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +2 -2
  100. data/lib/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rb +104 -1
  101. data/lib/telnyx/models/whatsapp/phone_number_get_response.rb +103 -1
  102. data/lib/telnyx/models/whatsapp/phone_number_list_response.rb +103 -1
  103. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rb +22 -0
  104. data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rb +207 -0
  105. data/lib/telnyx/models/whatsapp_account_update.rb +112 -0
  106. data/lib/telnyx/models/whatsapp_message_echo.rb +340 -0
  107. data/lib/telnyx/models/x402/credit_account/payment_list_params.rb +34 -0
  108. data/lib/telnyx/models/x402/credit_account/payment_retrieve_params.rb +24 -0
  109. data/lib/telnyx/models/x402/credit_account/payment_retrieve_response.rb +21 -0
  110. data/lib/telnyx/models/x402/credit_account/x402_transaction_record.rb +113 -0
  111. data/lib/telnyx/models.rb +26 -0
  112. data/lib/telnyx/resources/ai/assistants/versions.rb +4 -2
  113. data/lib/telnyx/resources/ai/assistants.rb +8 -4
  114. data/lib/telnyx/resources/ai/audio.rb +2 -2
  115. data/lib/telnyx/resources/ai/openai/chat.rb +2 -8
  116. data/lib/telnyx/resources/ai/typesafe/v1.rb +62 -0
  117. data/lib/telnyx/resources/ai/typesafe.rb +22 -0
  118. data/lib/telnyx/resources/ai.rb +4 -0
  119. data/lib/telnyx/resources/bot_challenge.rb +53 -0
  120. data/lib/telnyx/resources/bot_sessions.rb +57 -0
  121. data/lib/telnyx/resources/bot_signup.rb +97 -0
  122. data/lib/telnyx/resources/calls/actions.rb +1 -1
  123. data/lib/telnyx/resources/calls.rb +1 -1
  124. data/lib/telnyx/resources/compute/funcs/export.rb +105 -0
  125. data/lib/telnyx/resources/compute/funcs.rb +145 -0
  126. data/lib/telnyx/resources/compute.rb +18 -0
  127. data/lib/telnyx/resources/connections.rb +20 -0
  128. data/lib/telnyx/resources/detail_records.rb +1 -1
  129. data/lib/telnyx/resources/email_messages.rb +6 -2
  130. data/lib/telnyx/resources/machine_payments.rb +73 -0
  131. data/lib/telnyx/resources/messaging_profiles.rb +6 -2
  132. data/lib/telnyx/resources/noise_suppression_engines.rb +37 -0
  133. data/lib/telnyx/resources/texml/accounts/conferences/participants.rb +15 -1
  134. data/lib/telnyx/resources/texml/calls.rb +57 -0
  135. data/lib/telnyx/resources/texml.rb +20 -1
  136. data/lib/telnyx/resources/voice_clones.rb +4 -2
  137. data/lib/telnyx/resources/webhooks.rb +2 -2
  138. data/lib/telnyx/resources/whatsapp/phone_numbers.rb +22 -0
  139. data/lib/telnyx/resources/x402/credit_account/payments.rb +71 -0
  140. data/lib/telnyx/resources/x402/credit_account.rb +8 -2
  141. data/lib/telnyx/version.rb +1 -1
  142. data/lib/telnyx.rb +56 -0
  143. data/rbi/telnyx/client.rbi +38 -0
  144. data/rbi/telnyx/models/ai/assistant_a2_a_agent.rbi +345 -0
  145. data/rbi/telnyx/models/ai/assistant_create_params.rbi +45 -12
  146. data/rbi/telnyx/models/ai/assistant_tool.rbi +423 -20
  147. data/rbi/telnyx/models/ai/assistant_update_params.rbi +73 -16
  148. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +73 -16
  149. data/rbi/telnyx/models/ai/audio_transcribe_params.rbi +71 -20
  150. data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +63 -97
  151. data/rbi/telnyx/models/ai/audio_transcription_response_word.rbi +108 -0
  152. data/rbi/telnyx/models/ai/chat_completion_request.rbi +228 -150
  153. data/rbi/telnyx/models/ai/flow_node.rbi +4 -2
  154. data/rbi/telnyx/models/ai/inference_embedding.rbi +53 -16
  155. data/rbi/telnyx/models/ai/inference_embedding_interruption_settings.rbi +10 -0
  156. data/rbi/telnyx/models/ai/inference_embedding_webhook_tool_params.rbi +29 -3
  157. data/rbi/telnyx/models/ai/openai/function_definition.rbi +56 -0
  158. data/rbi/telnyx/models/ai/post_conversation_settings.rbi +4 -4
  159. data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +4 -4
  160. data/rbi/telnyx/models/ai/privacy_settings.rbi +43 -3
  161. data/rbi/telnyx/models/ai/retrieval_tool.rbi +29 -3
  162. data/rbi/telnyx/models/ai/telephony_settings.rbi +197 -20
  163. data/rbi/telnyx/models/ai/tool_node.rbi +4 -2
  164. data/rbi/telnyx/models/ai/transcription_settings.rbi +25 -6
  165. data/rbi/telnyx/models/ai/transcription_settings_config.rbi +18 -16
  166. data/rbi/telnyx/models/ai/typesafe/v1_systemone_params.rbi +504 -0
  167. data/rbi/telnyx/models/ai/typesafe/v1_systemone_response.rbi +348 -0
  168. data/rbi/telnyx/models/bot_challenge_create_params.rbi +68 -0
  169. data/rbi/telnyx/models/bot_challenge_create_response.rbi +169 -0
  170. data/rbi/telnyx/models/bot_session_list_params.rbi +53 -0
  171. data/rbi/telnyx/models/bot_session_list_response.rbi +64 -0
  172. data/rbi/telnyx/models/bot_signup_create_params.rbi +179 -0
  173. data/rbi/telnyx/models/bot_signup_resend_magic_link_params.rbi +43 -0
  174. data/rbi/telnyx/models/call_dial_params.rbi +111 -10
  175. data/rbi/telnyx/models/calls/action_transfer_params.rbi +111 -10
  176. data/rbi/telnyx/models/calls/transcription_config.rbi +29 -5
  177. data/rbi/telnyx/models/calls/transcription_engine_assemblyai_config.rbi +11 -3
  178. data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +5 -0
  179. data/rbi/telnyx/models/compute/func_retrieve_logs_params.rbi +130 -0
  180. data/rbi/telnyx/models/compute/func_retrieve_logs_response.rbi +410 -0
  181. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbi +102 -0
  182. data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbi +231 -0
  183. data/rbi/telnyx/models/compute/func_retrieve_revisions_params.rbi +59 -0
  184. data/rbi/telnyx/models/compute/func_retrieve_revisions_response.rbi +213 -0
  185. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_params.rbi +40 -0
  186. data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_response.rbi +252 -0
  187. data/rbi/telnyx/models/compute/funcs/export_create_params.rbi +84 -0
  188. data/rbi/telnyx/models/compute/funcs/export_delete_all_params.rbi +42 -0
  189. data/rbi/telnyx/models/compute/funcs/export_list_params.rbi +42 -0
  190. data/rbi/telnyx/models/compute/funcs/func_log_export_config_response.rbi +227 -0
  191. data/rbi/telnyx/models/compute/functions_observability_pagination_meta.rbi +70 -0
  192. data/rbi/telnyx/models/compute/logs_meta.rbi +38 -0
  193. data/rbi/telnyx/models/connection_retrieve_count_params.rbi +30 -0
  194. data/rbi/telnyx/models/connection_retrieve_count_response.rbi +353 -0
  195. data/rbi/telnyx/models/credential_connection.rbi +8 -2
  196. data/rbi/telnyx/models/detail_record_list_params.rbi +30 -2
  197. data/rbi/telnyx/models/email_inboxes/email_message.rbi +22 -3
  198. data/rbi/telnyx/models/email_message_batch_params.rbi +6 -0
  199. data/rbi/telnyx/models/email_message_batch_response.rbi +5 -0
  200. data/rbi/telnyx/models/fqdn_connection.rbi +8 -2
  201. data/rbi/telnyx/models/fqdn_connections/fqdn_authentication.rbi +8 -2
  202. data/rbi/telnyx/models/inbound_message_webhook_event.rbi +4 -173
  203. data/rbi/telnyx/models/machine_payment_account_credit_params.rbi +51 -0
  204. data/rbi/telnyx/models/machine_payment_account_credit_response.rbi +446 -0
  205. data/rbi/telnyx/models/message_retrieve_group_messages_response.rbi +6 -12
  206. data/rbi/telnyx/models/message_retrieve_response.rbi +3 -3
  207. data/rbi/telnyx/models/message_schedule_response.rbi +4 -6
  208. data/rbi/telnyx/models/message_send_group_mms_response.rbi +4 -6
  209. data/rbi/telnyx/models/message_send_long_code_response.rbi +4 -6
  210. data/rbi/telnyx/models/message_send_number_pool_response.rbi +4 -6
  211. data/rbi/telnyx/models/message_send_response.rbi +4 -6
  212. data/rbi/telnyx/models/message_send_short_code_response.rbi +4 -6
  213. data/rbi/telnyx/models/messaging_inbound_message.rbi +152 -0
  214. data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +911 -192
  215. data/rbi/telnyx/models/messaging_messaging_profile.rbi +19 -0
  216. data/rbi/telnyx/models/messaging_outbound_message_payload.rbi +90 -16
  217. data/rbi/telnyx/models/messaging_profile_create_params.rbi +19 -0
  218. data/rbi/telnyx/models/messaging_profile_features.rbi +43 -0
  219. data/rbi/telnyx/models/messaging_profile_update_params.rbi +19 -0
  220. data/rbi/telnyx/models/noise_suppression_engine_list_params.rbi +30 -0
  221. data/rbi/telnyx/models/noise_suppression_engine_list_response.rbi +94 -0
  222. data/rbi/telnyx/models/number_order_status_update.rbi +34 -3
  223. data/rbi/telnyx/models/number_order_status_update_webhook_event.rbi +39 -3
  224. data/rbi/telnyx/models/outbound_message.rbi +5 -0
  225. data/rbi/telnyx/models/outbound_message_payload.rbi +74 -4
  226. data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +5 -0
  227. data/rbi/telnyx/models/success_response.rbi +36 -0
  228. data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +339 -0
  229. data/rbi/telnyx/models/texml/accounts/conferences/participant_participants_params.rbi +111 -0
  230. data/rbi/telnyx/models/texml/call_create_params.rbi +124 -0
  231. data/rbi/telnyx/models/texml/call_create_response.rbi +98 -0
  232. data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +103 -0
  233. data/rbi/telnyx/models/uac_connection.rbi +8 -2
  234. data/rbi/telnyx/models/uac_external_settings.rbi +10 -2
  235. data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +3 -1
  236. data/rbi/telnyx/models/unwrap_webhook_event.rbi +3 -1
  237. data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +4 -4
  238. data/rbi/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbi +213 -0
  239. data/rbi/telnyx/models/whatsapp/phone_number_get_response.rbi +213 -0
  240. data/rbi/telnyx/models/whatsapp/phone_number_list_response.rbi +213 -0
  241. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbi +40 -0
  242. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbi +401 -0
  243. data/rbi/telnyx/models/whatsapp_account_update.rbi +236 -0
  244. data/rbi/telnyx/models/whatsapp_message_echo.rbi +611 -0
  245. data/rbi/telnyx/models/x402/credit_account/payment_list_params.rbi +64 -0
  246. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_params.rbi +42 -0
  247. data/rbi/telnyx/models/x402/credit_account/payment_retrieve_response.rbi +53 -0
  248. data/rbi/telnyx/models/x402/credit_account/x402_transaction_record.rbi +219 -0
  249. data/rbi/telnyx/models.rbi +29 -0
  250. data/rbi/telnyx/resources/ai/assistants/versions.rbi +31 -7
  251. data/rbi/telnyx/resources/ai/assistants.rbi +46 -12
  252. data/rbi/telnyx/resources/ai/audio.rbi +20 -9
  253. data/rbi/telnyx/resources/ai/openai/chat.rbi +9 -13
  254. data/rbi/telnyx/resources/ai/typesafe/v1.rbi +61 -0
  255. data/rbi/telnyx/resources/ai/typesafe.rbi +19 -0
  256. data/rbi/telnyx/resources/ai.rbi +3 -0
  257. data/rbi/telnyx/resources/bot_challenge.rbi +45 -0
  258. data/rbi/telnyx/resources/bot_sessions.rbi +45 -0
  259. data/rbi/telnyx/resources/bot_signup.rbi +87 -0
  260. data/rbi/telnyx/resources/calls/actions.rbi +6 -5
  261. data/rbi/telnyx/resources/calls.rbi +6 -5
  262. data/rbi/telnyx/resources/compute/funcs/export.rbi +86 -0
  263. data/rbi/telnyx/resources/compute/funcs.rbi +114 -0
  264. data/rbi/telnyx/resources/compute.rbi +15 -0
  265. data/rbi/telnyx/resources/connections.rbi +11 -0
  266. data/rbi/telnyx/resources/detail_records.rbi +12 -1
  267. data/rbi/telnyx/resources/email_messages.rbi +8 -2
  268. data/rbi/telnyx/resources/machine_payments.rbi +64 -0
  269. data/rbi/telnyx/resources/messaging_profiles.rbi +10 -0
  270. data/rbi/telnyx/resources/noise_suppression_engines.rbi +26 -0
  271. data/rbi/telnyx/resources/texml/accounts/conferences/participants.rbi +32 -0
  272. data/rbi/telnyx/resources/texml/calls.rbi +50 -0
  273. data/rbi/telnyx/resources/texml.rbi +36 -0
  274. data/rbi/telnyx/resources/voice_clones.rbi +4 -2
  275. data/rbi/telnyx/resources/webhooks.rbi +6 -2
  276. data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +18 -0
  277. data/rbi/telnyx/resources/x402/credit_account/payments.rbi +60 -0
  278. data/rbi/telnyx/resources/x402/credit_account.rbi +5 -0
  279. data/sig/telnyx/client.rbs +12 -0
  280. data/sig/telnyx/models/ai/assistant_a2_a_agent.rbs +140 -0
  281. data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
  282. data/sig/telnyx/models/ai/assistant_tool.rbs +162 -23
  283. data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
  284. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
  285. data/sig/telnyx/models/ai/audio_transcribe_params.rbs +10 -0
  286. data/sig/telnyx/models/ai/audio_transcribe_response.rbs +29 -43
  287. data/sig/telnyx/models/ai/audio_transcription_response_word.rbs +60 -0
  288. data/sig/telnyx/models/ai/chat_completion_request.rbs +90 -79
  289. data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
  290. data/sig/telnyx/models/ai/inference_embedding_interruption_settings.rbs +5 -0
  291. data/sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs +10 -3
  292. data/sig/telnyx/models/ai/openai/function_definition.rbs +34 -0
  293. data/sig/telnyx/models/ai/privacy_settings.rbs +11 -3
  294. data/sig/telnyx/models/ai/retrieval_tool.rbs +10 -3
  295. data/sig/telnyx/models/ai/telephony_settings.rbs +59 -4
  296. data/sig/telnyx/models/ai/transcription_settings.rbs +4 -0
  297. data/sig/telnyx/models/ai/typesafe/v1_systemone_params.rbs +195 -0
  298. data/sig/telnyx/models/ai/typesafe/v1_systemone_response.rbs +141 -0
  299. data/sig/telnyx/models/bot_challenge_create_params.rbs +42 -0
  300. data/sig/telnyx/models/bot_challenge_create_response.rbs +72 -0
  301. data/sig/telnyx/models/bot_session_list_params.rbs +28 -0
  302. data/sig/telnyx/models/bot_session_list_response.rbs +26 -0
  303. data/sig/telnyx/models/bot_signup_create_params.rbs +89 -0
  304. data/sig/telnyx/models/bot_signup_resend_magic_link_params.rbs +20 -0
  305. data/sig/telnyx/models/call_dial_params.rbs +49 -0
  306. data/sig/telnyx/models/calls/action_transfer_params.rbs +49 -0
  307. data/sig/telnyx/models/calls/transcription_config.rbs +4 -0
  308. data/sig/telnyx/models/calls/transcription_engine_assemblyai_config.rbs +3 -1
  309. data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +3 -1
  310. data/sig/telnyx/models/compute/func_retrieve_logs_params.rbs +69 -0
  311. data/sig/telnyx/models/compute/func_retrieve_logs_response.rbs +210 -0
  312. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbs +66 -0
  313. data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbs +149 -0
  314. data/sig/telnyx/models/compute/func_retrieve_revisions_params.rbs +38 -0
  315. data/sig/telnyx/models/compute/func_retrieve_revisions_response.rbs +131 -0
  316. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_params.rbs +22 -0
  317. data/sig/telnyx/models/compute/func_retrieve_ship_inspection_response.rbs +117 -0
  318. data/sig/telnyx/models/compute/funcs/export_create_params.rbs +50 -0
  319. data/sig/telnyx/models/compute/funcs/export_delete_all_params.rbs +27 -0
  320. data/sig/telnyx/models/compute/funcs/export_list_params.rbs +27 -0
  321. data/sig/telnyx/models/compute/funcs/func_log_export_config_response.rbs +115 -0
  322. data/sig/telnyx/models/compute/functions_observability_pagination_meta.rbs +45 -0
  323. data/sig/telnyx/models/compute/logs_meta.rbs +21 -0
  324. data/sig/telnyx/models/connection_retrieve_count_params.rbs +15 -0
  325. data/sig/telnyx/models/connection_retrieve_count_response.rbs +169 -0
  326. data/sig/telnyx/models/email_inboxes/email_message.rbs +12 -3
  327. data/sig/telnyx/models/email_message_batch_response.rbs +2 -0
  328. data/sig/telnyx/models/inbound_message_webhook_event.rbs +6 -79
  329. data/sig/telnyx/models/machine_payment_account_credit_params.rbs +23 -0
  330. data/sig/telnyx/models/machine_payment_account_credit_response.rbs +164 -0
  331. data/sig/telnyx/models/message_retrieve_group_messages_response.rbs +6 -8
  332. data/sig/telnyx/models/message_retrieve_response.rbs +1 -2
  333. data/sig/telnyx/models/message_schedule_response.rbs +6 -7
  334. data/sig/telnyx/models/message_send_group_mms_response.rbs +6 -6
  335. data/sig/telnyx/models/message_send_long_code_response.rbs +6 -6
  336. data/sig/telnyx/models/message_send_number_pool_response.rbs +6 -6
  337. data/sig/telnyx/models/message_send_response.rbs +6 -7
  338. data/sig/telnyx/models/message_send_short_code_response.rbs +6 -6
  339. data/sig/telnyx/models/messaging_inbound_message.rbs +76 -0
  340. data/sig/telnyx/models/messaging_inbound_message_payload.rbs +438 -97
  341. data/sig/telnyx/models/messaging_messaging_profile.rbs +5 -0
  342. data/sig/telnyx/models/messaging_outbound_message_payload.rbs +39 -1
  343. data/sig/telnyx/models/messaging_profile_create_params.rbs +5 -0
  344. data/sig/telnyx/models/messaging_profile_features.rbs +15 -0
  345. data/sig/telnyx/models/messaging_profile_update_params.rbs +5 -0
  346. data/sig/telnyx/models/noise_suppression_engine_list_params.rbs +15 -0
  347. data/sig/telnyx/models/noise_suppression_engine_list_response.rbs +43 -0
  348. data/sig/telnyx/models/number_order_status_update.rbs +14 -4
  349. data/sig/telnyx/models/number_order_status_update_webhook_event.rbs +14 -4
  350. data/sig/telnyx/models/outbound_message.rbs +2 -1
  351. data/sig/telnyx/models/outbound_message_payload.rbs +45 -7
  352. data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -0
  353. data/sig/telnyx/models/success_response.rbs +15 -0
  354. data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +159 -0
  355. data/sig/telnyx/models/texml/accounts/conferences/participant_participants_params.rbs +49 -0
  356. data/sig/telnyx/models/texml/call_create_params.rbs +72 -0
  357. data/sig/telnyx/models/texml/call_create_response.rbs +47 -0
  358. data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +49 -0
  359. data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
  360. data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
  361. data/sig/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbs +90 -0
  362. data/sig/telnyx/models/whatsapp/phone_number_get_response.rbs +90 -0
  363. data/sig/telnyx/models/whatsapp/phone_number_list_response.rbs +90 -0
  364. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbs +25 -0
  365. data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbs +201 -0
  366. data/sig/telnyx/models/whatsapp_account_update.rbs +107 -0
  367. data/sig/telnyx/models/whatsapp_message_echo.rbs +291 -0
  368. data/sig/telnyx/models/x402/credit_account/payment_list_params.rbs +36 -0
  369. data/sig/telnyx/models/x402/credit_account/payment_retrieve_params.rbs +27 -0
  370. data/sig/telnyx/models/x402/credit_account/payment_retrieve_response.rbs +26 -0
  371. data/sig/telnyx/models/x402/credit_account/x402_transaction_record.rbs +104 -0
  372. data/sig/telnyx/models.rbs +26 -0
  373. data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
  374. data/sig/telnyx/resources/ai/assistants.rbs +2 -0
  375. data/sig/telnyx/resources/ai/openai/chat.rbs +1 -4
  376. data/sig/telnyx/resources/ai/typesafe/v1.rbs +17 -0
  377. data/sig/telnyx/resources/ai/typesafe.rbs +11 -0
  378. data/sig/telnyx/resources/ai.rbs +2 -0
  379. data/sig/telnyx/resources/bot_challenge.rbs +14 -0
  380. data/sig/telnyx/resources/bot_sessions.rbs +13 -0
  381. data/sig/telnyx/resources/bot_signup.rbs +24 -0
  382. data/sig/telnyx/resources/compute/funcs/export.rbs +30 -0
  383. data/sig/telnyx/resources/compute/funcs.rbs +43 -0
  384. data/sig/telnyx/resources/compute.rbs +9 -0
  385. data/sig/telnyx/resources/connections.rbs +4 -0
  386. data/sig/telnyx/resources/machine_payments.rbs +12 -0
  387. data/sig/telnyx/resources/messaging_profiles.rbs +2 -0
  388. data/sig/telnyx/resources/noise_suppression_engines.rbs +11 -0
  389. data/sig/telnyx/resources/texml/accounts/conferences/participants.rbs +7 -0
  390. data/sig/telnyx/resources/texml/calls.rbs +19 -0
  391. data/sig/telnyx/resources/texml.rbs +9 -0
  392. data/sig/telnyx/resources/webhooks.rbs +6 -2
  393. data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +5 -0
  394. data/sig/telnyx/resources/x402/credit_account/payments.rbs +22 -0
  395. data/sig/telnyx/resources/x402/credit_account.rbs +2 -0
  396. metadata +170 -2
@@ -11,8 +11,12 @@ module Telnyx
11
11
  # @!attribute model
12
12
  # ID of the model to use. `distil-whisper/distil-large-v2` is lower latency but
13
13
  # English-only. `openai/whisper-large-v3-turbo` is multi-lingual but slightly
14
- # higher latency. `deepgram/nova-3` supports English variants (en, en-US, en-GB,
15
- # en-AU, en-NZ, en-IN) and only accepts mp3/wav files.
14
+ # higher latency. The `deepgram/*` models only accept mp3/wav files:
15
+ # `deepgram/nova-3` covers ~49 languages plus `multi` and `deepgram/nova-2` covers
16
+ # ~33, while the `-medical` variants are tuned for clinical vocabulary and accept
17
+ # English only (`en` and its regional variants, e.g. `en-US`, `en-GB`).
18
+ # `nvidia/parakeet-v3` is multilingual with automatic language detection;
19
+ # `omi-health/omi-med-stt-v1` is a medical model, English only.
16
20
  #
17
21
  # @return [Symbol, Telnyx::Models::AI::AudioTranscribeParams::Model]
18
22
  required :model, enum: -> { Telnyx::AI::AudioTranscribeParams::Model }
@@ -20,8 +24,8 @@ module Telnyx
20
24
  # @!attribute file
21
25
  # The audio file object to transcribe, in one of these formats: flac, mp3, mp4,
22
26
  # mpeg, mpga, m4a, ogg, wav, or webm. File uploads are limited to 100 MB. Cannot
23
- # be used together with `file_url`. Note: `deepgram/nova-3` only supports mp3 and
24
- # wav formats.
27
+ # be used together with `file_url`. Note: the `deepgram/*` models only support mp3
28
+ # and wav formats.
25
29
  #
26
30
  # @return [Pathname, StringIO, IO, String, Telnyx::FilePart, nil]
27
31
  optional :file, Telnyx::Internal::Type::FileInput
@@ -29,23 +33,30 @@ module Telnyx
29
33
  # @!attribute file_url
30
34
  # Link to audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a,
31
35
  # ogg, wav, or webm. Support for hosted files is limited to 100MB. Cannot be used
32
- # together with `file`. Note: `deepgram/nova-3` only supports mp3 and wav formats.
36
+ # together with `file`. Note: the `deepgram/*` models only support mp3 and wav
37
+ # formats.
33
38
  #
34
39
  # @return [String, nil]
35
40
  optional :file_url, String
36
41
 
37
42
  # @!attribute language
38
- # The language of the audio to be transcribed. For `deepgram/nova-3`, only English
39
- # variants are supported: `en`, `en-US`, `en-GB`, `en-AU`, `en-NZ`, `en-IN`. For
43
+ # The language of the audio to be transcribed. `deepgram/nova-3` supports ~49
44
+ # languages plus `multi`, and `deepgram/nova-2` supports ~33 plus `multi`; the
45
+ # `-medical` variants are English only (`en` and its regional variants, e.g.
46
+ # `en-US`, `en-GB`). Deepgram models validate on the base language and forward the
47
+ # full tag, so regional variants such as `de-CH` and `pt-BR` are accepted where
48
+ # the base language is supported; an unsupported language returns a 400. For
40
49
  # `openai/whisper-large-v3-turbo`, supports multiple languages.
41
50
  # `distil-whisper/distil-large-v2` does not support language parameter.
51
+ # `nvidia/parakeet-v3` detects the language automatically;
52
+ # `omi-health/omi-med-stt-v1` is English only.
42
53
  #
43
54
  # @return [String, nil]
44
55
  optional :language, String
45
56
 
46
57
  # @!attribute model_config
47
- # Additional model-specific configuration parameters. Only allowed with
48
- # `deepgram/nova-3` model. Can include Deepgram-specific options such as
58
+ # Additional model-specific configuration parameters. Only allowed with the
59
+ # `deepgram/*` models. Can include Deepgram-specific options such as
49
60
  # `smart_format`, `punctuate`, `diarize`, `utterance`, `numerals`, and `language`.
50
61
  # If `language` is provided both as a top-level parameter and in `model_config`,
51
62
  # the top-level parameter takes precedence.
@@ -80,9 +91,9 @@ module Telnyx
80
91
  #
81
92
  # @param file_url [String] Link to audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg
82
93
  #
83
- # @param language [String] The language of the audio to be transcribed. For `deepgram/nova-3`, only English
94
+ # @param language [String] The language of the audio to be transcribed. `deepgram/nova-3` supports ~49 lang
84
95
  #
85
- # @param model_config [Hash{Symbol=>Object}] Additional model-specific configuration parameters. Only allowed with `deepgram/
96
+ # @param model_config [Hash{Symbol=>Object}] Additional model-specific configuration parameters. Only allowed with the `deepg
86
97
  #
87
98
  # @param response_format [Symbol, Telnyx::Models::AI::AudioTranscribeParams::ResponseFormat] The format of the transcript output. Use `verbose_json` to take advantage of tim
88
99
  #
@@ -92,14 +103,23 @@ module Telnyx
92
103
 
93
104
  # ID of the model to use. `distil-whisper/distil-large-v2` is lower latency but
94
105
  # English-only. `openai/whisper-large-v3-turbo` is multi-lingual but slightly
95
- # higher latency. `deepgram/nova-3` supports English variants (en, en-US, en-GB,
96
- # en-AU, en-NZ, en-IN) and only accepts mp3/wav files.
106
+ # higher latency. The `deepgram/*` models only accept mp3/wav files:
107
+ # `deepgram/nova-3` covers ~49 languages plus `multi` and `deepgram/nova-2` covers
108
+ # ~33, while the `-medical` variants are tuned for clinical vocabulary and accept
109
+ # English only (`en` and its regional variants, e.g. `en-US`, `en-GB`).
110
+ # `nvidia/parakeet-v3` is multilingual with automatic language detection;
111
+ # `omi-health/omi-med-stt-v1` is a medical model, English only.
97
112
  module Model
98
113
  extend Telnyx::Internal::Type::Enum
99
114
 
100
115
  DISTIL_WHISPER_DISTIL_LARGE_V2 = :"distil-whisper/distil-large-v2"
101
116
  OPENAI_WHISPER_LARGE_V3_TURBO = :"openai/whisper-large-v3-turbo"
117
+ DEEPGRAM_NOVA_2 = :"deepgram/nova-2"
118
+ DEEPGRAM_NOVA_2_MEDICAL = :"deepgram/nova-2-medical"
102
119
  DEEPGRAM_NOVA_3 = :"deepgram/nova-3"
120
+ DEEPGRAM_NOVA_3_MEDICAL = :"deepgram/nova-3-medical"
121
+ NVIDIA_PARAKEET_V3 = :"nvidia/parakeet-v3"
122
+ OMI_HEALTH_OMI_MED_STT_V1 = :"omi-health/omi-med-stt-v1"
103
123
 
104
124
  # @!method self.values
105
125
  # @return [Array<Symbol>]
@@ -13,27 +13,29 @@ module Telnyx
13
13
 
14
14
  # @!attribute duration
15
15
  # The duration of the audio file in seconds. Returned by
16
- # `distil-whisper/distil-large-v2` and `deepgram/nova-3` when `response_format` is
17
- # `verbose_json`. Not returned by `openai/whisper-large-v3-turbo`.
16
+ # `distil-whisper/distil-large-v2` and the `deepgram/*` models when
17
+ # `response_format` is `verbose_json`. Not returned by
18
+ # `openai/whisper-large-v3-turbo`.
18
19
  #
19
20
  # @return [Float, nil]
20
21
  optional :duration, Float
21
22
 
22
23
  # @!attribute segments
23
24
  # Segments of the transcribed text and their corresponding details. Returned by
24
- # `distil-whisper/distil-large-v2` when `response_format` is `verbose_json`. Not
25
- # returned by `openai/whisper-large-v3-turbo`.
25
+ # `distil-whisper/distil-large-v2` and the `deepgram/*` models when
26
+ # `response_format` is `verbose_json`; Deepgram segments also carry nested `words`
27
+ # and `speakers`. Not returned by `openai/whisper-large-v3-turbo`.
26
28
  #
27
29
  # @return [Array<Telnyx::Models::AI::AudioTranscribeResponse::Segment>, nil]
28
30
  optional :segments,
29
31
  -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::AudioTranscribeResponse::Segment] }
30
32
 
31
33
  # @!attribute words
32
- # Word-level timestamps and optional speaker labels. Only returned by
33
- # `deepgram/nova-3` when word-level output is enabled via `model_config`.
34
+ # Word-level timestamps and optional speaker labels. Only returned by the
35
+ # `deepgram/*` models when word-level output is enabled via `model_config`.
34
36
  #
35
- # @return [Array<Telnyx::Models::AI::AudioTranscribeResponse::Word>, nil]
36
- optional :words, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Models::AI::AudioTranscribeResponse::Word] }
37
+ # @return [Array<Telnyx::Models::AI::AudioTranscriptionResponseWord>, nil]
38
+ optional :words, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AudioTranscriptionResponseWord] }
37
39
 
38
40
  # @!method initialize(text:, duration: nil, segments: nil, words: nil)
39
41
  # Some parameter documentations has been truncated, see
@@ -41,9 +43,10 @@ module Telnyx
41
43
  #
42
44
  # Response fields vary by model. `distil-whisper/distil-large-v2` returns `text`,
43
45
  # `duration`, and `segments` in `verbose_json` mode.
44
- # `openai/whisper-large-v3-turbo` returns `text` only. `deepgram/nova-3` returns
45
- # `text` and, depending on `model_config`, may include `words` with per-word
46
- # timestamps and speaker labels.
46
+ # `openai/whisper-large-v3-turbo` returns `text` only. The `deepgram/*` models
47
+ # return `text` and, depending on `model_config`, may include `words` with
48
+ # per-word timestamps and speaker labels. The Parakeet models
49
+ # (`nvidia/parakeet-v3`, `omi-health/omi-med-stt-v1`) return `text` only.
47
50
  #
48
51
  # @param text [String] The transcribed text for the audio file.
49
52
  #
@@ -51,7 +54,7 @@ module Telnyx
51
54
  #
52
55
  # @param segments [Array<Telnyx::Models::AI::AudioTranscribeResponse::Segment>] Segments of the transcribed text and their corresponding details. Returned by `d
53
56
  #
54
- # @param words [Array<Telnyx::Models::AI::AudioTranscribeResponse::Word>] Word-level timestamps and optional speaker labels. Only returned by `deepgram/no
57
+ # @param words [Array<Telnyx::Models::AI::AudioTranscriptionResponseWord>] Word-level timestamps and optional speaker labels. Only returned by the `deepgra
55
58
 
56
59
  class Segment < Telnyx::Internal::Type::BaseModel
57
60
  # @!attribute id
@@ -78,60 +81,35 @@ module Telnyx
78
81
  # @return [String]
79
82
  required :text, String
80
83
 
81
- # @!method initialize(id:, end_:, start:, text:)
82
- # @param id [Float] Unique identifier of the segment.
83
- #
84
- # @param end_ [Float] End time of the segment in seconds.
84
+ # @!attribute speakers
85
+ # Speaker indices heard in this segment. Returned by the `deepgram/*` models when
86
+ # `diarize` is enabled via `model_config`.
85
87
  #
86
- # @param start [Float] Start time of the segment in seconds.
87
- #
88
- # @param text [String] Text content of the segment.
89
- end
88
+ # @return [Array<Integer>, nil]
89
+ optional :speakers, Telnyx::Internal::Type::ArrayOf[Integer]
90
90
 
91
- class Word < Telnyx::Internal::Type::BaseModel
92
- # @!attribute end_
93
- # End time of the word in seconds.
91
+ # @!attribute words
92
+ # Word-level timing detail for this segment. Returned by the `deepgram/*` models
93
+ # when word-level output is enabled via `model_config`.
94
94
  #
95
- # @return [Float]
96
- required :end_, Float, api_name: :end
95
+ # @return [Array<Telnyx::Models::AI::AudioTranscriptionResponseWord>, nil]
96
+ optional :words, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AudioTranscriptionResponseWord] }
97
97
 
98
- # @!attribute start
99
- # Start time of the word in seconds.
98
+ # @!method initialize(id:, end_:, start:, text:, speakers: nil, words: nil)
99
+ # Some parameter documentations has been truncated, see
100
+ # {Telnyx::Models::AI::AudioTranscribeResponse::Segment} for more details.
100
101
  #
101
- # @return [Float]
102
- required :start, Float
103
-
104
- # @!attribute word
105
- # The transcribed word.
106
- #
107
- # @return [String]
108
- required :word, String
109
-
110
- # @!attribute confidence
111
- # Confidence score for the word (0.0 to 1.0).
112
- #
113
- # @return [Float, nil]
114
- optional :confidence, Float
115
-
116
- # @!attribute speaker
117
- # Speaker index. Only present when diarization is enabled via `model_config`.
118
- #
119
- # @return [Integer, nil]
120
- optional :speaker, Integer
121
-
122
- # @!method initialize(end_:, start:, word:, confidence: nil, speaker: nil)
123
- # Word-level timing detail. Only present when using `deepgram/nova-3` with
124
- # `model_config` options that enable word timestamps.
102
+ # @param id [Float] Unique identifier of the segment.
125
103
  #
126
- # @param end_ [Float] End time of the word in seconds.
104
+ # @param end_ [Float] End time of the segment in seconds.
127
105
  #
128
- # @param start [Float] Start time of the word in seconds.
106
+ # @param start [Float] Start time of the segment in seconds.
129
107
  #
130
- # @param word [String] The transcribed word.
108
+ # @param text [String] Text content of the segment.
131
109
  #
132
- # @param confidence [Float] Confidence score for the word (0.0 to 1.0).
110
+ # @param speakers [Array<Integer>] Speaker indices heard in this segment. Returned by the `deepgram/*` models when
133
111
  #
134
- # @param speaker [Integer] Speaker index. Only present when diarization is enabled via `model_config`.
112
+ # @param words [Array<Telnyx::Models::AI::AudioTranscriptionResponseWord>] Word-level timing detail for this segment. Returned by the `deepgram/*` models w
135
113
  end
136
114
  end
137
115
  end
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class AudioTranscriptionResponseWord < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute end_
8
+ # End time of the word in seconds.
9
+ #
10
+ # @return [Float]
11
+ required :end_, Float, api_name: :end
12
+
13
+ # @!attribute start
14
+ # Start time of the word in seconds.
15
+ #
16
+ # @return [Float]
17
+ required :start, Float
18
+
19
+ # @!attribute word
20
+ # The transcribed word.
21
+ #
22
+ # @return [String]
23
+ required :word, String
24
+
25
+ # @!attribute confidence
26
+ # Confidence score for the word (0.0 to 1.0).
27
+ #
28
+ # @return [Float, nil]
29
+ optional :confidence, Float
30
+
31
+ # @!attribute punctuated_word
32
+ # The transcribed word with punctuation and capitalisation applied. Only present
33
+ # when `punctuate` or `smart_format` is enabled via `model_config`.
34
+ #
35
+ # @return [String, nil]
36
+ optional :punctuated_word, String
37
+
38
+ # @!attribute speaker
39
+ # Speaker index. Only present when diarization is enabled via `model_config`.
40
+ #
41
+ # @return [Integer, nil]
42
+ optional :speaker, Integer
43
+
44
+ # @!attribute speaker_confidence
45
+ # Confidence score for the speaker assignment (0.0 to 1.0). Only present when
46
+ # diarization is enabled via `model_config`.
47
+ #
48
+ # @return [Float, nil]
49
+ optional :speaker_confidence, Float
50
+
51
+ # @!method initialize(end_:, start:, word:, confidence: nil, punctuated_word: nil, speaker: nil, speaker_confidence: nil)
52
+ # Some parameter documentations has been truncated, see
53
+ # {Telnyx::Models::AI::AudioTranscriptionResponseWord} for more details.
54
+ #
55
+ # Word-level timing detail. Only present when using a `deepgram/*` model with
56
+ # `model_config` options that enable word timestamps.
57
+ #
58
+ # @param end_ [Float] End time of the word in seconds.
59
+ #
60
+ # @param start [Float] Start time of the word in seconds.
61
+ #
62
+ # @param word [String] The transcribed word.
63
+ #
64
+ # @param confidence [Float] Confidence score for the word (0.0 to 1.0).
65
+ #
66
+ # @param punctuated_word [String] The transcribed word with punctuation and capitalisation applied. Only present w
67
+ #
68
+ # @param speaker [Integer] Speaker index. Only present when diarization is enabled via `model_config`.
69
+ #
70
+ # @param speaker_confidence [Float] Confidence score for the speaker assignment (0.0 to 1.0). Only present when diar
71
+ end
72
+ end
73
+ end
74
+ end
@@ -48,25 +48,6 @@ module Telnyx
48
48
  # @return [Float, nil]
49
49
  optional :frequency_penalty, Float
50
50
 
51
- # @!attribute guided_choice
52
- # If specified, the output will be exactly one of the choices.
53
- #
54
- # @return [Array<String>, nil]
55
- optional :guided_choice, Telnyx::Internal::Type::ArrayOf[String]
56
-
57
- # @!attribute guided_json
58
- # Must be a valid JSON schema. If specified, the output will follow the JSON
59
- # schema.
60
- #
61
- # @return [Hash{Symbol=>Object}, nil]
62
- optional :guided_json, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
63
-
64
- # @!attribute guided_regex
65
- # If specified, the output will follow the regex pattern.
66
- #
67
- # @return [String, nil]
68
- optional :guided_regex, String
69
-
70
51
  # @!attribute length_penalty
71
52
  # This is used with `use_beam_search` to prefer shorter or longer completions.
72
53
  #
@@ -144,11 +125,13 @@ module Telnyx
144
125
  optional :region, enum: -> { Telnyx::AI::ChatCompletionRequest::Region }
145
126
 
146
127
  # @!attribute response_format
147
- # Use this is you want to guarantee a JSON output without defining a schema. For
148
- # control over the schema, use `guided_json`.
128
+ # Controls the format of the model output. `json_object` guarantees valid JSON
129
+ # output without defining a schema; `json_schema` constrains the output to the
130
+ # JSON schema you supply via the `json_schema` property and is the supported way
131
+ # to get guaranteed structured output on Telnyx-hosted models.
149
132
  #
150
- # @return [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat, nil]
151
- optional :response_format, -> { Telnyx::AI::ChatCompletionRequest::ResponseFormat }
133
+ # @return [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam, nil]
134
+ optional :response_format, union: -> { Telnyx::AI::ChatCompletionRequest::ResponseFormat }
152
135
 
153
136
  # @!attribute seed
154
137
  # If specified, the system will make a best effort to sample deterministically,
@@ -225,7 +208,7 @@ module Telnyx
225
208
  # @return [Boolean, nil]
226
209
  optional :use_beam_search, Telnyx::Internal::Type::Boolean
227
210
 
228
- # @!method initialize(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, mode: nil, model: nil, n: nil, presence_penalty: nil, reasoning_effort: nil, region: nil, response_format: nil, seed: nil, service_tier: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil)
211
+ # @!method initialize(messages:, api_key_ref: nil, best_of: nil, early_stopping: nil, enable_thinking: nil, frequency_penalty: nil, length_penalty: nil, logprobs: nil, max_tokens: nil, min_p: nil, mode: nil, model: nil, n: nil, presence_penalty: nil, reasoning_effort: nil, region: nil, response_format: nil, seed: nil, service_tier: nil, stop: nil, stream: nil, temperature: nil, tool_choice: nil, tools: nil, top_logprobs: nil, top_p: nil, use_beam_search: nil)
229
212
  # Some parameter documentations has been truncated, see
230
213
  # {Telnyx::Models::AI::ChatCompletionRequest} for more details.
231
214
  #
@@ -241,12 +224,6 @@ module Telnyx
241
224
  #
242
225
  # @param frequency_penalty [Float] Higher values will penalize the model from repeating the same output tokens.
243
226
  #
244
- # @param guided_choice [Array<String>] If specified, the output will be exactly one of the choices.
245
- #
246
- # @param guided_json [Hash{Symbol=>Object}] Must be a valid JSON schema. If specified, the output will follow the JSON schem
247
- #
248
- # @param guided_regex [String] If specified, the output will follow the regex pattern.
249
- #
250
227
  # @param length_penalty [Float] This is used with `use_beam_search` to prefer shorter or longer completions.
251
228
  #
252
229
  # @param logprobs [Boolean] Whether to return log probabilities of the output tokens or not. If true, return
@@ -267,7 +244,7 @@ module Telnyx
267
244
  #
268
245
  # @param region [Symbol, Telnyx::Models::AI::ChatCompletionRequest::Region] Optional data-residency region the request should be served from, using the same
269
246
  #
270
- # @param response_format [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat] Use this is you want to guarantee a JSON output without defining a schema. For c
247
+ # @param response_format [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam] Controls the format of the model output. `json_object` guarantees valid JSON out
271
248
  #
272
249
  # @param seed [Integer] If specified, the system will make a best effort to sample deterministically, su
273
250
  #
@@ -427,29 +404,129 @@ module Telnyx
427
404
  # @return [Array<Symbol>]
428
405
  end
429
406
 
407
+ # Controls the format of the model output. `json_object` guarantees valid JSON
408
+ # output without defining a schema; `json_schema` constrains the output to the
409
+ # JSON schema you supply via the `json_schema` property and is the supported way
410
+ # to get guaranteed structured output on Telnyx-hosted models.
411
+ #
430
412
  # @see Telnyx::Models::AI::ChatCompletionRequest#response_format
431
- class ResponseFormat < Telnyx::Internal::Type::BaseModel
432
- # @!attribute type
433
- #
434
- # @return [Symbol, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::Type]
435
- required :type, enum: -> { Telnyx::AI::ChatCompletionRequest::ResponseFormat::Type }
413
+ module ResponseFormat
414
+ extend Telnyx::Internal::Type::Union
436
415
 
437
- # @!method initialize(type:)
438
- # Use this is you want to guarantee a JSON output without defining a schema. For
439
- # control over the schema, use `guided_json`.
440
- #
441
- # @param type [Symbol, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::Type]
416
+ # Plain text output.
417
+ variant -> { Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText }
442
418
 
443
- # @see Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat#type
444
- module Type
445
- extend Telnyx::Internal::Type::Enum
419
+ # JSON mode: the model output is valid JSON, without a schema.
420
+ variant -> { Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject }
446
421
 
447
- TEXT = :text
448
- JSON_OBJECT = :json_object
422
+ # Structured output: the model output is constrained to the JSON schema supplied in `json_schema`.
423
+ variant -> { Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam }
449
424
 
450
- # @!method self.values
451
- # @return [Array<Symbol>]
425
+ class ResponseFormatText < Telnyx::Internal::Type::BaseModel
426
+ # @!attribute type
427
+ #
428
+ # @return [Symbol, :text]
429
+ required :type, const: :text
430
+
431
+ # @!method initialize(type: :text)
432
+ # Plain text output.
433
+ #
434
+ # @param type [Symbol, :text]
435
+ end
436
+
437
+ class ResponseFormatJsonObject < Telnyx::Internal::Type::BaseModel
438
+ # @!attribute type
439
+ #
440
+ # @return [Symbol, :json_object]
441
+ required :type, const: :json_object
442
+
443
+ # @!method initialize(type: :json_object)
444
+ # JSON mode: the model output is valid JSON, without a schema.
445
+ #
446
+ # @param type [Symbol, :json_object]
447
+ end
448
+
449
+ class ResponseFormatJsonSchemaParam < Telnyx::Internal::Type::BaseModel
450
+ # @!attribute json_schema
451
+ # The JSON schema configuration, required when `type` is `json_schema`. Matches
452
+ # the
453
+ # [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
454
+ # `json_schema` response format.
455
+ #
456
+ # @return [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema]
457
+ required :json_schema,
458
+ -> { Telnyx::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema }
459
+
460
+ # @!attribute type
461
+ #
462
+ # @return [Symbol, :json_schema]
463
+ required :type, const: :json_schema
464
+
465
+ # @!method initialize(json_schema:, type: :json_schema)
466
+ # Some parameter documentations has been truncated, see
467
+ # {Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam}
468
+ # for more details.
469
+ #
470
+ # Structured output: the model output is constrained to the JSON schema supplied
471
+ # in `json_schema`.
472
+ #
473
+ # @param json_schema [Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema] The JSON schema configuration, required when `type` is `json_schema`. Matches th
474
+ #
475
+ # @param type [Symbol, :json_schema]
476
+
477
+ # @see Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam#json_schema
478
+ class JsonSchema < Telnyx::Internal::Type::BaseModel
479
+ # @!attribute name
480
+ # The name of the response format. Used for clarity only.
481
+ #
482
+ # @return [String]
483
+ required :name, String
484
+
485
+ # @!attribute description
486
+ # A description of what the response format is for, typically used to guide the
487
+ # model.
488
+ #
489
+ # @return [String, nil]
490
+ optional :description, String
491
+
492
+ # @!attribute schema
493
+ # The JSON schema the model output must conform to. A valid
494
+ # [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
495
+ # `model_json_schema()` export.
496
+ #
497
+ # @return [Hash{Symbol=>Object}, nil]
498
+ optional :schema, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
499
+
500
+ # @!attribute strict
501
+ # Enables strict schema adherence when supported by the model. If the generated
502
+ # output does not match the provided schema, the request fails instead of
503
+ # returning non-conformant output.
504
+ #
505
+ # @return [Boolean, nil]
506
+ optional :strict, Telnyx::Internal::Type::Boolean
507
+
508
+ # @!method initialize(name:, description: nil, schema: nil, strict: nil)
509
+ # Some parameter documentations has been truncated, see
510
+ # {Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam::JsonSchema}
511
+ # for more details.
512
+ #
513
+ # The JSON schema configuration, required when `type` is `json_schema`. Matches
514
+ # the
515
+ # [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
516
+ # `json_schema` response format.
517
+ #
518
+ # @param name [String] The name of the response format. Used for clarity only.
519
+ #
520
+ # @param description [String] A description of what the response format is for, typically used to guide the mo
521
+ #
522
+ # @param schema [Hash{Symbol=>Object}] The JSON schema the model output must conform to. A valid [JSON Schema](https://
523
+ #
524
+ # @param strict [Boolean] Enables strict schema adherence when supported by the model. If the generated ou
525
+ end
452
526
  end
527
+
528
+ # @!method self.variants
529
+ # @return [Array(Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatText, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonObject, Telnyx::Models::AI::ChatCompletionRequest::ResponseFormat::ResponseFormatJsonSchemaParam)]
453
530
  end
454
531
 
455
532
  # Up to 4 sequences where the API will stop generating further tokens. The
@@ -494,8 +571,8 @@ module Telnyx
494
571
  class Function < Telnyx::Internal::Type::BaseModel
495
572
  # @!attribute function
496
573
  #
497
- # @return [Telnyx::Models::AI::ChatCompletionRequest::Tool::Function::Function]
498
- required :function, -> { Telnyx::AI::ChatCompletionRequest::Tool::Function::Function }
574
+ # @return [Telnyx::Models::AI::OpenAI::FunctionDefinition]
575
+ required :function, -> { Telnyx::AI::OpenAI::FunctionDefinition }
499
576
 
500
577
  # @!attribute type
501
578
  #
@@ -503,31 +580,8 @@ module Telnyx
503
580
  required :type, const: :function
504
581
 
505
582
  # @!method initialize(function:, type: :function)
506
- # @param function [Telnyx::Models::AI::ChatCompletionRequest::Tool::Function::Function]
583
+ # @param function [Telnyx::Models::AI::OpenAI::FunctionDefinition]
507
584
  # @param type [Symbol, :function]
508
-
509
- # @see Telnyx::Models::AI::ChatCompletionRequest::Tool::Function#function
510
- class Function < Telnyx::Internal::Type::BaseModel
511
- # @!attribute name
512
- #
513
- # @return [String]
514
- required :name, String
515
-
516
- # @!attribute description
517
- #
518
- # @return [String, nil]
519
- optional :description, String
520
-
521
- # @!attribute parameters
522
- #
523
- # @return [Hash{Symbol=>Object}, nil]
524
- optional :parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
525
-
526
- # @!method initialize(name:, description: nil, parameters: nil)
527
- # @param name [String]
528
- # @param description [String]
529
- # @param parameters [Hash{Symbol=>Object}]
530
- end
531
585
  end
532
586
 
533
587
  class Retrieval < Telnyx::Internal::Type::BaseModel
@@ -78,7 +78,7 @@ module Telnyx
78
78
  # follow-up fetch per shared tool. Ignored on input — set `shared_tool_ids` to
79
79
  # configure a node's tools.
80
80
  #
81
- # @return [Array<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, Telnyx::Models::AI::AssistantTool::Pay, Telnyx::Models::AI::AssistantTool::UpdateDynamicVariables>>, nil]
81
+ # @return [Array<Array<Telnyx::Models::AI::AssistantTool::Function, Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::AssistantTool::Hangup, 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, Telnyx::Models::AI::AssistantTool::Pay, Telnyx::Models::AI::AssistantTool::UpdateDynamicVariables>>, nil]
82
82
  optional :tools,
83
83
  -> { Telnyx::Internal::Type::ArrayOf[Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantTool]] }
84
84
 
@@ -132,7 +132,7 @@ module Telnyx
132
132
  #
133
133
  # @param shared_tool_ids [Array<String>] IDs of shared (org-level) tools available at this node. Knowledge bases are atta
134
134
  #
135
- # @param tools [Array<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, Telnyx::Models::AI::AssistantTool::Pay, Telnyx::Models::AI::AssistantTool::UpdateDynamicVariables>>] Full tool definitions for this node, resolved from `shared_tool_ids` server-side
135
+ # @param tools [Array<Array<Telnyx::Models::AI::AssistantTool::Function, Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::AssistantTool::Hangup, 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, Telnyx::Models::AI::AssistantTool::Pay, Telnyx::Models::AI::AssistantTool::UpdateDynamicVariables>>] Full tool definitions for this node, resolved from `shared_tool_ids` server-side
136
136
  #
137
137
  # @param tools_mode [Symbol, Telnyx::Models::AI::FlowNode::ToolsMode] How `shared_tool_ids` combine with the assistant-level tool set. `replace` (defa
138
138
  #