telnyx 5.155.0 → 5.157.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +1 -0
- data/lib/telnyx/internal/type/union.rb +4 -4
- data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +209 -0
- data/lib/telnyx/models/ai/anthropic/v1_messages_response.rb +12 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +2 -2
- data/lib/telnyx/models/ai/assistant_tool.rb +118 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +2 -2
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +2 -2
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rb +103 -0
- data/lib/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rb +54 -0
- data/lib/telnyx/models/ai/inference_embedding.rb +6 -6
- data/lib/telnyx/models/ai/pay_tool_params.rb +46 -0
- data/lib/telnyx/models/ai/tool_create_params.rb +13 -1
- data/lib/telnyx/models/ai/tool_update_params.rb +13 -1
- data/lib/telnyx/models/ai/transcription_settings.rb +3 -3
- data/lib/telnyx/models/call_dial_params.rb +13 -1
- data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +3 -0
- data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +6 -0
- data/lib/telnyx/models/calls/action_speak_params.rb +6 -0
- data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +3 -0
- data/lib/telnyx/models/calls/action_start_conversation_relay_params.rb +3 -0
- data/lib/telnyx/models/calls/telnyx_voice_settings.rb +2 -1
- data/lib/telnyx/models/calls/transcription_config.rb +8 -4
- data/lib/telnyx/models/calls/transcription_engine_parakeet_config.rb +1 -1
- data/lib/telnyx/models/conferences/action_speak_params.rb +6 -0
- data/lib/telnyx/models/conversation_relay_embedded_config.rb +3 -0
- data/lib/telnyx/models/doc_reqs_requirement.rb +29 -4
- data/lib/telnyx/models/inbound_message.rb +278 -28
- data/lib/telnyx/models/inbound_message_webhook_event.rb +70 -3
- data/lib/telnyx/models/managed_account_list_params.rb +45 -3
- data/lib/telnyx/models/models_response.rb +0 -1
- data/lib/telnyx/models/phone_number_delete_response.rb +12 -1
- data/lib/telnyx/models/phone_number_detailed.rb +12 -1
- data/lib/telnyx/models/phone_number_slim_list_response.rb +12 -1
- data/lib/telnyx/models/requirement_list_params.rb +10 -1
- data/lib/telnyx/models/requirement_retrieve_params.rb +14 -1
- data/lib/telnyx/models/speech_to_text_retrieve_transcription_params.rb +1 -1
- data/lib/telnyx/models/storage/cloudf_create_params.rb +56 -0
- data/lib/telnyx/models/storage/cloudf_delete_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_list_params.rb +109 -0
- data/lib/telnyx/models/storage/cloudf_list_response.rb +165 -0
- data/lib/telnyx/models/storage/cloudf_retrieve_params.rb +22 -0
- data/lib/telnyx/models/storage/cloudf_update_params.rb +36 -0
- data/lib/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rb +30 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rb +129 -0
- data/lib/telnyx/models/storage/cloudfs_filesystem_status.rb +28 -0
- data/lib/telnyx/models/text_to_speech_generate_speech_params.rb +13 -8
- data/lib/telnyx/models/text_to_speech_retrieve_speech_params.rb +4 -4
- data/lib/telnyx/models/verify_profile.rb +2 -2
- data/lib/telnyx/models/verify_profile_create_params.rb +2 -2
- data/lib/telnyx/models/verify_profile_update_params.rb +2 -2
- data/lib/telnyx/models.rb +0 -6
- data/lib/telnyx/resources/ai/anthropic/v1.rb +91 -0
- data/lib/telnyx/resources/ai/anthropic.rb +20 -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/chat.rb +0 -81
- data/lib/telnyx/resources/ai/conversations/conversation_insights.rb +55 -0
- data/lib/telnyx/resources/ai/conversations.rb +5 -0
- data/lib/telnyx/resources/ai/tools.rb +8 -2
- data/lib/telnyx/resources/ai.rb +3 -56
- data/lib/telnyx/resources/calls.rb +3 -1
- data/lib/telnyx/resources/messages.rb +1 -32
- data/lib/telnyx/resources/requirements.rb +13 -3
- data/lib/telnyx/resources/storage/cloudfs/actions.rb +54 -0
- data/lib/telnyx/resources/storage/cloudfs.rb +187 -0
- data/lib/telnyx/resources/storage.rb +6 -0
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +20 -7
- data/rbi/telnyx/client.rbi +1 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +314 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_response.rbi +15 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +12 -4
- data/rbi/telnyx/models/ai/assistant_tool.rbi +258 -1
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +12 -4
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +12 -4
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbi +188 -0
- data/rbi/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbi +94 -0
- data/rbi/telnyx/models/ai/inference_embedding.rbi +18 -6
- data/rbi/telnyx/models/ai/pay_tool_params.rbi +71 -0
- data/rbi/telnyx/models/ai/tool_create_params.rbi +18 -0
- data/rbi/telnyx/models/ai/tool_update_params.rbi +18 -0
- data/rbi/telnyx/models/ai/transcription_settings.rbi +5 -5
- data/rbi/telnyx/models/call_dial_params.rbi +19 -0
- data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +6 -0
- data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +12 -0
- data/rbi/telnyx/models/calls/action_speak_params.rbi +12 -0
- data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +6 -0
- data/rbi/telnyx/models/calls/action_start_conversation_relay_params.rbi +6 -0
- data/rbi/telnyx/models/calls/telnyx_voice_settings.rbi +4 -2
- data/rbi/telnyx/models/calls/transcription_config.rbi +15 -7
- data/rbi/telnyx/models/calls/transcription_engine_parakeet_config.rbi +2 -2
- data/rbi/telnyx/models/conferences/action_speak_params.rbi +12 -0
- data/rbi/telnyx/models/conversation_relay_embedded_config.rbi +6 -0
- data/rbi/telnyx/models/doc_reqs_requirement.rbi +38 -9
- data/rbi/telnyx/models/inbound_message.rbi +324 -58
- data/rbi/telnyx/models/inbound_message_webhook_event.rbi +173 -4
- data/rbi/telnyx/models/managed_account_list_params.rbi +130 -6
- data/rbi/telnyx/models/phone_number_delete_response.rbi +14 -0
- data/rbi/telnyx/models/phone_number_detailed.rbi +14 -0
- data/rbi/telnyx/models/phone_number_slim_list_response.rbi +14 -0
- data/rbi/telnyx/models/requirement_list_params.rbi +13 -0
- data/rbi/telnyx/models/requirement_retrieve_params.rbi +21 -2
- data/rbi/telnyx/models/speech_to_text_retrieve_transcription_params.rbi +2 -2
- data/rbi/telnyx/models/storage/cloudf_create_params.rbi +103 -0
- data/rbi/telnyx/models/storage/cloudf_delete_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_list_params.rbi +232 -0
- data/rbi/telnyx/models/storage/cloudf_list_response.rbi +327 -0
- data/rbi/telnyx/models/storage/cloudf_retrieve_params.rbi +40 -0
- data/rbi/telnyx/models/storage/cloudf_update_params.rbi +61 -0
- data/rbi/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbi +50 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbi +229 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbi +227 -0
- data/rbi/telnyx/models/storage/cloudfs_filesystem_status.rbi +57 -0
- data/rbi/telnyx/models/text_to_speech_generate_speech_params.rbi +21 -13
- data/rbi/telnyx/models/text_to_speech_retrieve_speech_params.rbi +8 -8
- data/rbi/telnyx/models/verify_profile.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_create_params.rbi +2 -2
- data/rbi/telnyx/models/verify_profile_update_params.rbi +2 -2
- data/rbi/telnyx/models.rbi +0 -7
- data/rbi/telnyx/resources/ai/anthropic/v1.rbi +106 -0
- data/rbi/telnyx/resources/ai/anthropic.rbi +17 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -1
- data/rbi/telnyx/resources/ai/assistants.rbi +6 -2
- data/rbi/telnyx/resources/ai/chat.rbi +0 -129
- data/rbi/telnyx/resources/ai/conversations/conversation_insights.rbi +68 -0
- data/rbi/telnyx/resources/ai/conversations.rbi +6 -0
- data/rbi/telnyx/resources/ai/tools.rbi +8 -0
- data/rbi/telnyx/resources/ai.rbi +2 -32
- data/rbi/telnyx/resources/calls/actions.rbi +21 -0
- data/rbi/telnyx/resources/calls.rbi +7 -0
- data/rbi/telnyx/resources/conferences/actions.rbi +6 -0
- data/rbi/telnyx/resources/managed_accounts.rbi +1 -1
- data/rbi/telnyx/resources/messages.rbi +1 -28
- data/rbi/telnyx/resources/requirements.rbi +8 -0
- data/rbi/telnyx/resources/storage/cloudfs/actions.rbi +46 -0
- data/rbi/telnyx/resources/storage/cloudfs.rbi +152 -0
- data/rbi/telnyx/resources/storage.rbi +5 -0
- data/rbi/telnyx/resources/text_to_speech.rbi +11 -9
- data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +175 -0
- data/sig/telnyx/models/ai/anthropic/v1_messages_response.rbs +11 -0
- data/sig/telnyx/models/ai/assistant_tool.rbs +108 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_params.rbs +74 -0
- data/sig/telnyx/models/ai/conversations/conversation_insight_retrieve_aggregates_response.rbs +34 -0
- data/sig/telnyx/models/ai/pay_tool_params.rbs +41 -0
- data/sig/telnyx/models/ai/tool_create_params.rbs +14 -0
- data/sig/telnyx/models/ai/tool_update_params.rbs +14 -0
- data/sig/telnyx/models/ai/transcription_settings.rbs +2 -2
- data/sig/telnyx/models/call_dial_params.rbs +7 -0
- data/sig/telnyx/models/calls/transcription_config.rbs +2 -2
- data/sig/telnyx/models/calls/transcription_engine_parakeet_config.rbs +2 -2
- data/sig/telnyx/models/doc_reqs_requirement.rbs +25 -8
- data/sig/telnyx/models/inbound_message.rbs +204 -35
- data/sig/telnyx/models/inbound_message_webhook_event.rbs +81 -5
- data/sig/telnyx/models/managed_account_list_params.rbs +47 -3
- data/sig/telnyx/models/phone_number_delete_response.rbs +5 -0
- data/sig/telnyx/models/phone_number_detailed.rbs +5 -0
- data/sig/telnyx/models/phone_number_slim_list_response.rbs +5 -0
- data/sig/telnyx/models/requirement_list_params.rbs +8 -1
- data/sig/telnyx/models/requirement_retrieve_params.rbs +12 -2
- data/sig/telnyx/models/speech_to_text_retrieve_transcription_params.rbs +2 -2
- data/sig/telnyx/models/storage/cloudf_create_params.rbs +50 -0
- data/sig/telnyx/models/storage/cloudf_delete_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_list_params.rbs +112 -0
- data/sig/telnyx/models/storage/cloudf_list_response.rbs +163 -0
- data/sig/telnyx/models/storage/cloudf_retrieve_params.rbs +22 -0
- data/sig/telnyx/models/storage/cloudf_update_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs/action_rotate_meta_token_params.rbs +32 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_detail_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_response_wrapper.rbs +115 -0
- data/sig/telnyx/models/storage/cloudfs_filesystem_status.rbs +21 -0
- data/sig/telnyx/models.rbs +0 -6
- data/sig/telnyx/resources/ai/anthropic/v1.rbs +35 -0
- data/sig/telnyx/resources/ai/anthropic.rbs +11 -0
- data/sig/telnyx/resources/ai/chat.rbs +0 -30
- data/sig/telnyx/resources/ai/conversations/conversation_insights.rbs +20 -0
- data/sig/telnyx/resources/ai/conversations.rbs +2 -0
- data/sig/telnyx/resources/ai/tools.rbs +4 -0
- data/sig/telnyx/resources/ai.rbs +1 -8
- data/sig/telnyx/resources/calls.rbs +1 -0
- data/sig/telnyx/resources/messages.rbs +0 -10
- data/sig/telnyx/resources/requirements.rbs +2 -0
- data/sig/telnyx/resources/storage/cloudfs/actions.rbs +17 -0
- data/sig/telnyx/resources/storage/cloudfs.rbs +45 -0
- data/sig/telnyx/resources/storage.rbs +2 -0
- metadata +62 -23
- data/lib/telnyx/models/ai/chat_create_completion_params.rb +0 -16
- data/lib/telnyx/models/ai/chat_create_completion_response.rb +0 -10
- data/lib/telnyx/models/ai_create_response_deprecated_params.rb +0 -20
- data/lib/telnyx/models/ai_create_response_deprecated_response.rb +0 -8
- data/lib/telnyx/models/ai_retrieve_models_params.rb +0 -14
- data/lib/telnyx/models/message_send_whatsapp_params.rb +0 -71
- data/lib/telnyx/models/message_send_whatsapp_response.rb +0 -178
- data/rbi/telnyx/models/ai/chat_create_completion_params.rbi +0 -32
- data/rbi/telnyx/models/ai/chat_create_completion_response.rbi +0 -13
- data/rbi/telnyx/models/ai_create_response_deprecated_params.rbi +0 -41
- data/rbi/telnyx/models/ai_create_response_deprecated_response.rbi +0 -11
- data/rbi/telnyx/models/ai_retrieve_models_params.rbi +0 -27
- data/rbi/telnyx/models/message_send_whatsapp_params.rbi +0 -124
- data/rbi/telnyx/models/message_send_whatsapp_response.rbi +0 -379
- data/sig/telnyx/models/ai/chat_create_completion_params.rbs +0 -17
- data/sig/telnyx/models/ai/chat_create_completion_response.rbs +0 -9
- data/sig/telnyx/models/ai_create_response_deprecated_params.rbs +0 -24
- data/sig/telnyx/models/ai_create_response_deprecated_response.rbs +0 -7
- data/sig/telnyx/models/ai_retrieve_models_params.rbs +0 -15
- data/sig/telnyx/models/message_send_whatsapp_params.rbs +0 -69
- data/sig/telnyx/models/message_send_whatsapp_response.rbs +0 -191
data/rbi/telnyx/models.rbi
CHANGED
|
@@ -48,14 +48,9 @@ module Telnyx
|
|
|
48
48
|
|
|
49
49
|
AI = Telnyx::Models::AI
|
|
50
50
|
|
|
51
|
-
AICreateResponseDeprecatedParams =
|
|
52
|
-
Telnyx::Models::AICreateResponseDeprecatedParams
|
|
53
|
-
|
|
54
51
|
AIRetrieveConversationHistoriesParams =
|
|
55
52
|
Telnyx::Models::AIRetrieveConversationHistoriesParams
|
|
56
53
|
|
|
57
|
-
AIRetrieveModelsParams = Telnyx::Models::AIRetrieveModelsParams
|
|
58
|
-
|
|
59
54
|
AISummarizeParams = Telnyx::Models::AISummarizeParams
|
|
60
55
|
|
|
61
56
|
AlphanumericSenderID = Telnyx::Models::AlphanumericSenderID
|
|
@@ -1007,8 +1002,6 @@ module Telnyx
|
|
|
1007
1002
|
|
|
1008
1003
|
MessageSendShortCodeParams = Telnyx::Models::MessageSendShortCodeParams
|
|
1009
1004
|
|
|
1010
|
-
MessageSendWhatsappParams = Telnyx::Models::MessageSendWhatsappParams
|
|
1011
|
-
|
|
1012
1005
|
MessageSendWithAlphanumericSenderParams =
|
|
1013
1006
|
Telnyx::Models::MessageSendWithAlphanumericSenderParams
|
|
1014
1007
|
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Anthropic
|
|
7
|
+
class V1
|
|
8
|
+
# Send a message to a language model using the Anthropic Messages API format. This
|
|
9
|
+
# endpoint is compatible with the
|
|
10
|
+
# [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) and may be
|
|
11
|
+
# used with the Anthropic JS or Python SDK by setting the base URL to
|
|
12
|
+
# `https://api.telnyx.com/v2/ai/anthropic`.
|
|
13
|
+
#
|
|
14
|
+
# The endpoint translates Anthropic-format requests into Telnyx's inference
|
|
15
|
+
# internals, then translates the response back to the Anthropic message shape.
|
|
16
|
+
# Streaming responses use Anthropic SSE event types (`message_start`,
|
|
17
|
+
# `content_block_start`, `content_block_delta`, `content_block_stop`,
|
|
18
|
+
# `message_delta`, `message_stop`).
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
max_tokens: Integer,
|
|
22
|
+
messages: T::Array[T::Hash[Symbol, T.anything]],
|
|
23
|
+
model: String,
|
|
24
|
+
api_key_ref: String,
|
|
25
|
+
billing_group_id: String,
|
|
26
|
+
fallback_config: T::Hash[Symbol, T.anything],
|
|
27
|
+
max_retries: Integer,
|
|
28
|
+
mcp_servers: T::Array[T::Hash[Symbol, T.anything]],
|
|
29
|
+
metadata: T::Hash[Symbol, T.anything],
|
|
30
|
+
service_tier: String,
|
|
31
|
+
stop_sequences: T::Array[String],
|
|
32
|
+
stream: T::Boolean,
|
|
33
|
+
system_:
|
|
34
|
+
Telnyx::AI::Anthropic::V1MessagesParams::System::Variants,
|
|
35
|
+
temperature: Float,
|
|
36
|
+
thinking: T::Hash[Symbol, T.anything],
|
|
37
|
+
timeout: Float,
|
|
38
|
+
tool_choice: T::Hash[Symbol, T.anything],
|
|
39
|
+
tools: T::Array[T::Hash[Symbol, T.anything]],
|
|
40
|
+
top_k: Integer,
|
|
41
|
+
top_p: Float,
|
|
42
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
43
|
+
).returns(T::Hash[Symbol, T.anything])
|
|
44
|
+
end
|
|
45
|
+
def messages(
|
|
46
|
+
# The maximum number of tokens to generate in the response.
|
|
47
|
+
max_tokens:,
|
|
48
|
+
# The messages to send to the model, following the
|
|
49
|
+
# [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) format.
|
|
50
|
+
messages:,
|
|
51
|
+
# The model to use for generating the response, for example `zai-org/GLM-5.2` or
|
|
52
|
+
# another model available from the Telnyx models endpoint.
|
|
53
|
+
model:,
|
|
54
|
+
# If you are using an external inference provider, this field allows you to pass
|
|
55
|
+
# along a reference to your API key. After creating an
|
|
56
|
+
# [integration secret](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
57
|
+
# for your API key, pass the secret's `identifier` in this field.
|
|
58
|
+
api_key_ref: nil,
|
|
59
|
+
# The billing group ID to associate with this request.
|
|
60
|
+
billing_group_id: nil,
|
|
61
|
+
# Configuration for model fallback behavior when the primary model is unavailable.
|
|
62
|
+
fallback_config: nil,
|
|
63
|
+
# Maximum number of retries for the request.
|
|
64
|
+
max_retries: nil,
|
|
65
|
+
# List of MCP (Model Context Protocol) servers to make available to the model.
|
|
66
|
+
mcp_servers: nil,
|
|
67
|
+
# An object describing metadata about the request.
|
|
68
|
+
metadata: nil,
|
|
69
|
+
# Service tier for the request.
|
|
70
|
+
service_tier: nil,
|
|
71
|
+
# Custom sequences that will cause the model to stop generating.
|
|
72
|
+
stop_sequences: nil,
|
|
73
|
+
# Whether to stream the response as Anthropic-format Server-Sent Events.
|
|
74
|
+
stream: nil,
|
|
75
|
+
# System prompt. Can be a string or an array of content blocks following the
|
|
76
|
+
# Anthropic API format.
|
|
77
|
+
system_: nil,
|
|
78
|
+
# Amount of randomness injected into the response. Ranges from 0 to 1.
|
|
79
|
+
temperature: nil,
|
|
80
|
+
# Extended thinking configuration for models that support it. Set `type` to
|
|
81
|
+
# `enabled` to turn on extended thinking.
|
|
82
|
+
thinking: nil,
|
|
83
|
+
# Request timeout in seconds.
|
|
84
|
+
timeout: nil,
|
|
85
|
+
# Controls how the model uses tools, following the Anthropic API format.
|
|
86
|
+
tool_choice: nil,
|
|
87
|
+
# Definitions of tools that the model may use, following the Anthropic API format.
|
|
88
|
+
tools: nil,
|
|
89
|
+
# Top-k sampling parameter. Only sample from the top K options for each subsequent
|
|
90
|
+
# token.
|
|
91
|
+
top_k: nil,
|
|
92
|
+
# Nucleus sampling parameter. Use temperature or top_p, but not both.
|
|
93
|
+
top_p: nil,
|
|
94
|
+
request_options: {}
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# @api private
|
|
99
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
100
|
+
def self.new(client:)
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Anthropic
|
|
7
|
+
sig { returns(Telnyx::Resources::AI::Anthropic::V1) }
|
|
8
|
+
attr_reader :v1
|
|
9
|
+
|
|
10
|
+
# @api private
|
|
11
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
12
|
+
def self.new(client:)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -62,6 +62,7 @@ module Telnyx
|
|
|
62
62
|
T::Array[
|
|
63
63
|
T.any(
|
|
64
64
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
65
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
65
66
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
66
67
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
67
68
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -70,7 +71,8 @@ module Telnyx
|
|
|
70
71
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
71
72
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
72
73
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
73
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
74
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
75
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
74
76
|
)
|
|
75
77
|
],
|
|
76
78
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
@@ -66,6 +66,7 @@ module Telnyx
|
|
|
66
66
|
T::Array[
|
|
67
67
|
T.any(
|
|
68
68
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
69
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
69
70
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
70
71
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
71
72
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -74,7 +75,8 @@ module Telnyx
|
|
|
74
75
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
75
76
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
76
77
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
77
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
78
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
79
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
78
80
|
)
|
|
79
81
|
],
|
|
80
82
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
@@ -240,6 +242,7 @@ module Telnyx
|
|
|
240
242
|
T::Array[
|
|
241
243
|
T.any(
|
|
242
244
|
Telnyx::AI::InferenceEmbeddingWebhookToolParams::OrHash,
|
|
245
|
+
Telnyx::AI::AssistantTool::ClientSideTool::OrHash,
|
|
243
246
|
Telnyx::AI::RetrievalTool::OrHash,
|
|
244
247
|
Telnyx::AI::AssistantTool::Handoff::OrHash,
|
|
245
248
|
Telnyx::AI::HangupTool::OrHash,
|
|
@@ -248,7 +251,8 @@ module Telnyx
|
|
|
248
251
|
Telnyx::AI::AssistantTool::Refer::OrHash,
|
|
249
252
|
Telnyx::AI::AssistantTool::SendDtmf::OrHash,
|
|
250
253
|
Telnyx::AI::AssistantTool::SendMessage::OrHash,
|
|
251
|
-
Telnyx::AI::AssistantTool::SkipTurn::OrHash
|
|
254
|
+
Telnyx::AI::AssistantTool::SkipTurn::OrHash,
|
|
255
|
+
Telnyx::AI::AssistantTool::Pay::OrHash
|
|
252
256
|
)
|
|
253
257
|
],
|
|
254
258
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
@@ -3,136 +3,7 @@
|
|
|
3
3
|
module Telnyx
|
|
4
4
|
module Resources
|
|
5
5
|
class AI
|
|
6
|
-
# Generate text with LLMs
|
|
7
6
|
class Chat
|
|
8
|
-
# **Deprecated**: Use `POST /v2/ai/openai/chat/completions` instead. Chat with a
|
|
9
|
-
# language model. This endpoint is consistent with the
|
|
10
|
-
# [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat)
|
|
11
|
-
# and may be used with the OpenAI JS or Python SDK.
|
|
12
|
-
sig do
|
|
13
|
-
params(
|
|
14
|
-
messages:
|
|
15
|
-
T::Array[Telnyx::AI::ChatCompletionRequest::Message::OrHash],
|
|
16
|
-
api_key_ref: String,
|
|
17
|
-
best_of: Integer,
|
|
18
|
-
early_stopping: T::Boolean,
|
|
19
|
-
enable_thinking: T::Boolean,
|
|
20
|
-
frequency_penalty: Float,
|
|
21
|
-
guided_choice: T::Array[String],
|
|
22
|
-
guided_json: T::Hash[Symbol, T.anything],
|
|
23
|
-
guided_regex: String,
|
|
24
|
-
length_penalty: Float,
|
|
25
|
-
logprobs: T::Boolean,
|
|
26
|
-
max_tokens: Integer,
|
|
27
|
-
min_p: Float,
|
|
28
|
-
model: String,
|
|
29
|
-
n: Float,
|
|
30
|
-
presence_penalty: Float,
|
|
31
|
-
response_format:
|
|
32
|
-
Telnyx::AI::ChatCompletionRequest::ResponseFormat::OrHash,
|
|
33
|
-
seed: Integer,
|
|
34
|
-
stop: Telnyx::AI::ChatCompletionRequest::Stop::Variants,
|
|
35
|
-
stream: T::Boolean,
|
|
36
|
-
temperature: Float,
|
|
37
|
-
tool_choice:
|
|
38
|
-
Telnyx::AI::ChatCompletionRequest::ToolChoice::OrSymbol,
|
|
39
|
-
tools:
|
|
40
|
-
T::Array[
|
|
41
|
-
T.any(
|
|
42
|
-
Telnyx::AI::ChatCompletionRequest::Tool::Function::OrHash,
|
|
43
|
-
Telnyx::AI::ChatCompletionRequest::Tool::Retrieval::OrHash
|
|
44
|
-
)
|
|
45
|
-
],
|
|
46
|
-
top_logprobs: Integer,
|
|
47
|
-
top_p: Float,
|
|
48
|
-
use_beam_search: T::Boolean,
|
|
49
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
50
|
-
).returns(T::Hash[Symbol, T.anything])
|
|
51
|
-
end
|
|
52
|
-
def create_completion(
|
|
53
|
-
# A list of the previous chat messages for context.
|
|
54
|
-
messages:,
|
|
55
|
-
# If you are using an external inference provider like xAI or OpenAI, this field
|
|
56
|
-
# allows you to pass along a reference to your API key. After creating an
|
|
57
|
-
# [integration secret](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
58
|
-
# for you API key, pass the secret's `identifier` in this field.
|
|
59
|
-
api_key_ref: nil,
|
|
60
|
-
# This is used with `use_beam_search` to determine how many candidate beams to
|
|
61
|
-
# explore.
|
|
62
|
-
best_of: nil,
|
|
63
|
-
# This is used with `use_beam_search`. If `true`, generation stops as soon as
|
|
64
|
-
# there are `best_of` complete candidates; if `false`, a heuristic is applied and
|
|
65
|
-
# the generation stops when is it very unlikely to find better candidates.
|
|
66
|
-
early_stopping: nil,
|
|
67
|
-
# Whether to enable the thinking/reasoning phase for models that support it (e.g.,
|
|
68
|
-
# QwQ, Qwen3). When set to false, the model will skip the internal reasoning step
|
|
69
|
-
# and respond directly, which can reduce latency. Defaults to true.
|
|
70
|
-
enable_thinking: nil,
|
|
71
|
-
# Higher values will penalize the model from repeating the same output tokens.
|
|
72
|
-
frequency_penalty: nil,
|
|
73
|
-
# If specified, the output will be exactly one of the choices.
|
|
74
|
-
guided_choice: nil,
|
|
75
|
-
# Must be a valid JSON schema. If specified, the output will follow the JSON
|
|
76
|
-
# schema.
|
|
77
|
-
guided_json: nil,
|
|
78
|
-
# If specified, the output will follow the regex pattern.
|
|
79
|
-
guided_regex: nil,
|
|
80
|
-
# This is used with `use_beam_search` to prefer shorter or longer completions.
|
|
81
|
-
length_penalty: nil,
|
|
82
|
-
# Whether to return log probabilities of the output tokens or not. If true,
|
|
83
|
-
# returns the log probabilities of each output token returned in the `content` of
|
|
84
|
-
# `message`.
|
|
85
|
-
logprobs: nil,
|
|
86
|
-
# Maximum number of completion tokens the model should generate.
|
|
87
|
-
max_tokens: nil,
|
|
88
|
-
# This is an alternative to `top_p` that
|
|
89
|
-
# [many prefer](https://github.com/huggingface/transformers/issues/27670). Must be
|
|
90
|
-
# in [0, 1].
|
|
91
|
-
min_p: nil,
|
|
92
|
-
# The language model to chat with.
|
|
93
|
-
model: nil,
|
|
94
|
-
# This will return multiple choices for you instead of a single chat completion.
|
|
95
|
-
n: nil,
|
|
96
|
-
# Higher values will penalize the model from repeating the same output tokens.
|
|
97
|
-
presence_penalty: nil,
|
|
98
|
-
# Use this is you want to guarantee a JSON output without defining a schema. For
|
|
99
|
-
# control over the schema, use `guided_json`.
|
|
100
|
-
response_format: nil,
|
|
101
|
-
# If specified, the system will make a best effort to sample deterministically,
|
|
102
|
-
# such that repeated requests with the same `seed` and parameters should return
|
|
103
|
-
# the same result.
|
|
104
|
-
seed: nil,
|
|
105
|
-
# Up to 4 sequences where the API will stop generating further tokens. The
|
|
106
|
-
# returned text will not contain the stop sequence.
|
|
107
|
-
stop: nil,
|
|
108
|
-
# Whether or not to stream data-only server-sent events as they become available.
|
|
109
|
-
stream: nil,
|
|
110
|
-
# Adjusts the "creativity" of the model. Lower values make the model more
|
|
111
|
-
# deterministic and repetitive, while higher values make the model more random and
|
|
112
|
-
# creative.
|
|
113
|
-
temperature: nil,
|
|
114
|
-
tool_choice: nil,
|
|
115
|
-
# The `function` tool type follows the same schema as the
|
|
116
|
-
# [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat).
|
|
117
|
-
# The `retrieval` tool type is unique to Telnyx. You may pass a list of
|
|
118
|
-
# [embedded storage buckets](https://developers.telnyx.com/api-reference/embeddings/embed-documents)
|
|
119
|
-
# for retrieval-augmented generation.
|
|
120
|
-
tools: nil,
|
|
121
|
-
# This is used with `logprobs`. An integer between 0 and 20 specifying the number
|
|
122
|
-
# of most likely tokens to return at each token position, each with an associated
|
|
123
|
-
# log probability.
|
|
124
|
-
top_logprobs: nil,
|
|
125
|
-
# An alternative or complement to `temperature`. This adjusts how many of the top
|
|
126
|
-
# possibilities to consider.
|
|
127
|
-
top_p: nil,
|
|
128
|
-
# Setting this to `true` will allow the model to
|
|
129
|
-
# [explore more completion options](https://huggingface.co/blog/how-to-generate#beam-search).
|
|
130
|
-
# This is not supported by OpenAI.
|
|
131
|
-
use_beam_search: nil,
|
|
132
|
-
request_options: {}
|
|
133
|
-
)
|
|
134
|
-
end
|
|
135
|
-
|
|
136
7
|
# @api private
|
|
137
8
|
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
138
9
|
def self.new(client:)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Resources
|
|
5
|
+
class AI
|
|
6
|
+
class Conversations
|
|
7
|
+
# Manage historical AI assistant conversations
|
|
8
|
+
class ConversationInsights
|
|
9
|
+
# Aggregate conversation insights by specified fields
|
|
10
|
+
sig do
|
|
11
|
+
params(
|
|
12
|
+
created_at: String,
|
|
13
|
+
group_by: T::Array[String],
|
|
14
|
+
insight_id: String,
|
|
15
|
+
metadata:
|
|
16
|
+
Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata::OrHash,
|
|
17
|
+
show: T::Array[String],
|
|
18
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
19
|
+
).returns(
|
|
20
|
+
Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
def retrieve_aggregates(
|
|
24
|
+
# Filter by creation datetime to scope the aggregation window. Supports range
|
|
25
|
+
# operators (e.g., `created_at=gte.2025-01-01T00:00:00Z` for the start of the
|
|
26
|
+
# range, `created_at=lt.2025-01-02T00:00:00Z` for the end). To build per-day time
|
|
27
|
+
# series (as the portal does for the 'Insights Over Time' chart), issue one
|
|
28
|
+
# request per day bounded by `created_at=gte.<day_start>` and
|
|
29
|
+
# `created_at=lt.<next_day_start>`.
|
|
30
|
+
created_at: nil,
|
|
31
|
+
# Fields to group by (can be comma-separated or multiple parameters). Prefix a
|
|
32
|
+
# field with 'metadata.' (e.g. 'metadata.assistant_id') to group by the
|
|
33
|
+
# conversation's metadata instead of the insight result.
|
|
34
|
+
#
|
|
35
|
+
# Common fields used for over-time charts:
|
|
36
|
+
#
|
|
37
|
+
# - `score` — Group by the insight's score value (e.g. for Agent Instruction
|
|
38
|
+
# Following, User Satisfaction).
|
|
39
|
+
# - `metadata.assistant_id` — Group by the assistant that handled the
|
|
40
|
+
# conversation.
|
|
41
|
+
# - `metadata.assistant_version_id` — Group by the assistant version, useful for
|
|
42
|
+
# comparing performance across versions in the portal's 'Insights Over Time'
|
|
43
|
+
# chart.
|
|
44
|
+
# - `metadata.telnyx_conversation_channel` — Group by conversation channel
|
|
45
|
+
# (phone_call, web_chat, etc.).
|
|
46
|
+
group_by: nil,
|
|
47
|
+
# Optional insight ID to filter conversation insights. Only insights matching this
|
|
48
|
+
# ID will be included in the aggregation.
|
|
49
|
+
insight_id: nil,
|
|
50
|
+
metadata: nil,
|
|
51
|
+
# Fields to include in the result (can be comma-separated or multiple parameters).
|
|
52
|
+
# Supports the same 'metadata.<key>' prefix as group_by. Each returned row will
|
|
53
|
+
# contain the grouped field values plus a `record_count` indicating how many
|
|
54
|
+
# conversation insights match that combination.
|
|
55
|
+
show: nil,
|
|
56
|
+
request_options: {}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# @api private
|
|
61
|
+
sig { params(client: Telnyx::Client).returns(T.attached_class) }
|
|
62
|
+
def self.new(client:)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -17,6 +17,12 @@ module Telnyx
|
|
|
17
17
|
sig { returns(Telnyx::Resources::AI::Conversations::Messages) }
|
|
18
18
|
attr_reader :messages
|
|
19
19
|
|
|
20
|
+
# Manage historical AI assistant conversations
|
|
21
|
+
sig do
|
|
22
|
+
returns(Telnyx::Resources::AI::Conversations::ConversationInsights)
|
|
23
|
+
end
|
|
24
|
+
attr_reader :conversation_insights
|
|
25
|
+
|
|
20
26
|
# Create a new AI Conversation.
|
|
21
27
|
sig do
|
|
22
28
|
params(
|
|
@@ -10,9 +10,11 @@ module Telnyx
|
|
|
10
10
|
params(
|
|
11
11
|
display_name: String,
|
|
12
12
|
type: String,
|
|
13
|
+
client_side_tool: T::Hash[Symbol, T.anything],
|
|
13
14
|
function: T::Hash[Symbol, T.anything],
|
|
14
15
|
handoff: T::Hash[Symbol, T.anything],
|
|
15
16
|
invite: T::Hash[Symbol, T.anything],
|
|
17
|
+
pay: Telnyx::AI::PayToolParams::OrHash,
|
|
16
18
|
retrieval: T::Hash[Symbol, T.anything],
|
|
17
19
|
timeout_ms: Integer,
|
|
18
20
|
webhook: T::Hash[Symbol, T.anything],
|
|
@@ -22,9 +24,11 @@ module Telnyx
|
|
|
22
24
|
def create(
|
|
23
25
|
display_name:,
|
|
24
26
|
type:,
|
|
27
|
+
client_side_tool: nil,
|
|
25
28
|
function: nil,
|
|
26
29
|
handoff: nil,
|
|
27
30
|
invite: nil,
|
|
31
|
+
pay: nil,
|
|
28
32
|
retrieval: nil,
|
|
29
33
|
timeout_ms: nil,
|
|
30
34
|
webhook: nil,
|
|
@@ -50,10 +54,12 @@ module Telnyx
|
|
|
50
54
|
sig do
|
|
51
55
|
params(
|
|
52
56
|
tool_id: String,
|
|
57
|
+
client_side_tool: T::Hash[Symbol, T.anything],
|
|
53
58
|
display_name: String,
|
|
54
59
|
function: T::Hash[Symbol, T.anything],
|
|
55
60
|
handoff: T::Hash[Symbol, T.anything],
|
|
56
61
|
invite: T::Hash[Symbol, T.anything],
|
|
62
|
+
pay: Telnyx::AI::PayToolParams::OrHash,
|
|
57
63
|
retrieval: T::Hash[Symbol, T.anything],
|
|
58
64
|
timeout_ms: Integer,
|
|
59
65
|
type: String,
|
|
@@ -64,10 +70,12 @@ module Telnyx
|
|
|
64
70
|
def update(
|
|
65
71
|
# Unique identifier of the tool.
|
|
66
72
|
tool_id,
|
|
73
|
+
client_side_tool: nil,
|
|
67
74
|
display_name: nil,
|
|
68
75
|
function: nil,
|
|
69
76
|
handoff: nil,
|
|
70
77
|
invite: nil,
|
|
78
|
+
pay: nil,
|
|
71
79
|
retrieval: nil,
|
|
72
80
|
timeout_ms: nil,
|
|
73
81
|
type: nil,
|
data/rbi/telnyx/resources/ai.rbi
CHANGED
|
@@ -10,7 +10,6 @@ module Telnyx
|
|
|
10
10
|
sig { returns(Telnyx::Resources::AI::Audio) }
|
|
11
11
|
attr_reader :audio
|
|
12
12
|
|
|
13
|
-
# Generate text with LLMs
|
|
14
13
|
sig { returns(Telnyx::Resources::AI::Chat) }
|
|
15
14
|
attr_reader :chat
|
|
16
15
|
|
|
@@ -45,20 +44,8 @@ module Telnyx
|
|
|
45
44
|
sig { returns(Telnyx::Resources::AI::Tools) }
|
|
46
45
|
attr_reader :tools
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# [OpenAI Responses API](https://developers.openai.com/api/reference/responses/overview)
|
|
51
|
-
# and may be used with the OpenAI JS or Python SDK. Response id parameter is not
|
|
52
|
-
# supported at the moment. Use the `conversation` parameter with a Telnyx
|
|
53
|
-
# Conversation ID to leverage persistent conversations.
|
|
54
|
-
sig do
|
|
55
|
-
params(
|
|
56
|
-
response_request: T::Hash[Symbol, T.anything],
|
|
57
|
-
request_options: Telnyx::RequestOptions::OrHash
|
|
58
|
-
).returns(T::Hash[Symbol, T.anything])
|
|
59
|
-
end
|
|
60
|
-
def create_response_deprecated(response_request:, request_options: {})
|
|
61
|
-
end
|
|
47
|
+
sig { returns(Telnyx::Resources::AI::Anthropic) }
|
|
48
|
+
attr_reader :anthropic
|
|
62
49
|
|
|
63
50
|
# Performs semantic vector search across conversation history records.
|
|
64
51
|
#
|
|
@@ -171,23 +158,6 @@ module Telnyx
|
|
|
171
158
|
)
|
|
172
159
|
end
|
|
173
160
|
|
|
174
|
-
# **Deprecated**: Use `GET /v2/ai/openai/models` instead.
|
|
175
|
-
#
|
|
176
|
-
# Returns the same `ModelsResponse` payload as the OpenAI-compatible endpoint —
|
|
177
|
-
# open-source LLMs hosted on Telnyx (e.g. `moonshotai/Kimi-K2.6`,
|
|
178
|
-
# `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`), embedding models, and
|
|
179
|
-
# fine-tuned models — kept around for backwards compatibility. New integrations
|
|
180
|
-
# should use `/v2/ai/openai/models`.
|
|
181
|
-
#
|
|
182
|
-
# Model ids follow the `{organization}/{model_name}` convention from Hugging Face.
|
|
183
|
-
sig do
|
|
184
|
-
params(request_options: Telnyx::RequestOptions::OrHash).returns(
|
|
185
|
-
Telnyx::ModelsResponse
|
|
186
|
-
)
|
|
187
|
-
end
|
|
188
|
-
def retrieve_models(request_options: {})
|
|
189
|
-
end
|
|
190
|
-
|
|
191
161
|
# Generate a summary of a file's contents.
|
|
192
162
|
#
|
|
193
163
|
# Supports the following text formats:
|
|
@@ -537,6 +537,9 @@ module Telnyx
|
|
|
537
537
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
538
538
|
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
539
539
|
# `Max`, `TTS2`.
|
|
540
|
+
# - **Fish Audio:** Use `FishAudio.<ModelId>.<VoiceId>` (e.g.,
|
|
541
|
+
# `FishAudio.s2.1-pro.<reference_id>`). Supported models: `s2.1-pro`, `s2-pro`,
|
|
542
|
+
# `s1`. `VoiceId` is a Fish Voice-Library reference ID.
|
|
540
543
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
541
544
|
# `ara`, `rex`, `sal`, `leo`.
|
|
542
545
|
voice: nil,
|
|
@@ -709,6 +712,9 @@ module Telnyx
|
|
|
709
712
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
710
713
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>` (e.g., `Telnyx.KokoroTTS.af`).
|
|
711
714
|
# Use `voice_settings` to configure voice_speed and other synthesis parameters.
|
|
715
|
+
# `Bayan` provides Arabic (multiple dialects) and English voices (e.g.,
|
|
716
|
+
# `Telnyx.Bayan.Ahmed`, `Telnyx.Bayan.Amanda`). `Sukhan` provides Urdu voices
|
|
717
|
+
# (e.g., `Telnyx.Sukhan.urdu-professor`); `voice_speed` is not supported.
|
|
712
718
|
# - **Minimax:** Use `Minimax.<ModelId>.<VoiceId>` (e.g.,
|
|
713
719
|
# `Minimax.speech-02-hd.Wise_Woman`). Supported models: `speech-02-turbo`,
|
|
714
720
|
# `speech-02-hd`, `speech-2.6-turbo`, `speech-2.8-turbo`. Use `voice_settings`
|
|
@@ -723,6 +729,9 @@ module Telnyx
|
|
|
723
729
|
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
724
730
|
# `Max`, `TTS2`. Use `voice_settings` to configure `delivery_mode` (`STABLE`,
|
|
725
731
|
# `BALANCED`, `CREATIVE`), supported by `TTS2` only.
|
|
732
|
+
# - **Fish Audio:** Use `FishAudio.<ModelId>.<VoiceId>` (e.g.,
|
|
733
|
+
# `FishAudio.s2.1-pro.<reference_id>`). Supported models: `s2.1-pro`, `s2-pro`,
|
|
734
|
+
# `s1`. `VoiceId` is a Fish Voice-Library reference ID.
|
|
726
735
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
727
736
|
# `ara`, `rex`, `sal`, `leo`.
|
|
728
737
|
#
|
|
@@ -1123,6 +1132,9 @@ module Telnyx
|
|
|
1123
1132
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
1124
1133
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>` (e.g., `Telnyx.KokoroTTS.af`).
|
|
1125
1134
|
# Use `voice_settings` to configure voice_speed and other synthesis parameters.
|
|
1135
|
+
# `Bayan` provides Arabic (multiple dialects) and English voices (e.g.,
|
|
1136
|
+
# `Telnyx.Bayan.Ahmed`, `Telnyx.Bayan.Amanda`). `Sukhan` provides Urdu voices
|
|
1137
|
+
# (e.g., `Telnyx.Sukhan.urdu-professor`); `voice_speed` is not supported.
|
|
1126
1138
|
# - **Minimax:** Use `Minimax.<ModelId>.<VoiceId>` (e.g.,
|
|
1127
1139
|
# `Minimax.speech-02-hd.Wise_Woman`). Supported models: `speech-02-turbo`,
|
|
1128
1140
|
# `speech-02-hd`, `speech-2.6-turbo`, `speech-2.8-turbo`. Use `voice_settings`
|
|
@@ -1137,6 +1149,9 @@ module Telnyx
|
|
|
1137
1149
|
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
1138
1150
|
# `Max`, `TTS2`. Use `voice_settings` to configure `delivery_mode` (`STABLE`,
|
|
1139
1151
|
# `BALANCED`, `CREATIVE`), supported by `TTS2` only.
|
|
1152
|
+
# - **Fish Audio:** Use `FishAudio.<ModelId>.<VoiceId>` (e.g.,
|
|
1153
|
+
# `FishAudio.s2.1-pro.<reference_id>`). Supported models: `s2.1-pro`, `s2-pro`,
|
|
1154
|
+
# `s1`. `VoiceId` is a Fish Voice-Library reference ID.
|
|
1140
1155
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1141
1156
|
# `ara`, `rex`, `sal`, `leo`.
|
|
1142
1157
|
#
|
|
@@ -1273,6 +1288,9 @@ module Telnyx
|
|
|
1273
1288
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
1274
1289
|
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
1275
1290
|
# `Max`, `TTS2`.
|
|
1291
|
+
# - **Fish Audio:** Use `FishAudio.<ModelId>.<VoiceId>` (e.g.,
|
|
1292
|
+
# `FishAudio.s2.1-pro.<reference_id>`). Supported models: `s2.1-pro`, `s2-pro`,
|
|
1293
|
+
# `s1`. `VoiceId` is a Fish Voice-Library reference ID.
|
|
1276
1294
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1277
1295
|
# `ara`, `rex`, `sal`, `leo`.
|
|
1278
1296
|
voice: nil,
|
|
@@ -1434,6 +1452,9 @@ module Telnyx
|
|
|
1434
1452
|
# - **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
|
|
1435
1453
|
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
1436
1454
|
# `Max`, `TTS2`.
|
|
1455
|
+
# - **Fish Audio:** Use `FishAudio.<ModelId>.<VoiceId>` (e.g.,
|
|
1456
|
+
# `FishAudio.s2.1-pro.<reference_id>`). Supported models: `s2.1-pro`, `s2-pro`,
|
|
1457
|
+
# `s1`. `VoiceId` is a Fish Voice-Library reference ID.
|
|
1437
1458
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
1438
1459
|
# `ara`, `rex`, `sal`, `leo`.
|
|
1439
1460
|
voice: nil,
|
|
@@ -70,6 +70,7 @@ module Telnyx
|
|
|
70
70
|
record_timeout_secs: Integer,
|
|
71
71
|
record_track: Telnyx::CallDialParams::RecordTrack::OrSymbol,
|
|
72
72
|
record_trim: Telnyx::CallDialParams::RecordTrim::OrSymbol,
|
|
73
|
+
retry_on_timeout: T::Boolean,
|
|
73
74
|
send_digits_on_answer: String,
|
|
74
75
|
send_silence_when_idle: T::Boolean,
|
|
75
76
|
sip_auth_password: String,
|
|
@@ -257,6 +258,12 @@ module Telnyx
|
|
|
257
258
|
# When set to `trim-silence`, silence will be removed from the beginning and end
|
|
258
259
|
# of the recording.
|
|
259
260
|
record_trim: nil,
|
|
261
|
+
# Whether to keep trying the remaining routing paths (e.g. alternate
|
|
262
|
+
# providers/gateways) for the same destination after `timeout_secs` is reached for
|
|
263
|
+
# the current attempt. When set to `false`, reaching `timeout_secs` aborts the
|
|
264
|
+
# entire dial attempt and the `call.hangup` webhook reports a `hangup_cause` of
|
|
265
|
+
# `no_answer` instead of `timeout`.
|
|
266
|
+
retry_on_timeout: nil,
|
|
260
267
|
# DTMF digits to send automatically after the called party answers. Useful for
|
|
261
268
|
# reaching an extension behind an IVR (e.g. `"200"` to dial extension 200 once the
|
|
262
269
|
# called party picks up). Allowed characters: `0-9`, `A-D`, `w` (0.5s pause), `W`
|
|
@@ -568,6 +568,9 @@ module Telnyx
|
|
|
568
568
|
# [available voices](https://elevenlabs.io/docs/api-reference/get-voices).
|
|
569
569
|
# - **Telnyx:** Use `Telnyx.<model_id>.<voice_id>` (e.g., `Telnyx.KokoroTTS.af`).
|
|
570
570
|
# Use `voice_settings` to configure voice_speed and other synthesis parameters.
|
|
571
|
+
# `Bayan` provides Arabic (multiple dialects) and English voices (e.g.,
|
|
572
|
+
# `Telnyx.Bayan.Ahmed`, `Telnyx.Bayan.Amanda`). `Sukhan` provides Urdu voices
|
|
573
|
+
# (e.g., `Telnyx.Sukhan.urdu-professor`); `voice_speed` is not supported.
|
|
571
574
|
# - **Minimax:** Use `Minimax.<ModelId>.<VoiceId>` (e.g.,
|
|
572
575
|
# `Minimax.speech-02-hd.Wise_Woman`). Supported models: `speech-02-turbo`,
|
|
573
576
|
# `speech-02-hd`, `speech-2.6-turbo`, `speech-2.8-turbo`. Use `voice_settings`
|
|
@@ -582,6 +585,9 @@ module Telnyx
|
|
|
582
585
|
# `Inworld.Max.Oliver`, `Inworld.TTS2.Loretta`). Supported models: `Mini`,
|
|
583
586
|
# `Max`, `TTS2`. Use `voice_settings` to configure `delivery_mode` (`STABLE`,
|
|
584
587
|
# `BALANCED`, `CREATIVE`), supported by `TTS2` only.
|
|
588
|
+
# - **Fish Audio:** Use `FishAudio.<ModelId>.<VoiceId>` (e.g.,
|
|
589
|
+
# `FishAudio.s2.1-pro.<reference_id>`). Supported models: `s2.1-pro`, `s2-pro`,
|
|
590
|
+
# `s1`. `VoiceId` is a Fish Voice-Library reference ID.
|
|
585
591
|
# - **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
|
|
586
592
|
# `ara`, `rex`, `sal`, `leo`.
|
|
587
593
|
#
|
|
@@ -100,7 +100,7 @@ module Telnyx
|
|
|
100
100
|
def list(
|
|
101
101
|
# Consolidated filter parameter (deepObject style). Originally:
|
|
102
102
|
# filter[email][contains], filter[email][eq], filter[organization_name][contains],
|
|
103
|
-
# filter[organization_name][eq]
|
|
103
|
+
# filter[organization_name][eq], filter[status][eq]
|
|
104
104
|
filter: nil,
|
|
105
105
|
# Specifies if cancelled accounts should be included in the results.
|
|
106
106
|
include_cancelled_accounts: nil,
|