telnyx 5.168.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +40 -0
- data/lib/telnyx/internal/type/union.rb +6 -6
- data/lib/telnyx/models/ai/assistant_create_params.rb +6 -6
- data/lib/telnyx/models/ai/assistant_tool.rb +285 -12
- data/lib/telnyx/models/ai/assistant_update_params.rb +20 -9
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +20 -9
- data/lib/telnyx/models/ai/audio_transcribe_params.rb +33 -13
- data/lib/telnyx/models/ai/audio_transcribe_response.rb +34 -56
- data/lib/telnyx/models/ai/audio_transcription_response_word.rb +74 -0
- data/lib/telnyx/models/ai/chat_completion_request.rb +3 -26
- data/lib/telnyx/models/ai/flow_node.rb +2 -2
- data/lib/telnyx/models/ai/inference_embedding.rb +13 -10
- data/lib/telnyx/models/ai/inference_embedding_interruption_settings.rb +10 -1
- data/lib/telnyx/models/ai/inference_embedding_webhook_tool_params.rb +21 -1
- data/lib/telnyx/models/ai/openai/function_definition.rb +31 -0
- data/lib/telnyx/models/ai/post_conversation_settings.rb +4 -4
- data/lib/telnyx/models/ai/post_conversation_settings_req.rb +4 -4
- data/lib/telnyx/models/ai/privacy_settings.rb +20 -1
- data/lib/telnyx/models/ai/retrieval_tool.rb +21 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +86 -16
- data/lib/telnyx/models/ai/tool_node.rb +2 -2
- data/lib/telnyx/models/ai/transcription_settings.rb +12 -4
- data/lib/telnyx/models/ai/transcription_settings_config.rb +12 -11
- data/lib/telnyx/models/ai/typesafe/v1_systemone_params.rb +268 -0
- data/lib/telnyx/models/ai/typesafe/v1_systemone_response.rb +222 -0
- data/lib/telnyx/models/bot_challenge_create_params.rb +38 -0
- data/lib/telnyx/models/bot_challenge_create_response.rb +87 -0
- data/lib/telnyx/models/bot_session_list_params.rb +34 -0
- data/lib/telnyx/models/bot_session_list_response.rb +32 -0
- data/lib/telnyx/models/bot_signup_create_params.rb +103 -0
- data/lib/telnyx/models/bot_signup_resend_magic_link_params.rb +22 -0
- data/lib/telnyx/models/call_dial_params.rb +75 -7
- data/lib/telnyx/models/calls/action_transfer_params.rb +75 -7
- data/lib/telnyx/models/calls/transcription_config.rb +14 -3
- data/lib/telnyx/models/calls/transcription_engine_assemblyai_config.rb +6 -3
- data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -0
- data/lib/telnyx/models/compute/funcs/export_create_params.rb +62 -0
- data/lib/telnyx/models/compute/funcs/export_delete_all_params.rb +24 -0
- data/lib/telnyx/models/compute/funcs/export_list_params.rb +24 -0
- data/lib/telnyx/models/compute/funcs/func_log_export_config_response.rb +113 -0
- data/lib/telnyx/models/connection_retrieve_count_params.rb +14 -0
- data/lib/telnyx/models/connection_retrieve_count_response.rb +215 -0
- data/lib/telnyx/models/detail_record_list_params.rb +19 -2
- data/lib/telnyx/models/inbound_message_webhook_event.rb +3 -70
- data/lib/telnyx/models/machine_payment_account_credit_params.rb +29 -0
- data/lib/telnyx/models/machine_payment_account_credit_response.rb +223 -0
- data/lib/telnyx/models/message_retrieve_group_messages_response.rb +3 -3
- data/lib/telnyx/models/message_retrieve_response.rb +4 -4
- data/lib/telnyx/models/message_schedule_response.rb +3 -3
- data/lib/telnyx/models/message_send_group_mms_response.rb +3 -3
- data/lib/telnyx/models/message_send_long_code_response.rb +3 -3
- data/lib/telnyx/models/message_send_number_pool_response.rb +3 -3
- data/lib/telnyx/models/message_send_response.rb +3 -3
- data/lib/telnyx/models/message_send_short_code_response.rb +3 -3
- data/lib/telnyx/models/messaging_inbound_message.rb +71 -0
- data/lib/telnyx/models/messaging_inbound_message_payload.rb +216 -13
- data/lib/telnyx/models/messaging_outbound_message_payload.rb +42 -2
- data/lib/telnyx/models/noise_suppression_engine_list_params.rb +14 -0
- data/lib/telnyx/models/noise_suppression_engine_list_response.rb +50 -0
- data/lib/telnyx/models/number_order_status_update.rb +15 -3
- data/lib/telnyx/models/number_order_status_update_webhook_event.rb +15 -3
- data/lib/telnyx/models/outbound_message.rb +1 -0
- data/lib/telnyx/models/outbound_message_payload.rb +45 -5
- data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -0
- data/lib/telnyx/models/success_response.rb +27 -0
- data/lib/telnyx/models/texml/accounts/call_calls_params.rb +246 -3
- data/lib/telnyx/models/texml/accounts/conferences/participant_participants_params.rb +82 -1
- data/lib/telnyx/models/texml/call_create_params.rb +78 -0
- data/lib/telnyx/models/texml/call_create_response.rb +55 -0
- data/lib/telnyx/models/texml_initiate_ai_call_params.rb +76 -1
- data/lib/telnyx/models/voice_clone_create_from_upload_params.rb +2 -2
- data/lib/telnyx/models.rb +18 -0
- data/lib/telnyx/resources/ai/assistants/versions.rb +1 -1
- data/lib/telnyx/resources/ai/assistants.rb +2 -2
- data/lib/telnyx/resources/ai/audio.rb +2 -2
- data/lib/telnyx/resources/ai/typesafe/v1.rb +62 -0
- data/lib/telnyx/resources/ai/typesafe.rb +22 -0
- data/lib/telnyx/resources/ai.rb +4 -0
- data/lib/telnyx/resources/bot_challenge.rb +53 -0
- data/lib/telnyx/resources/bot_sessions.rb +57 -0
- data/lib/telnyx/resources/bot_signup.rb +97 -0
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- data/lib/telnyx/resources/calls.rb +1 -1
- data/lib/telnyx/resources/compute/funcs/export.rb +105 -0
- data/lib/telnyx/resources/compute/funcs.rb +4 -0
- data/lib/telnyx/resources/connections.rb +20 -0
- data/lib/telnyx/resources/detail_records.rb +1 -1
- data/lib/telnyx/resources/email_messages.rb +5 -3
- data/lib/telnyx/resources/machine_payments.rb +73 -0
- data/lib/telnyx/resources/noise_suppression_engines.rb +37 -0
- data/lib/telnyx/resources/texml/accounts/conferences/participants.rb +15 -1
- data/lib/telnyx/resources/texml/calls.rb +57 -0
- data/lib/telnyx/resources/texml.rb +20 -1
- data/lib/telnyx/resources/voice_clones.rb +4 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +33 -0
- data/rbi/telnyx/client.rbi +35 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +16 -12
- data/rbi/telnyx/models/ai/assistant_tool.rbi +423 -20
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +42 -16
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +42 -16
- data/rbi/telnyx/models/ai/audio_transcribe_params.rbi +71 -20
- data/rbi/telnyx/models/ai/audio_transcribe_response.rbi +63 -97
- data/rbi/telnyx/models/ai/audio_transcription_response_word.rbi +108 -0
- data/rbi/telnyx/models/ai/chat_completion_request.rbi +4 -58
- data/rbi/telnyx/models/ai/flow_node.rbi +4 -2
- data/rbi/telnyx/models/ai/inference_embedding.rbi +24 -16
- data/rbi/telnyx/models/ai/inference_embedding_interruption_settings.rbi +10 -0
- data/rbi/telnyx/models/ai/inference_embedding_webhook_tool_params.rbi +29 -3
- data/rbi/telnyx/models/ai/openai/function_definition.rbi +56 -0
- data/rbi/telnyx/models/ai/post_conversation_settings.rbi +4 -4
- data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +4 -4
- data/rbi/telnyx/models/ai/privacy_settings.rbi +43 -3
- data/rbi/telnyx/models/ai/retrieval_tool.rbi +29 -3
- data/rbi/telnyx/models/ai/telephony_settings.rbi +174 -20
- data/rbi/telnyx/models/ai/tool_node.rbi +4 -2
- data/rbi/telnyx/models/ai/transcription_settings.rbi +25 -6
- data/rbi/telnyx/models/ai/transcription_settings_config.rbi +18 -16
- data/rbi/telnyx/models/ai/typesafe/v1_systemone_params.rbi +504 -0
- data/rbi/telnyx/models/ai/typesafe/v1_systemone_response.rbi +348 -0
- data/rbi/telnyx/models/bot_challenge_create_params.rbi +68 -0
- data/rbi/telnyx/models/bot_challenge_create_response.rbi +169 -0
- data/rbi/telnyx/models/bot_session_list_params.rbi +53 -0
- data/rbi/telnyx/models/bot_session_list_response.rbi +64 -0
- data/rbi/telnyx/models/bot_signup_create_params.rbi +179 -0
- data/rbi/telnyx/models/bot_signup_resend_magic_link_params.rbi +43 -0
- data/rbi/telnyx/models/call_dial_params.rbi +111 -10
- data/rbi/telnyx/models/calls/action_transfer_params.rbi +111 -10
- data/rbi/telnyx/models/calls/transcription_config.rbi +29 -5
- data/rbi/telnyx/models/calls/transcription_engine_assemblyai_config.rbi +11 -3
- data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +5 -0
- data/rbi/telnyx/models/compute/funcs/export_create_params.rbi +84 -0
- data/rbi/telnyx/models/compute/funcs/export_delete_all_params.rbi +42 -0
- data/rbi/telnyx/models/compute/funcs/export_list_params.rbi +42 -0
- data/rbi/telnyx/models/compute/funcs/func_log_export_config_response.rbi +227 -0
- data/rbi/telnyx/models/connection_retrieve_count_params.rbi +30 -0
- data/rbi/telnyx/models/connection_retrieve_count_response.rbi +353 -0
- data/rbi/telnyx/models/detail_record_list_params.rbi +30 -2
- data/rbi/telnyx/models/inbound_message_webhook_event.rbi +4 -173
- data/rbi/telnyx/models/machine_payment_account_credit_params.rbi +51 -0
- data/rbi/telnyx/models/machine_payment_account_credit_response.rbi +446 -0
- data/rbi/telnyx/models/message_retrieve_group_messages_response.rbi +6 -12
- data/rbi/telnyx/models/message_retrieve_response.rbi +3 -3
- data/rbi/telnyx/models/message_schedule_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_group_mms_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_long_code_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_number_pool_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_response.rbi +4 -6
- data/rbi/telnyx/models/message_send_short_code_response.rbi +4 -6
- data/rbi/telnyx/models/messaging_inbound_message.rbi +152 -0
- data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +477 -15
- data/rbi/telnyx/models/messaging_outbound_message_payload.rbi +90 -16
- data/rbi/telnyx/models/noise_suppression_engine_list_params.rbi +30 -0
- data/rbi/telnyx/models/noise_suppression_engine_list_response.rbi +94 -0
- data/rbi/telnyx/models/number_order_status_update.rbi +34 -3
- data/rbi/telnyx/models/number_order_status_update_webhook_event.rbi +39 -3
- data/rbi/telnyx/models/outbound_message.rbi +5 -0
- data/rbi/telnyx/models/outbound_message_payload.rbi +74 -4
- data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +5 -0
- data/rbi/telnyx/models/success_response.rbi +36 -0
- data/rbi/telnyx/models/texml/accounts/call_calls_params.rbi +339 -0
- data/rbi/telnyx/models/texml/accounts/conferences/participant_participants_params.rbi +111 -0
- data/rbi/telnyx/models/texml/call_create_params.rbi +124 -0
- data/rbi/telnyx/models/texml/call_create_response.rbi +98 -0
- data/rbi/telnyx/models/texml_initiate_ai_call_params.rbi +103 -0
- data/rbi/telnyx/models/voice_clone_create_from_upload_params.rbi +4 -4
- data/rbi/telnyx/models.rbi +21 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +19 -7
- data/rbi/telnyx/resources/ai/assistants.rbi +25 -12
- data/rbi/telnyx/resources/ai/audio.rbi +20 -9
- data/rbi/telnyx/resources/ai/typesafe/v1.rbi +61 -0
- data/rbi/telnyx/resources/ai/typesafe.rbi +19 -0
- data/rbi/telnyx/resources/ai.rbi +3 -0
- data/rbi/telnyx/resources/bot_challenge.rbi +45 -0
- data/rbi/telnyx/resources/bot_sessions.rbi +45 -0
- data/rbi/telnyx/resources/bot_signup.rbi +87 -0
- data/rbi/telnyx/resources/calls/actions.rbi +6 -5
- data/rbi/telnyx/resources/calls.rbi +6 -5
- data/rbi/telnyx/resources/compute/funcs/export.rbi +86 -0
- data/rbi/telnyx/resources/compute/funcs.rbi +3 -0
- data/rbi/telnyx/resources/connections.rbi +11 -0
- data/rbi/telnyx/resources/detail_records.rbi +12 -1
- data/rbi/telnyx/resources/email_messages.rbi +5 -3
- data/rbi/telnyx/resources/machine_payments.rbi +64 -0
- data/rbi/telnyx/resources/noise_suppression_engines.rbi +26 -0
- data/rbi/telnyx/resources/texml/accounts/conferences/participants.rbi +32 -0
- data/rbi/telnyx/resources/texml/calls.rbi +50 -0
- data/rbi/telnyx/resources/texml.rbi +36 -0
- data/rbi/telnyx/resources/voice_clones.rbi +4 -2
- data/sig/telnyx/client.rbs +10 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +162 -23
- data/sig/telnyx/models/ai/audio_transcribe_params.rbs +10 -0
- data/sig/telnyx/models/ai/audio_transcribe_response.rbs +29 -43
- data/sig/telnyx/models/ai/audio_transcription_response_word.rbs +60 -0
- data/sig/telnyx/models/ai/chat_completion_request.rbs +4 -35
- data/sig/telnyx/models/ai/inference_embedding_interruption_settings.rbs +5 -0
- data/sig/telnyx/models/ai/inference_embedding_webhook_tool_params.rbs +10 -3
- data/sig/telnyx/models/ai/openai/function_definition.rbs +34 -0
- data/sig/telnyx/models/ai/privacy_settings.rbs +11 -3
- data/sig/telnyx/models/ai/retrieval_tool.rbs +10 -3
- data/sig/telnyx/models/ai/telephony_settings.rbs +52 -4
- data/sig/telnyx/models/ai/transcription_settings.rbs +4 -0
- data/sig/telnyx/models/ai/typesafe/v1_systemone_params.rbs +195 -0
- data/sig/telnyx/models/ai/typesafe/v1_systemone_response.rbs +141 -0
- data/sig/telnyx/models/bot_challenge_create_params.rbs +42 -0
- data/sig/telnyx/models/bot_challenge_create_response.rbs +72 -0
- data/sig/telnyx/models/bot_session_list_params.rbs +28 -0
- data/sig/telnyx/models/bot_session_list_response.rbs +26 -0
- data/sig/telnyx/models/bot_signup_create_params.rbs +89 -0
- data/sig/telnyx/models/bot_signup_resend_magic_link_params.rbs +20 -0
- data/sig/telnyx/models/call_dial_params.rbs +49 -0
- data/sig/telnyx/models/calls/action_transfer_params.rbs +49 -0
- data/sig/telnyx/models/calls/transcription_config.rbs +4 -0
- data/sig/telnyx/models/calls/transcription_engine_assemblyai_config.rbs +3 -1
- data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +3 -1
- data/sig/telnyx/models/compute/funcs/export_create_params.rbs +50 -0
- data/sig/telnyx/models/compute/funcs/export_delete_all_params.rbs +27 -0
- data/sig/telnyx/models/compute/funcs/export_list_params.rbs +27 -0
- data/sig/telnyx/models/compute/funcs/func_log_export_config_response.rbs +115 -0
- data/sig/telnyx/models/connection_retrieve_count_params.rbs +15 -0
- data/sig/telnyx/models/connection_retrieve_count_response.rbs +169 -0
- data/sig/telnyx/models/inbound_message_webhook_event.rbs +6 -79
- data/sig/telnyx/models/machine_payment_account_credit_params.rbs +23 -0
- data/sig/telnyx/models/machine_payment_account_credit_response.rbs +164 -0
- data/sig/telnyx/models/message_retrieve_group_messages_response.rbs +6 -8
- data/sig/telnyx/models/message_retrieve_response.rbs +1 -2
- data/sig/telnyx/models/message_schedule_response.rbs +6 -7
- data/sig/telnyx/models/message_send_group_mms_response.rbs +6 -6
- data/sig/telnyx/models/message_send_long_code_response.rbs +6 -6
- data/sig/telnyx/models/message_send_number_pool_response.rbs +6 -6
- data/sig/telnyx/models/message_send_response.rbs +6 -7
- data/sig/telnyx/models/message_send_short_code_response.rbs +6 -6
- data/sig/telnyx/models/messaging_inbound_message.rbs +76 -0
- data/sig/telnyx/models/messaging_inbound_message_payload.rbs +235 -6
- data/sig/telnyx/models/messaging_outbound_message_payload.rbs +39 -1
- data/sig/telnyx/models/noise_suppression_engine_list_params.rbs +15 -0
- data/sig/telnyx/models/noise_suppression_engine_list_response.rbs +43 -0
- data/sig/telnyx/models/number_order_status_update.rbs +14 -4
- data/sig/telnyx/models/number_order_status_update_webhook_event.rbs +14 -4
- data/sig/telnyx/models/outbound_message.rbs +2 -1
- data/sig/telnyx/models/outbound_message_payload.rbs +45 -7
- data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -0
- data/sig/telnyx/models/success_response.rbs +15 -0
- data/sig/telnyx/models/texml/accounts/call_calls_params.rbs +159 -0
- data/sig/telnyx/models/texml/accounts/conferences/participant_participants_params.rbs +49 -0
- data/sig/telnyx/models/texml/call_create_params.rbs +72 -0
- data/sig/telnyx/models/texml/call_create_response.rbs +47 -0
- data/sig/telnyx/models/texml_initiate_ai_call_params.rbs +49 -0
- data/sig/telnyx/models.rbs +18 -0
- data/sig/telnyx/resources/ai/typesafe/v1.rbs +17 -0
- data/sig/telnyx/resources/ai/typesafe.rbs +11 -0
- data/sig/telnyx/resources/ai.rbs +2 -0
- data/sig/telnyx/resources/bot_challenge.rbs +14 -0
- data/sig/telnyx/resources/bot_sessions.rbs +13 -0
- data/sig/telnyx/resources/bot_signup.rbs +24 -0
- data/sig/telnyx/resources/compute/funcs/export.rbs +30 -0
- data/sig/telnyx/resources/compute/funcs.rbs +2 -0
- data/sig/telnyx/resources/connections.rbs +4 -0
- data/sig/telnyx/resources/machine_payments.rbs +12 -0
- data/sig/telnyx/resources/noise_suppression_engines.rbs +11 -0
- data/sig/telnyx/resources/texml/accounts/conferences/participants.rbs +7 -0
- data/sig/telnyx/resources/texml/calls.rbs +19 -0
- data/sig/telnyx/resources/texml.rbs +9 -0
- metadata +101 -2
|
@@ -166,10 +166,10 @@ module Telnyx
|
|
|
166
166
|
# @!attribute post_conversation_settings
|
|
167
167
|
# Configuration for post-conversation processing. When enabled, the assistant
|
|
168
168
|
# receives one additional LLM turn after the conversation ends, allowing it to
|
|
169
|
-
# execute tool calls such as
|
|
170
|
-
#
|
|
171
|
-
#
|
|
172
|
-
#
|
|
169
|
+
# execute final tool calls such as sending a summary or updating a record via
|
|
170
|
+
# webhook or function tools. Integration and MCP server tools are not available
|
|
171
|
+
# post-conversation; call-control tools (e.g. hangup, transfer) are also
|
|
172
|
+
# unavailable. Beta feature.
|
|
173
173
|
#
|
|
174
174
|
# @return [Telnyx::Models::AI::PostConversationSettingsReq, nil]
|
|
175
175
|
optional :post_conversation_settings, -> { Telnyx::AI::PostConversationSettingsReq }
|
|
@@ -193,7 +193,11 @@ module Telnyx
|
|
|
193
193
|
|
|
194
194
|
# @!attribute tool_ids
|
|
195
195
|
# IDs of shared tools to attach to the assistant. New integrations should prefer
|
|
196
|
-
# `tool_ids` over inline `tools`.
|
|
196
|
+
# `tool_ids` over inline `tools`. On update, a sent `tool_ids` array fully
|
|
197
|
+
# replaces the assistant's attached shared tools; omit the field to leave them
|
|
198
|
+
# unchanged. Single-instance tool types are counted across inline `tools` and
|
|
199
|
+
# `tool_ids` combined, so attaching a shared tool of such a type when an instance
|
|
200
|
+
# already exists returns HTTP 400 with error code 10015.
|
|
197
201
|
#
|
|
198
202
|
# @return [Array<String>, nil]
|
|
199
203
|
optional :tool_ids, Telnyx::Internal::Type::ArrayOf[String]
|
|
@@ -201,9 +205,16 @@ module Telnyx
|
|
|
201
205
|
# @!attribute tools
|
|
202
206
|
# Deprecated for new integrations. Inline tool definitions available to the
|
|
203
207
|
# assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
204
|
-
# endpoints.
|
|
205
|
-
#
|
|
206
|
-
#
|
|
208
|
+
# endpoints. On update, a sent `tools` array fully replaces the assistant's inline
|
|
209
|
+
# tools; omit the field to leave the inline tools unchanged. Each tool type except
|
|
210
|
+
# `function`, `webhook`, and `client_side_tool` allows at most one instance per
|
|
211
|
+
# assistant, counted across inline `tools` and shared `tool_ids` combined —
|
|
212
|
+
# sending a duplicate of such a type returns HTTP 400 with error code 10015.
|
|
213
|
+
# Responses merge shared tools into `tools` with `shared: true`; when updating,
|
|
214
|
+
# omit those tools from the `tools` array and manage them through `tool_ids`
|
|
215
|
+
# instead.
|
|
216
|
+
#
|
|
217
|
+
# @return [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]
|
|
207
218
|
optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantTool] }
|
|
208
219
|
|
|
209
220
|
# @!attribute transcription
|
|
@@ -282,7 +293,7 @@ module Telnyx
|
|
|
282
293
|
#
|
|
283
294
|
# @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
|
|
284
295
|
#
|
|
285
|
-
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::
|
|
296
|
+
# @param tools [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>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
286
297
|
#
|
|
287
298
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
288
299
|
#
|
|
@@ -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
|
|
15
|
-
#
|
|
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
|
|
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
|
|
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.
|
|
39
|
-
#
|
|
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
|
|
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.
|
|
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 `
|
|
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
|
|
96
|
-
#
|
|
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
|
|
17
|
-
# `verbose_json`. Not returned by
|
|
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`
|
|
25
|
-
#
|
|
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
|
|
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::
|
|
36
|
-
optional :words, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::
|
|
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
|
|
45
|
-
# `text` and, depending on `model_config`, may include `words` with
|
|
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::
|
|
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
|
-
# @!
|
|
82
|
-
#
|
|
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
|
-
# @
|
|
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
|
-
|
|
92
|
-
#
|
|
93
|
-
#
|
|
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 [
|
|
96
|
-
|
|
95
|
+
# @return [Array<Telnyx::Models::AI::AudioTranscriptionResponseWord>, nil]
|
|
96
|
+
optional :words, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AudioTranscriptionResponseWord] }
|
|
97
97
|
|
|
98
|
-
# @!
|
|
99
|
-
#
|
|
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
|
-
# @
|
|
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
|
|
104
|
+
# @param end_ [Float] End time of the segment in seconds.
|
|
127
105
|
#
|
|
128
|
-
# @param start [Float] Start time of the
|
|
106
|
+
# @param start [Float] Start time of the segment in seconds.
|
|
129
107
|
#
|
|
130
|
-
# @param
|
|
108
|
+
# @param text [String] Text content of the segment.
|
|
131
109
|
#
|
|
132
|
-
# @param
|
|
110
|
+
# @param speakers [Array<Integer>] Speaker indices heard in this segment. Returned by the `deepgram/*` models when
|
|
133
111
|
#
|
|
134
|
-
# @param
|
|
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
|
|
@@ -571,8 +571,8 @@ module Telnyx
|
|
|
571
571
|
class Function < Telnyx::Internal::Type::BaseModel
|
|
572
572
|
# @!attribute function
|
|
573
573
|
#
|
|
574
|
-
# @return [Telnyx::Models::AI::
|
|
575
|
-
required :function, -> { Telnyx::AI::
|
|
574
|
+
# @return [Telnyx::Models::AI::OpenAI::FunctionDefinition]
|
|
575
|
+
required :function, -> { Telnyx::AI::OpenAI::FunctionDefinition }
|
|
576
576
|
|
|
577
577
|
# @!attribute type
|
|
578
578
|
#
|
|
@@ -580,31 +580,8 @@ module Telnyx
|
|
|
580
580
|
required :type, const: :function
|
|
581
581
|
|
|
582
582
|
# @!method initialize(function:, type: :function)
|
|
583
|
-
# @param function [Telnyx::Models::AI::
|
|
583
|
+
# @param function [Telnyx::Models::AI::OpenAI::FunctionDefinition]
|
|
584
584
|
# @param type [Symbol, :function]
|
|
585
|
-
|
|
586
|
-
# @see Telnyx::Models::AI::ChatCompletionRequest::Tool::Function#function
|
|
587
|
-
class Function < Telnyx::Internal::Type::BaseModel
|
|
588
|
-
# @!attribute name
|
|
589
|
-
#
|
|
590
|
-
# @return [String]
|
|
591
|
-
required :name, String
|
|
592
|
-
|
|
593
|
-
# @!attribute description
|
|
594
|
-
#
|
|
595
|
-
# @return [String, nil]
|
|
596
|
-
optional :description, String
|
|
597
|
-
|
|
598
|
-
# @!attribute parameters
|
|
599
|
-
#
|
|
600
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
601
|
-
optional :parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
602
|
-
|
|
603
|
-
# @!method initialize(name:, description: nil, parameters: nil)
|
|
604
|
-
# @param name [String]
|
|
605
|
-
# @param description [String]
|
|
606
|
-
# @param parameters [Hash{Symbol=>Object}]
|
|
607
|
-
end
|
|
608
585
|
end
|
|
609
586
|
|
|
610
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::
|
|
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::
|
|
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
|
#
|
|
@@ -176,10 +176,10 @@ module Telnyx
|
|
|
176
176
|
# @!attribute post_conversation_settings
|
|
177
177
|
# Configuration for post-conversation processing. When enabled, the assistant
|
|
178
178
|
# receives one additional LLM turn after the conversation ends, allowing it to
|
|
179
|
-
# execute tool calls such as
|
|
180
|
-
#
|
|
181
|
-
#
|
|
182
|
-
#
|
|
179
|
+
# execute final tool calls such as sending a summary or updating a record via
|
|
180
|
+
# webhook or function tools. Integration and MCP server tools are not available
|
|
181
|
+
# post-conversation; call-control tools (e.g. hangup, transfer) are also
|
|
182
|
+
# unavailable. Beta feature.
|
|
183
183
|
#
|
|
184
184
|
# @return [Telnyx::Models::AI::PostConversationSettings, nil]
|
|
185
185
|
optional :post_conversation_settings, -> { Telnyx::AI::PostConversationSettings }
|
|
@@ -208,11 +208,14 @@ module Telnyx
|
|
|
208
208
|
optional :telephony_settings, -> { Telnyx::AI::TelephonySettings }
|
|
209
209
|
|
|
210
210
|
# @!attribute tools
|
|
211
|
-
#
|
|
212
|
-
#
|
|
213
|
-
#
|
|
214
|
-
#
|
|
215
|
-
#
|
|
211
|
+
# The assistant's tools. Responses merge the assistant's shared Tools Library
|
|
212
|
+
# tools into this array alongside inline tools, each flagged `shared: true`;
|
|
213
|
+
# inline tools carry `shared: false`. On update, a sent `tools` array fully
|
|
214
|
+
# replaces the inline tools only — shared tools stay attached unless `tool_ids`
|
|
215
|
+
# changes. Each tool type except `function`, `webhook`, and `client_side_tool`
|
|
216
|
+
# allows at most one instance per assistant across both sources.
|
|
217
|
+
#
|
|
218
|
+
# @return [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]
|
|
216
219
|
optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantTool] }
|
|
217
220
|
|
|
218
221
|
# @!attribute transcription
|
|
@@ -310,7 +313,7 @@ module Telnyx
|
|
|
310
313
|
#
|
|
311
314
|
# @param telephony_settings [Telnyx::Models::AI::TelephonySettings]
|
|
312
315
|
#
|
|
313
|
-
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::AssistantTool::ClientSideTool, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::
|
|
316
|
+
# @param tools [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>] The assistant's tools. Responses merge the assistant's shared Tools Library tool
|
|
314
317
|
#
|
|
315
318
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
316
319
|
#
|
|
@@ -16,6 +16,13 @@ module Telnyx
|
|
|
16
16
|
# @return [Boolean, nil]
|
|
17
17
|
optional :enable, Telnyx::Internal::Type::Boolean
|
|
18
18
|
|
|
19
|
+
# @!attribute interrupt_prediction_threshold
|
|
20
|
+
# Interrupt-prediction sensitivity, from 0.0 to 1.0. Set to null or 0.0 to disable
|
|
21
|
+
# interrupt prediction.
|
|
22
|
+
#
|
|
23
|
+
# @return [Float, nil]
|
|
24
|
+
optional :interrupt_prediction_threshold, Float, nil?: true
|
|
25
|
+
|
|
19
26
|
# @!attribute start_speaking_plan
|
|
20
27
|
# Controls when the assistant starts speaking after the user stops. These
|
|
21
28
|
# thresholds primarily apply to non turn-taking transcription models. For
|
|
@@ -25,7 +32,7 @@ module Telnyx
|
|
|
25
32
|
# @return [Telnyx::Models::AI::StartSpeakingPlan, nil]
|
|
26
33
|
optional :start_speaking_plan, -> { Telnyx::AI::StartSpeakingPlan }
|
|
27
34
|
|
|
28
|
-
# @!method initialize(disable_greeting_interruption: nil, enable: nil, start_speaking_plan: nil)
|
|
35
|
+
# @!method initialize(disable_greeting_interruption: nil, enable: nil, interrupt_prediction_threshold: nil, start_speaking_plan: nil)
|
|
29
36
|
# Some parameter documentations has been truncated, see
|
|
30
37
|
# {Telnyx::Models::AI::InferenceEmbeddingInterruptionSettings} for more details.
|
|
31
38
|
#
|
|
@@ -40,6 +47,8 @@ module Telnyx
|
|
|
40
47
|
#
|
|
41
48
|
# @param enable [Boolean] Whether users can interrupt the assistant while it is speaking.
|
|
42
49
|
#
|
|
50
|
+
# @param interrupt_prediction_threshold [Float, nil] Interrupt-prediction sensitivity, from 0.0 to 1.0. Set to null or 0.0 to disable
|
|
51
|
+
#
|
|
43
52
|
# @param start_speaking_plan [Telnyx::Models::AI::StartSpeakingPlan] Controls when the assistant starts speaking after the user stops. These threshol
|
|
44
53
|
end
|
|
45
54
|
end
|
|
@@ -14,9 +14,29 @@ module Telnyx
|
|
|
14
14
|
# @return [Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook]
|
|
15
15
|
required :webhook, -> { Telnyx::AI::InferenceEmbeddingWebhookToolParams::Webhook }
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
response_only do
|
|
18
|
+
# @!attribute shared
|
|
19
|
+
# Whether this tool comes from the shared Tools Library. Responses merge shared
|
|
20
|
+
# tools into `tools` with `shared: true`; inline tools carry `shared: false`.
|
|
21
|
+
# Read-only: set by the server, not accepted in requests. When updating an
|
|
22
|
+
# assistant, omit `shared: true` tools from the request `tools` array and manage
|
|
23
|
+
# them through `tool_ids` instead — re-sending their definitions creates an inline
|
|
24
|
+
# duplicate (rejected with error code 10015 when the type allows only one instance
|
|
25
|
+
# per assistant).
|
|
26
|
+
#
|
|
27
|
+
# @return [Boolean, nil]
|
|
28
|
+
optional :shared, Telnyx::Internal::Type::Boolean
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# @!method initialize(type:, webhook:, shared: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams} for more details.
|
|
34
|
+
#
|
|
18
35
|
# @param type [Symbol, Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Type]
|
|
36
|
+
#
|
|
19
37
|
# @param webhook [Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams::Webhook]
|
|
38
|
+
#
|
|
39
|
+
# @param shared [Boolean] Whether this tool comes from the shared Tools Library. Responses merge shared to
|
|
20
40
|
|
|
21
41
|
# @see Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams#type
|
|
22
42
|
module Type
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module AI
|
|
6
|
+
module OpenAI
|
|
7
|
+
class FunctionDefinition < Telnyx::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute name
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :name, String
|
|
12
|
+
|
|
13
|
+
# @!attribute description
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :description, String
|
|
17
|
+
|
|
18
|
+
# @!attribute parameters
|
|
19
|
+
#
|
|
20
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
21
|
+
optional :parameters, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
22
|
+
|
|
23
|
+
# @!method initialize(name:, description: nil, parameters: nil)
|
|
24
|
+
# @param name [String]
|
|
25
|
+
# @param description [String]
|
|
26
|
+
# @param parameters [Hash{Symbol=>Object}]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -18,10 +18,10 @@ module Telnyx
|
|
|
18
18
|
#
|
|
19
19
|
# Configuration for post-conversation processing. When enabled, the assistant
|
|
20
20
|
# receives one additional LLM turn after the conversation ends, allowing it to
|
|
21
|
-
# execute tool calls such as
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
21
|
+
# execute final tool calls such as sending a summary or updating a record via
|
|
22
|
+
# webhook or function tools. Integration and MCP server tools are not available
|
|
23
|
+
# post-conversation; call-control tools (e.g. hangup, transfer) are also
|
|
24
|
+
# unavailable. Beta feature.
|
|
25
25
|
#
|
|
26
26
|
# @param enabled [Boolean] Whether post-conversation processing is enabled. When true, the assistant will b
|
|
27
27
|
end
|
|
@@ -18,10 +18,10 @@ module Telnyx
|
|
|
18
18
|
#
|
|
19
19
|
# Configuration for post-conversation processing. When enabled, the assistant
|
|
20
20
|
# receives one additional LLM turn after the conversation ends, allowing it to
|
|
21
|
-
# execute tool calls such as
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
21
|
+
# execute final tool calls such as sending a summary or updating a record via
|
|
22
|
+
# webhook or function tools. Integration and MCP server tools are not available
|
|
23
|
+
# post-conversation; call-control tools (e.g. hangup, transfer) are also
|
|
24
|
+
# unavailable. Beta feature.
|
|
25
25
|
#
|
|
26
26
|
# @param enabled [Boolean] Whether post-conversation processing is enabled. When true, the assistant will b
|
|
27
27
|
end
|