telnyx 5.166.0 → 5.168.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 +19 -0
- data/README.md +1 -1
- data/lib/telnyx/client.rb +4 -0
- data/lib/telnyx/internal/default_flat_pagination.rb +7 -3
- data/lib/telnyx/internal/default_flat_pagination_for_inexplicit_number_orders.rb +7 -3
- data/lib/telnyx/internal/default_flat_pagination_top_level_array.rb +10 -8
- data/lib/telnyx/internal/default_pagination_for_log_messages.rb +7 -3
- data/lib/telnyx/internal/default_pagination_for_messaging_tollfree.rb +12 -3
- data/lib/telnyx/internal/default_pagination_for_queues.rb +12 -3
- data/lib/telnyx/internal/per_page_pagination.rb +8 -1
- data/lib/telnyx/internal/per_page_pagination_v2.rb +8 -1
- data/lib/telnyx/internal/type/converter.rb +2 -0
- data/lib/telnyx/models/ai/anthropic/v1_messages_params.rb +57 -1
- data/lib/telnyx/models/ai/assistant_a2_a_agent.rb +195 -0
- data/lib/telnyx/models/ai/assistant_create_params.rb +16 -1
- data/lib/telnyx/models/ai/assistant_update_params.rb +17 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +17 -1
- data/lib/telnyx/models/ai/chat_completion_request.rb +185 -48
- data/lib/telnyx/models/ai/inference_embedding.rb +16 -1
- data/lib/telnyx/models/ai/openai_create_response_params.rb +57 -1
- data/lib/telnyx/models/ai/telephony_settings.rb +15 -1
- data/lib/telnyx/models/compute/func_retrieve_logs_params.rb +66 -0
- data/lib/telnyx/models/compute/func_retrieve_logs_response.rb +161 -0
- data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_params.rb +69 -0
- data/lib/telnyx/models/compute/func_retrieve_metric_aggregates_response.rb +137 -0
- data/lib/telnyx/models/compute/func_retrieve_revisions_params.rb +34 -0
- data/lib/telnyx/models/compute/func_retrieve_revisions_response.rb +101 -0
- data/lib/telnyx/models/compute/func_retrieve_ship_inspection_params.rb +22 -0
- data/lib/telnyx/models/compute/func_retrieve_ship_inspection_response.rb +94 -0
- data/lib/telnyx/models/compute/functions_observability_pagination_meta.rb +35 -0
- data/lib/telnyx/models/compute/logs_meta.rb +23 -0
- data/lib/telnyx/models/credential_connection.rb +4 -1
- data/lib/telnyx/models/email_inboxes/email_message.rb +12 -1
- data/lib/telnyx/models/email_message_batch_params.rb +4 -1
- data/lib/telnyx/models/email_message_batch_response.rb +1 -0
- data/lib/telnyx/models/fqdn_connection.rb +5 -2
- data/lib/telnyx/models/fqdn_connections/fqdn_authentication.rb +9 -2
- data/lib/telnyx/models/messaging_inbound_message_payload.rb +210 -67
- data/lib/telnyx/models/messaging_messaging_profile.rb +284 -0
- data/lib/telnyx/models/messaging_profile.rb +0 -1
- data/lib/telnyx/models/messaging_profile_create_params.rb +11 -1
- data/lib/telnyx/models/messaging_profile_create_response.rb +3 -3
- data/lib/telnyx/models/messaging_profile_delete_response.rb +3 -3
- data/lib/telnyx/models/messaging_profile_features.rb +26 -0
- data/lib/telnyx/models/messaging_profile_retrieve_response.rb +3 -3
- data/lib/telnyx/models/messaging_profile_update_params.rb +32 -1
- data/lib/telnyx/models/messaging_profile_update_response.rb +3 -3
- data/lib/telnyx/models/messaging_profiles/action_regenerate_secret_response.rb +3 -3
- data/lib/telnyx/models/uac_connection.rb +4 -1
- data/lib/telnyx/models/uac_external_settings.rb +6 -2
- data/lib/telnyx/models/unsafe_unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/unwrap_webhook_event.rb +5 -1
- data/lib/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rb +104 -1
- data/lib/telnyx/models/whatsapp/phone_number_get_response.rb +103 -1
- data/lib/telnyx/models/whatsapp/phone_number_list_response.rb +103 -1
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rb +22 -0
- data/lib/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rb +207 -0
- data/lib/telnyx/models/whatsapp_account_update.rb +112 -0
- data/lib/telnyx/models/whatsapp_message_echo.rb +340 -0
- data/lib/telnyx/models/x402/credit_account/payment_list_params.rb +34 -0
- data/lib/telnyx/models/x402/credit_account/payment_retrieve_params.rb +24 -0
- data/lib/telnyx/models/x402/credit_account/payment_retrieve_response.rb +21 -0
- data/lib/telnyx/models/x402/credit_account/x402_transaction_record.rb +113 -0
- data/lib/telnyx/models.rb +10 -0
- data/lib/telnyx/resources/ai/anthropic/v1.rb +5 -1
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -1
- data/lib/telnyx/resources/ai/assistants.rb +6 -2
- data/lib/telnyx/resources/ai/openai/chat.rb +6 -8
- data/lib/telnyx/resources/ai/openai.rb +5 -1
- data/lib/telnyx/resources/compute/funcs.rb +141 -0
- data/lib/telnyx/resources/compute.rb +18 -0
- data/lib/telnyx/resources/email_messages.rb +4 -2
- data/lib/telnyx/resources/messaging_profiles.rb +12 -4
- data/lib/telnyx/resources/webhooks.rb +2 -2
- data/lib/telnyx/resources/whatsapp/phone_numbers.rb +22 -0
- data/lib/telnyx/resources/x402/credit_account/payments.rb +71 -0
- data/lib/telnyx/resources/x402/credit_account.rb +8 -2
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +24 -0
- data/rbi/telnyx/client.rbi +3 -0
- data/rbi/telnyx/models/ai/anthropic/v1_messages_params.rbi +139 -0
- data/rbi/telnyx/models/ai/assistant_a2_a_agent.rbi +345 -0
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +29 -0
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +31 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +31 -0
- data/rbi/telnyx/models/ai/chat_completion_request.rbi +339 -91
- data/rbi/telnyx/models/ai/inference_embedding.rbi +29 -0
- data/rbi/telnyx/models/ai/openai_create_response_params.rbi +136 -0
- data/rbi/telnyx/models/ai/telephony_settings.rbi +23 -0
- data/rbi/telnyx/models/compute/func_retrieve_logs_params.rbi +130 -0
- data/rbi/telnyx/models/compute/func_retrieve_logs_response.rbi +410 -0
- data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbi +102 -0
- data/rbi/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbi +231 -0
- data/rbi/telnyx/models/compute/func_retrieve_revisions_params.rbi +59 -0
- data/rbi/telnyx/models/compute/func_retrieve_revisions_response.rbi +213 -0
- data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_params.rbi +40 -0
- data/rbi/telnyx/models/compute/func_retrieve_ship_inspection_response.rbi +252 -0
- data/rbi/telnyx/models/compute/functions_observability_pagination_meta.rbi +70 -0
- data/rbi/telnyx/models/compute/logs_meta.rbi +38 -0
- data/rbi/telnyx/models/credential_connection.rbi +8 -2
- data/rbi/telnyx/models/email_inboxes/email_message.rbi +22 -3
- data/rbi/telnyx/models/email_message_batch_params.rbi +6 -0
- data/rbi/telnyx/models/email_message_batch_response.rbi +5 -0
- data/rbi/telnyx/models/fqdn_connection.rbi +8 -2
- data/rbi/telnyx/models/fqdn_connections/fqdn_authentication.rbi +8 -2
- data/rbi/telnyx/models/messaging_inbound_message_payload.rbi +450 -193
- data/rbi/telnyx/models/messaging_messaging_profile.rbi +463 -0
- data/rbi/telnyx/models/messaging_profile.rbi +4 -6
- data/rbi/telnyx/models/messaging_profile_create_params.rbi +19 -0
- data/rbi/telnyx/models/messaging_profile_create_response.rbi +6 -4
- data/rbi/telnyx/models/messaging_profile_delete_response.rbi +6 -4
- data/rbi/telnyx/models/messaging_profile_features.rbi +43 -0
- data/rbi/telnyx/models/messaging_profile_retrieve_response.rbi +6 -4
- data/rbi/telnyx/models/messaging_profile_update_params.rbi +51 -0
- data/rbi/telnyx/models/messaging_profile_update_response.rbi +6 -4
- data/rbi/telnyx/models/messaging_profiles/action_regenerate_secret_response.rbi +4 -4
- data/rbi/telnyx/models/uac_connection.rbi +8 -2
- data/rbi/telnyx/models/uac_external_settings.rbi +10 -2
- data/rbi/telnyx/models/unsafe_unwrap_webhook_event.rbi +3 -1
- data/rbi/telnyx/models/unwrap_webhook_event.rbi +3 -1
- data/rbi/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_get_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_list_response.rbi +213 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbi +40 -0
- data/rbi/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbi +401 -0
- data/rbi/telnyx/models/whatsapp_account_update.rbi +236 -0
- data/rbi/telnyx/models/whatsapp_message_echo.rbi +611 -0
- data/rbi/telnyx/models/x402/credit_account/payment_list_params.rbi +64 -0
- data/rbi/telnyx/models/x402/credit_account/payment_retrieve_params.rbi +42 -0
- data/rbi/telnyx/models/x402/credit_account/payment_retrieve_response.rbi +53 -0
- data/rbi/telnyx/models/x402/credit_account/x402_transaction_record.rbi +219 -0
- data/rbi/telnyx/models.rbi +10 -0
- data/rbi/telnyx/resources/ai/anthropic/v1.rbi +14 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +12 -0
- data/rbi/telnyx/resources/ai/assistants.rbi +21 -0
- data/rbi/telnyx/resources/ai/openai/chat.rbi +23 -13
- data/rbi/telnyx/resources/ai/openai.rbi +14 -0
- data/rbi/telnyx/resources/compute/funcs.rbi +111 -0
- data/rbi/telnyx/resources/compute.rbi +15 -0
- data/rbi/telnyx/resources/email_messages.rbi +6 -2
- data/rbi/telnyx/resources/messaging_profiles.rbi +24 -1
- data/rbi/telnyx/resources/webhooks.rbi +6 -2
- data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +18 -0
- data/rbi/telnyx/resources/x402/credit_account/payments.rbi +60 -0
- data/rbi/telnyx/resources/x402/credit_account.rbi +5 -0
- data/sig/telnyx/client.rbs +2 -0
- data/sig/telnyx/models/ai/anthropic/v1_messages_params.rbs +42 -0
- data/sig/telnyx/models/ai/assistant_a2_a_agent.rbs +140 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +9 -0
- data/sig/telnyx/models/ai/assistant_update_params.rbs +9 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +9 -0
- data/sig/telnyx/models/ai/chat_completion_request.rbs +128 -44
- data/sig/telnyx/models/ai/inference_embedding.rbs +9 -0
- data/sig/telnyx/models/ai/openai_create_response_params.rbs +42 -0
- data/sig/telnyx/models/ai/telephony_settings.rbs +7 -0
- data/sig/telnyx/models/compute/func_retrieve_logs_params.rbs +69 -0
- data/sig/telnyx/models/compute/func_retrieve_logs_response.rbs +210 -0
- data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_params.rbs +66 -0
- data/sig/telnyx/models/compute/func_retrieve_metric_aggregates_response.rbs +149 -0
- data/sig/telnyx/models/compute/func_retrieve_revisions_params.rbs +38 -0
- data/sig/telnyx/models/compute/func_retrieve_revisions_response.rbs +131 -0
- data/sig/telnyx/models/compute/func_retrieve_ship_inspection_params.rbs +22 -0
- data/sig/telnyx/models/compute/func_retrieve_ship_inspection_response.rbs +117 -0
- data/sig/telnyx/models/compute/functions_observability_pagination_meta.rbs +45 -0
- data/sig/telnyx/models/compute/logs_meta.rbs +21 -0
- data/sig/telnyx/models/email_inboxes/email_message.rbs +12 -3
- data/sig/telnyx/models/email_message_batch_response.rbs +2 -0
- data/sig/telnyx/models/messaging_inbound_message_payload.rbs +207 -95
- data/sig/telnyx/models/messaging_messaging_profile.rbs +212 -0
- data/sig/telnyx/models/messaging_profile_create_params.rbs +5 -0
- data/sig/telnyx/models/messaging_profile_create_response.rbs +8 -5
- data/sig/telnyx/models/messaging_profile_delete_response.rbs +8 -5
- data/sig/telnyx/models/messaging_profile_features.rbs +15 -0
- data/sig/telnyx/models/messaging_profile_retrieve_response.rbs +7 -5
- data/sig/telnyx/models/messaging_profile_update_params.rbs +19 -0
- data/sig/telnyx/models/messaging_profile_update_response.rbs +8 -5
- data/sig/telnyx/models/messaging_profiles/action_regenerate_secret_response.rbs +7 -5
- data/sig/telnyx/models/unsafe_unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models/unwrap_webhook_event.rbs +2 -0
- data/sig/telnyx/models/whatsapp/business_accounts/phone_number_list_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_get_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_list_response.rbs +90 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_params.rbs +25 -0
- data/sig/telnyx/models/whatsapp/phone_number_retrieve_phone_number_response.rbs +201 -0
- data/sig/telnyx/models/whatsapp_account_update.rbs +107 -0
- data/sig/telnyx/models/whatsapp_message_echo.rbs +291 -0
- data/sig/telnyx/models/x402/credit_account/payment_list_params.rbs +36 -0
- data/sig/telnyx/models/x402/credit_account/payment_retrieve_params.rbs +27 -0
- data/sig/telnyx/models/x402/credit_account/payment_retrieve_response.rbs +26 -0
- data/sig/telnyx/models/x402/credit_account/x402_transaction_record.rbs +104 -0
- data/sig/telnyx/models.rbs +10 -0
- data/sig/telnyx/resources/ai/anthropic/v1.rbs +2 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +1 -0
- data/sig/telnyx/resources/ai/assistants.rbs +2 -0
- data/sig/telnyx/resources/ai/openai/chat.rbs +3 -4
- data/sig/telnyx/resources/ai/openai.rbs +2 -0
- data/sig/telnyx/resources/compute/funcs.rbs +41 -0
- data/sig/telnyx/resources/compute.rbs +9 -0
- data/sig/telnyx/resources/messaging_profiles.rbs +5 -1
- data/sig/telnyx/resources/webhooks.rbs +6 -2
- data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +5 -0
- data/sig/telnyx/resources/x402/credit_account/payments.rbs +22 -0
- data/sig/telnyx/resources/x402/credit_account.rbs +2 -0
- metadata +74 -2
|
@@ -31,6 +31,24 @@ module Telnyx
|
|
|
31
31
|
sig { returns(String) }
|
|
32
32
|
attr_accessor :name
|
|
33
33
|
|
|
34
|
+
# A2A agents this assistant can delegate to. Tools are not stored here: at the
|
|
35
|
+
# start of every conversation each agent's card is fetched and one tool is derived
|
|
36
|
+
# per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
|
|
37
|
+
# limits are not enforced when the assistant is saved, and anything past them is
|
|
38
|
+
# dropped when the conversation starts: 64 agents per assistant, 64 skills per
|
|
39
|
+
# card, 128 derived tools per assistant, and a 6 second budget for all card
|
|
40
|
+
# fetches combined. An agent whose card cannot be fetched costs the assistant that
|
|
41
|
+
# capability for the conversation; it does not fail the call.
|
|
42
|
+
sig { returns(T.nilable(T::Array[Telnyx::AI::AssistantA2AAgent])) }
|
|
43
|
+
attr_reader :a2a_agents
|
|
44
|
+
|
|
45
|
+
sig do
|
|
46
|
+
params(
|
|
47
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash]
|
|
48
|
+
).void
|
|
49
|
+
end
|
|
50
|
+
attr_writer :a2a_agents
|
|
51
|
+
|
|
34
52
|
# Conversation flow as returned by the API.
|
|
35
53
|
sig { returns(T.nilable(Telnyx::AI::ConversationFlow)) }
|
|
36
54
|
attr_reader :conversation_flow
|
|
@@ -332,6 +350,7 @@ module Telnyx
|
|
|
332
350
|
instructions: String,
|
|
333
351
|
model: String,
|
|
334
352
|
name: String,
|
|
353
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent::OrHash],
|
|
335
354
|
conversation_flow: Telnyx::AI::ConversationFlow::OrHash,
|
|
336
355
|
description: String,
|
|
337
356
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
@@ -395,6 +414,15 @@ module Telnyx
|
|
|
395
414
|
# provided, Telnyx applies the default model.
|
|
396
415
|
model:,
|
|
397
416
|
name:,
|
|
417
|
+
# A2A agents this assistant can delegate to. Tools are not stored here: at the
|
|
418
|
+
# start of every conversation each agent's card is fetched and one tool is derived
|
|
419
|
+
# per skill the card advertises, named `a2a_<name>_<skill_id>`. The following
|
|
420
|
+
# limits are not enforced when the assistant is saved, and anything past them is
|
|
421
|
+
# dropped when the conversation starts: 64 agents per assistant, 64 skills per
|
|
422
|
+
# card, 128 derived tools per assistant, and a 6 second budget for all card
|
|
423
|
+
# fetches combined. An agent whose card cannot be fetched costs the assistant that
|
|
424
|
+
# capability for the conversation; it does not fail the call.
|
|
425
|
+
a2a_agents: nil,
|
|
398
426
|
# Conversation flow as returned by the API.
|
|
399
427
|
conversation_flow: nil,
|
|
400
428
|
description: nil,
|
|
@@ -490,6 +518,7 @@ module Telnyx
|
|
|
490
518
|
instructions: String,
|
|
491
519
|
model: String,
|
|
492
520
|
name: String,
|
|
521
|
+
a2a_agents: T::Array[Telnyx::AI::AssistantA2AAgent],
|
|
493
522
|
conversation_flow: Telnyx::AI::ConversationFlow,
|
|
494
523
|
description: String,
|
|
495
524
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
@@ -41,6 +41,25 @@ module Telnyx
|
|
|
41
41
|
sig { params(instructions: String).void }
|
|
42
42
|
attr_writer :instructions
|
|
43
43
|
|
|
44
|
+
# How strictly `region` is applied. `preferred` (the default when `region` is set)
|
|
45
|
+
# tries that region first and falls back to another when the model cannot be
|
|
46
|
+
# served there, so a request that would have succeeded still succeeds. `strict`
|
|
47
|
+
# pins the request: it is served from that region or it fails with a 422, never
|
|
48
|
+
# redirected to another region. Requires `region`.
|
|
49
|
+
sig do
|
|
50
|
+
returns(
|
|
51
|
+
T.nilable(Telnyx::AI::OpenAICreateResponseParams::Mode::OrSymbol)
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
attr_reader :mode
|
|
55
|
+
|
|
56
|
+
sig do
|
|
57
|
+
params(
|
|
58
|
+
mode: Telnyx::AI::OpenAICreateResponseParams::Mode::OrSymbol
|
|
59
|
+
).void
|
|
60
|
+
end
|
|
61
|
+
attr_writer :mode
|
|
62
|
+
|
|
44
63
|
# Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
|
|
45
64
|
# another model available from the Telnyx OpenAI-compatible models endpoint.
|
|
46
65
|
sig { returns(T.nilable(String)) }
|
|
@@ -61,6 +80,25 @@ module Telnyx
|
|
|
61
80
|
end
|
|
62
81
|
attr_writer :reasoning
|
|
63
82
|
|
|
83
|
+
# Optional data-residency region the request should be served from, using the same
|
|
84
|
+
# vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
|
|
85
|
+
# Supported for Telnyx-hosted models only: a request routed to an external
|
|
86
|
+
# provider never passes through Telnyx model routing, so a region cannot be
|
|
87
|
+
# enforced for it. Omit for today's latency-based routing.
|
|
88
|
+
sig do
|
|
89
|
+
returns(
|
|
90
|
+
T.nilable(Telnyx::AI::OpenAICreateResponseParams::Region::OrSymbol)
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
attr_reader :region
|
|
94
|
+
|
|
95
|
+
sig do
|
|
96
|
+
params(
|
|
97
|
+
region: Telnyx::AI::OpenAICreateResponseParams::Region::OrSymbol
|
|
98
|
+
).void
|
|
99
|
+
end
|
|
100
|
+
attr_writer :region
|
|
101
|
+
|
|
64
102
|
# The service tier to use for this request. Supported values vary by model; use
|
|
65
103
|
# `GET /v2/ai/openai/models` and inspect the model's `service_tiers` field. If
|
|
66
104
|
# omitted, Telnyx-hosted models use `default`.
|
|
@@ -83,9 +121,11 @@ module Telnyx
|
|
|
83
121
|
conversation: String,
|
|
84
122
|
input: T::Hash[Symbol, T.anything],
|
|
85
123
|
instructions: String,
|
|
124
|
+
mode: Telnyx::AI::OpenAICreateResponseParams::Mode::OrSymbol,
|
|
86
125
|
model: String,
|
|
87
126
|
reasoning:
|
|
88
127
|
Telnyx::AI::OpenAICreateResponseParams::Reasoning::OrHash,
|
|
128
|
+
region: Telnyx::AI::OpenAICreateResponseParams::Region::OrSymbol,
|
|
89
129
|
service_tier: String,
|
|
90
130
|
stream: T::Boolean,
|
|
91
131
|
request_options: Telnyx::RequestOptions::OrHash
|
|
@@ -103,10 +143,22 @@ module Telnyx
|
|
|
103
143
|
# `conversation`, send these on the first request that creates the thread;
|
|
104
144
|
# subsequent turns can rely on the stored history.
|
|
105
145
|
instructions: nil,
|
|
146
|
+
# How strictly `region` is applied. `preferred` (the default when `region` is set)
|
|
147
|
+
# tries that region first and falls back to another when the model cannot be
|
|
148
|
+
# served there, so a request that would have succeeded still succeeds. `strict`
|
|
149
|
+
# pins the request: it is served from that region or it fails with a 422, never
|
|
150
|
+
# redirected to another region. Requires `region`.
|
|
151
|
+
mode: nil,
|
|
106
152
|
# Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
|
|
107
153
|
# another model available from the Telnyx OpenAI-compatible models endpoint.
|
|
108
154
|
model: nil,
|
|
109
155
|
reasoning: nil,
|
|
156
|
+
# Optional data-residency region the request should be served from, using the same
|
|
157
|
+
# vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
|
|
158
|
+
# Supported for Telnyx-hosted models only: a request routed to an external
|
|
159
|
+
# provider never passes through Telnyx model routing, so a region cannot be
|
|
160
|
+
# enforced for it. Omit for today's latency-based routing.
|
|
161
|
+
region: nil,
|
|
110
162
|
# The service tier to use for this request. Supported values vary by model; use
|
|
111
163
|
# `GET /v2/ai/openai/models` and inspect the model's `service_tiers` field. If
|
|
112
164
|
# omitted, Telnyx-hosted models use `default`.
|
|
@@ -124,8 +176,10 @@ module Telnyx
|
|
|
124
176
|
conversation: String,
|
|
125
177
|
input: T::Hash[Symbol, T.anything],
|
|
126
178
|
instructions: String,
|
|
179
|
+
mode: Telnyx::AI::OpenAICreateResponseParams::Mode::OrSymbol,
|
|
127
180
|
model: String,
|
|
128
181
|
reasoning: Telnyx::AI::OpenAICreateResponseParams::Reasoning,
|
|
182
|
+
region: Telnyx::AI::OpenAICreateResponseParams::Region::OrSymbol,
|
|
129
183
|
service_tier: String,
|
|
130
184
|
stream: T::Boolean,
|
|
131
185
|
request_options: Telnyx::RequestOptions
|
|
@@ -135,6 +189,42 @@ module Telnyx
|
|
|
135
189
|
def to_hash
|
|
136
190
|
end
|
|
137
191
|
|
|
192
|
+
# How strictly `region` is applied. `preferred` (the default when `region` is set)
|
|
193
|
+
# tries that region first and falls back to another when the model cannot be
|
|
194
|
+
# served there, so a request that would have succeeded still succeeds. `strict`
|
|
195
|
+
# pins the request: it is served from that region or it fails with a 422, never
|
|
196
|
+
# redirected to another region. Requires `region`.
|
|
197
|
+
module Mode
|
|
198
|
+
extend Telnyx::Internal::Type::Enum
|
|
199
|
+
|
|
200
|
+
TaggedSymbol =
|
|
201
|
+
T.type_alias do
|
|
202
|
+
T.all(Symbol, Telnyx::AI::OpenAICreateResponseParams::Mode)
|
|
203
|
+
end
|
|
204
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
205
|
+
|
|
206
|
+
PREFERRED =
|
|
207
|
+
T.let(
|
|
208
|
+
:preferred,
|
|
209
|
+
Telnyx::AI::OpenAICreateResponseParams::Mode::TaggedSymbol
|
|
210
|
+
)
|
|
211
|
+
STRICT =
|
|
212
|
+
T.let(
|
|
213
|
+
:strict,
|
|
214
|
+
Telnyx::AI::OpenAICreateResponseParams::Mode::TaggedSymbol
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
sig do
|
|
218
|
+
override.returns(
|
|
219
|
+
T::Array[
|
|
220
|
+
Telnyx::AI::OpenAICreateResponseParams::Mode::TaggedSymbol
|
|
221
|
+
]
|
|
222
|
+
)
|
|
223
|
+
end
|
|
224
|
+
def self.values
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
138
228
|
class Reasoning < Telnyx::Internal::Type::BaseModel
|
|
139
229
|
OrHash =
|
|
140
230
|
T.type_alias do
|
|
@@ -248,6 +338,52 @@ module Telnyx
|
|
|
248
338
|
end
|
|
249
339
|
end
|
|
250
340
|
end
|
|
341
|
+
|
|
342
|
+
# Optional data-residency region the request should be served from, using the same
|
|
343
|
+
# vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
|
|
344
|
+
# Supported for Telnyx-hosted models only: a request routed to an external
|
|
345
|
+
# provider never passes through Telnyx model routing, so a region cannot be
|
|
346
|
+
# enforced for it. Omit for today's latency-based routing.
|
|
347
|
+
module Region
|
|
348
|
+
extend Telnyx::Internal::Type::Enum
|
|
349
|
+
|
|
350
|
+
TaggedSymbol =
|
|
351
|
+
T.type_alias do
|
|
352
|
+
T.all(Symbol, Telnyx::AI::OpenAICreateResponseParams::Region)
|
|
353
|
+
end
|
|
354
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
355
|
+
|
|
356
|
+
USA =
|
|
357
|
+
T.let(
|
|
358
|
+
:USA,
|
|
359
|
+
Telnyx::AI::OpenAICreateResponseParams::Region::TaggedSymbol
|
|
360
|
+
)
|
|
361
|
+
EU =
|
|
362
|
+
T.let(
|
|
363
|
+
:EU,
|
|
364
|
+
Telnyx::AI::OpenAICreateResponseParams::Region::TaggedSymbol
|
|
365
|
+
)
|
|
366
|
+
AUS =
|
|
367
|
+
T.let(
|
|
368
|
+
:AUS,
|
|
369
|
+
Telnyx::AI::OpenAICreateResponseParams::Region::TaggedSymbol
|
|
370
|
+
)
|
|
371
|
+
UAE =
|
|
372
|
+
T.let(
|
|
373
|
+
:UAE,
|
|
374
|
+
Telnyx::AI::OpenAICreateResponseParams::Region::TaggedSymbol
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
sig do
|
|
378
|
+
override.returns(
|
|
379
|
+
T::Array[
|
|
380
|
+
Telnyx::AI::OpenAICreateResponseParams::Region::TaggedSymbol
|
|
381
|
+
]
|
|
382
|
+
)
|
|
383
|
+
end
|
|
384
|
+
def self.values
|
|
385
|
+
end
|
|
386
|
+
end
|
|
251
387
|
end
|
|
252
388
|
end
|
|
253
389
|
end
|
|
@@ -26,6 +26,19 @@ module Telnyx
|
|
|
26
26
|
sig { params(disable_dtmf: T::Boolean).void }
|
|
27
27
|
attr_writer :disable_dtmf
|
|
28
28
|
|
|
29
|
+
# Destination number or SIP URI to transfer the caller to when the AI conversation
|
|
30
|
+
# ends abnormally, for example because of an assistant-side error, so the caller
|
|
31
|
+
# is not left in dead air. This only fires for abnormal ends: it does not fire
|
|
32
|
+
# when the conversation ends on purpose (the caller hung up, the assistant
|
|
33
|
+
# completed normally, the caller hung up after a relay handoff, or voicemail was
|
|
34
|
+
# detected), and it does not fire when the assistant already transferred or
|
|
35
|
+
# bridged the call.
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
attr_reader :fallback_destination
|
|
38
|
+
|
|
39
|
+
sig { params(fallback_destination: String).void }
|
|
40
|
+
attr_writer :fallback_destination
|
|
41
|
+
|
|
29
42
|
# The noise suppression engine to use. Use 'disabled' to turn off noise
|
|
30
43
|
# suppression.
|
|
31
44
|
sig do
|
|
@@ -149,6 +162,7 @@ module Telnyx
|
|
|
149
162
|
params(
|
|
150
163
|
default_texml_app_id: String,
|
|
151
164
|
disable_dtmf: T::Boolean,
|
|
165
|
+
fallback_destination: String,
|
|
152
166
|
noise_suppression:
|
|
153
167
|
Telnyx::AI::TelephonySettings::NoiseSuppression::OrSymbol,
|
|
154
168
|
noise_suppression_config:
|
|
@@ -172,6 +186,14 @@ module Telnyx
|
|
|
172
186
|
# configured anywhere on the assistant — on the main tool array or on any workflow
|
|
173
187
|
# node — enforced at write time.
|
|
174
188
|
disable_dtmf: nil,
|
|
189
|
+
# Destination number or SIP URI to transfer the caller to when the AI conversation
|
|
190
|
+
# ends abnormally, for example because of an assistant-side error, so the caller
|
|
191
|
+
# is not left in dead air. This only fires for abnormal ends: it does not fire
|
|
192
|
+
# when the conversation ends on purpose (the caller hung up, the assistant
|
|
193
|
+
# completed normally, the caller hung up after a relay handoff, or voicemail was
|
|
194
|
+
# detected), and it does not fire when the assistant already transferred or
|
|
195
|
+
# bridged the call.
|
|
196
|
+
fallback_destination: nil,
|
|
175
197
|
# The noise suppression engine to use. Use 'disabled' to turn off noise
|
|
176
198
|
# suppression.
|
|
177
199
|
noise_suppression: nil,
|
|
@@ -222,6 +244,7 @@ module Telnyx
|
|
|
222
244
|
{
|
|
223
245
|
default_texml_app_id: String,
|
|
224
246
|
disable_dtmf: T::Boolean,
|
|
247
|
+
fallback_destination: String,
|
|
225
248
|
noise_suppression:
|
|
226
249
|
Telnyx::AI::TelephonySettings::NoiseSuppression::OrSymbol,
|
|
227
250
|
noise_suppression_config:
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Telnyx
|
|
4
|
+
module Models
|
|
5
|
+
module Compute
|
|
6
|
+
class FuncRetrieveLogsParams < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
extend Telnyx::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Telnyx::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
Telnyx::Compute::FuncRetrieveLogsParams,
|
|
14
|
+
Telnyx::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Return records at or before this RFC 3339 timestamp.
|
|
22
|
+
sig { returns(T.nilable(Time)) }
|
|
23
|
+
attr_reader :end_time
|
|
24
|
+
|
|
25
|
+
sig { params(end_time: Time).void }
|
|
26
|
+
attr_writer :end_time
|
|
27
|
+
|
|
28
|
+
# Maximum records to return.
|
|
29
|
+
sig { returns(T.nilable(Integer)) }
|
|
30
|
+
attr_reader :limit
|
|
31
|
+
|
|
32
|
+
sig { params(limit: Integer).void }
|
|
33
|
+
attr_writer :limit
|
|
34
|
+
|
|
35
|
+
# Return records at or after this RFC 3339 timestamp.
|
|
36
|
+
sig { returns(T.nilable(Time)) }
|
|
37
|
+
attr_reader :start_time
|
|
38
|
+
|
|
39
|
+
sig { params(start_time: Time).void }
|
|
40
|
+
attr_writer :start_time
|
|
41
|
+
|
|
42
|
+
# Log stream to return.
|
|
43
|
+
sig do
|
|
44
|
+
returns(
|
|
45
|
+
T.nilable(Telnyx::Compute::FuncRetrieveLogsParams::Type::OrSymbol)
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
attr_reader :type
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
type: Telnyx::Compute::FuncRetrieveLogsParams::Type::OrSymbol
|
|
53
|
+
).void
|
|
54
|
+
end
|
|
55
|
+
attr_writer :type
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
params(
|
|
59
|
+
id: String,
|
|
60
|
+
end_time: Time,
|
|
61
|
+
limit: Integer,
|
|
62
|
+
start_time: Time,
|
|
63
|
+
type: Telnyx::Compute::FuncRetrieveLogsParams::Type::OrSymbol,
|
|
64
|
+
request_options: Telnyx::RequestOptions::OrHash
|
|
65
|
+
).returns(T.attached_class)
|
|
66
|
+
end
|
|
67
|
+
def self.new(
|
|
68
|
+
id:,
|
|
69
|
+
# Return records at or before this RFC 3339 timestamp.
|
|
70
|
+
end_time: nil,
|
|
71
|
+
# Maximum records to return.
|
|
72
|
+
limit: nil,
|
|
73
|
+
# Return records at or after this RFC 3339 timestamp.
|
|
74
|
+
start_time: nil,
|
|
75
|
+
# Log stream to return.
|
|
76
|
+
type: nil,
|
|
77
|
+
request_options: {}
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
sig do
|
|
82
|
+
override.returns(
|
|
83
|
+
{
|
|
84
|
+
id: String,
|
|
85
|
+
end_time: Time,
|
|
86
|
+
limit: Integer,
|
|
87
|
+
start_time: Time,
|
|
88
|
+
type: Telnyx::Compute::FuncRetrieveLogsParams::Type::OrSymbol,
|
|
89
|
+
request_options: Telnyx::RequestOptions
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
def to_hash
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Log stream to return.
|
|
97
|
+
module Type
|
|
98
|
+
extend Telnyx::Internal::Type::Enum
|
|
99
|
+
|
|
100
|
+
TaggedSymbol =
|
|
101
|
+
T.type_alias do
|
|
102
|
+
T.all(Symbol, Telnyx::Compute::FuncRetrieveLogsParams::Type)
|
|
103
|
+
end
|
|
104
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
105
|
+
|
|
106
|
+
RUNTIME =
|
|
107
|
+
T.let(
|
|
108
|
+
:runtime,
|
|
109
|
+
Telnyx::Compute::FuncRetrieveLogsParams::Type::TaggedSymbol
|
|
110
|
+
)
|
|
111
|
+
INVOCATIONS =
|
|
112
|
+
T.let(
|
|
113
|
+
:invocations,
|
|
114
|
+
Telnyx::Compute::FuncRetrieveLogsParams::Type::TaggedSymbol
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
sig do
|
|
118
|
+
override.returns(
|
|
119
|
+
T::Array[
|
|
120
|
+
Telnyx::Compute::FuncRetrieveLogsParams::Type::TaggedSymbol
|
|
121
|
+
]
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
def self.values
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|