telnyx 5.91.0 → 5.93.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/models/ai/assistant_create_params.rb +480 -34
- data/lib/telnyx/models/ai/assistant_update_params.rb +481 -27
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +487 -27
- data/lib/telnyx/models/ai/inference_embedding.rb +505 -26
- data/lib/telnyx/models/calls/transcription_start_request.rb +171 -3
- data/lib/telnyx/resources/ai/assistants/versions.rb +21 -9
- data/lib/telnyx/resources/ai/assistants.rb +41 -19
- data/lib/telnyx/resources/calls/actions.rb +1 -1
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +0 -6
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +945 -44
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +945 -36
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +967 -36
- data/rbi/telnyx/models/ai/inference_embedding.rbi +972 -36
- data/rbi/telnyx/models/calls/transcription_start_request.rbi +490 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +66 -16
- data/rbi/telnyx/resources/ai/assistants.rbi +122 -33
- data/rbi/telnyx/resources/calls/actions.rbi +2 -0
- data/sig/telnyx/models/ai/assistant_create_params.rbs +377 -23
- data/sig/telnyx/models/ai/assistant_update_params.rbs +377 -18
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +380 -18
- data/sig/telnyx/models/ai/inference_embedding.rbs +399 -17
- data/sig/telnyx/models/calls/transcription_start_request.rbs +187 -1
- data/sig/telnyx/resources/ai/assistants/versions.rbs +9 -3
- data/sig/telnyx/resources/ai/assistants.rbs +18 -7
- metadata +1 -19
- data/lib/telnyx/models/ai/external_llm.rb +0 -87
- data/lib/telnyx/models/ai/external_llm_req.rb +0 -87
- data/lib/telnyx/models/ai/fallback_config.rb +0 -37
- data/lib/telnyx/models/ai/fallback_config_req.rb +0 -37
- data/lib/telnyx/models/ai/post_conversation_settings.rb +0 -30
- data/lib/telnyx/models/ai/post_conversation_settings_req.rb +0 -30
- data/rbi/telnyx/models/ai/external_llm.rbi +0 -157
- data/rbi/telnyx/models/ai/external_llm_req.rbi +0 -157
- data/rbi/telnyx/models/ai/fallback_config.rbi +0 -64
- data/rbi/telnyx/models/ai/fallback_config_req.rbi +0 -64
- data/rbi/telnyx/models/ai/post_conversation_settings.rbi +0 -45
- data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +0 -45
- data/sig/telnyx/models/ai/external_llm.rbs +0 -75
- data/sig/telnyx/models/ai/external_llm_req.rbs +0 -75
- data/sig/telnyx/models/ai/fallback_config.rbs +0 -38
- data/sig/telnyx/models/ai/fallback_config_req.rbs +0 -40
- data/sig/telnyx/models/ai/post_conversation_settings.rbs +0 -17
- data/sig/telnyx/models/ai/post_conversation_settings_req.rbs +0 -17
|
@@ -17,12 +17,6 @@ module Telnyx
|
|
|
17
17
|
sig { returns(String) }
|
|
18
18
|
attr_accessor :instructions
|
|
19
19
|
|
|
20
|
-
# ID of the model to use. You can use the
|
|
21
|
-
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
22
|
-
# to see all of your available models,
|
|
23
|
-
sig { returns(String) }
|
|
24
|
-
attr_accessor :model
|
|
25
|
-
|
|
26
20
|
sig { returns(String) }
|
|
27
21
|
attr_accessor :name
|
|
28
22
|
|
|
@@ -39,10 +33,24 @@ module Telnyx
|
|
|
39
33
|
sig { params(dynamic_variables: T::Hash[Symbol, T.anything]).void }
|
|
40
34
|
attr_writer :dynamic_variables
|
|
41
35
|
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
36
|
+
# Timeout in milliseconds for the dynamic variables webhook. Must be between 1 and
|
|
37
|
+
# 10000 ms. If the webhook does not respond within this timeout, the call proceeds
|
|
38
|
+
# with default values. See the
|
|
39
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables).
|
|
40
|
+
sig { returns(T.nilable(Integer)) }
|
|
41
|
+
attr_reader :dynamic_variables_webhook_timeout_ms
|
|
42
|
+
|
|
43
|
+
sig { params(dynamic_variables_webhook_timeout_ms: Integer).void }
|
|
44
|
+
attr_writer :dynamic_variables_webhook_timeout_ms
|
|
45
|
+
|
|
46
|
+
# If `dynamic_variables_webhook_url` is set, Telnyx sends a POST request to this
|
|
47
|
+
# URL at the start of the conversation to resolve dynamic variables. **Gotcha:**
|
|
48
|
+
# the webhook response must wrap variables under a top-level `dynamic_variables`
|
|
49
|
+
# object, e.g. `{"dynamic_variables": {"customer_name": "Jane"}}`. Returning a
|
|
50
|
+
# flat object will be ignored and variables will fall back to their defaults. See
|
|
51
|
+
# the
|
|
52
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
53
|
+
# for the full request/response format and timeout behavior.
|
|
46
54
|
sig { returns(T.nilable(String)) }
|
|
47
55
|
attr_reader :dynamic_variables_webhook_url
|
|
48
56
|
|
|
@@ -61,17 +69,28 @@ module Telnyx
|
|
|
61
69
|
end
|
|
62
70
|
attr_writer :enabled_features
|
|
63
71
|
|
|
64
|
-
sig
|
|
72
|
+
sig do
|
|
73
|
+
returns(T.nilable(Telnyx::AI::AssistantCreateParams::ExternalLlm))
|
|
74
|
+
end
|
|
65
75
|
attr_reader :external_llm
|
|
66
76
|
|
|
67
|
-
sig
|
|
77
|
+
sig do
|
|
78
|
+
params(
|
|
79
|
+
external_llm: Telnyx::AI::AssistantCreateParams::ExternalLlm::OrHash
|
|
80
|
+
).void
|
|
81
|
+
end
|
|
68
82
|
attr_writer :external_llm
|
|
69
83
|
|
|
70
|
-
sig
|
|
84
|
+
sig do
|
|
85
|
+
returns(T.nilable(Telnyx::AI::AssistantCreateParams::FallbackConfig))
|
|
86
|
+
end
|
|
71
87
|
attr_reader :fallback_config
|
|
72
88
|
|
|
73
89
|
sig do
|
|
74
|
-
params(
|
|
90
|
+
params(
|
|
91
|
+
fallback_config:
|
|
92
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::OrHash
|
|
93
|
+
).void
|
|
75
94
|
end
|
|
76
95
|
attr_writer :fallback_config
|
|
77
96
|
|
|
@@ -95,17 +114,75 @@ module Telnyx
|
|
|
95
114
|
end
|
|
96
115
|
attr_writer :insight_settings
|
|
97
116
|
|
|
98
|
-
#
|
|
99
|
-
#
|
|
117
|
+
# Connected integrations attached to the assistant. The catalog of available
|
|
118
|
+
# integrations is at `/ai/integrations`; the user's connected integrations are at
|
|
119
|
+
# `/ai/integrations/connections`. Each item references a catalog integration by
|
|
120
|
+
# `integration_id`.
|
|
121
|
+
sig do
|
|
122
|
+
returns(
|
|
123
|
+
T.nilable(T::Array[Telnyx::AI::AssistantCreateParams::Integration])
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
attr_reader :integrations
|
|
127
|
+
|
|
128
|
+
sig do
|
|
129
|
+
params(
|
|
130
|
+
integrations:
|
|
131
|
+
T::Array[Telnyx::AI::AssistantCreateParams::Integration::OrHash]
|
|
132
|
+
).void
|
|
133
|
+
end
|
|
134
|
+
attr_writer :integrations
|
|
135
|
+
|
|
136
|
+
# Settings for interruptions and how the assistant decides the user has finished
|
|
137
|
+
# speaking. These timings are most relevant when using non turn-taking
|
|
138
|
+
# transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
|
|
139
|
+
# behavior is controlled by the transcription end-of-turn settings under
|
|
140
|
+
# `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
|
|
141
|
+
# `eager_eot_threshold`).
|
|
142
|
+
sig do
|
|
143
|
+
returns(
|
|
144
|
+
T.nilable(Telnyx::AI::AssistantCreateParams::InterruptionSettings)
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
attr_reader :interruption_settings
|
|
148
|
+
|
|
149
|
+
sig do
|
|
150
|
+
params(
|
|
151
|
+
interruption_settings:
|
|
152
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::OrHash
|
|
153
|
+
).void
|
|
154
|
+
end
|
|
155
|
+
attr_writer :interruption_settings
|
|
156
|
+
|
|
157
|
+
# This is only needed when using third-party inference providers selected by
|
|
158
|
+
# `model`. The `identifier` for an integration secret
|
|
100
159
|
# [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
101
|
-
# that refers to your LLM provider's API key.
|
|
102
|
-
#
|
|
160
|
+
# that refers to your LLM provider's API key. For bring-your-own endpoint
|
|
161
|
+
# authentication, use `external_llm.llm_api_key_ref` instead. Warning: Free plans
|
|
162
|
+
# are unlikely to work with this integration.
|
|
103
163
|
sig { returns(T.nilable(String)) }
|
|
104
164
|
attr_reader :llm_api_key_ref
|
|
105
165
|
|
|
106
166
|
sig { params(llm_api_key_ref: String).void }
|
|
107
167
|
attr_writer :llm_api_key_ref
|
|
108
168
|
|
|
169
|
+
# MCP servers attached to the assistant. Create MCP servers with
|
|
170
|
+
# `/ai/mcp_servers`, then reference them by `id` here.
|
|
171
|
+
sig do
|
|
172
|
+
returns(
|
|
173
|
+
T.nilable(T::Array[Telnyx::AI::AssistantCreateParams::McpServer])
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
attr_reader :mcp_servers
|
|
177
|
+
|
|
178
|
+
sig do
|
|
179
|
+
params(
|
|
180
|
+
mcp_servers:
|
|
181
|
+
T::Array[Telnyx::AI::AssistantCreateParams::McpServer::OrHash]
|
|
182
|
+
).void
|
|
183
|
+
end
|
|
184
|
+
attr_writer :mcp_servers
|
|
185
|
+
|
|
109
186
|
sig { returns(T.nilable(Telnyx::AI::MessagingSettings)) }
|
|
110
187
|
attr_reader :messaging_settings
|
|
111
188
|
|
|
@@ -114,6 +191,17 @@ module Telnyx
|
|
|
114
191
|
end
|
|
115
192
|
attr_writer :messaging_settings
|
|
116
193
|
|
|
194
|
+
# ID of the model to use when `external_llm` is not set. You can use the
|
|
195
|
+
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
196
|
+
# to see available models. If `external_llm` is provided, the assistant uses
|
|
197
|
+
# `external_llm` instead of this field. If neither `model` nor `external_llm` is
|
|
198
|
+
# provided, Telnyx applies the default model.
|
|
199
|
+
sig { returns(T.nilable(String)) }
|
|
200
|
+
attr_reader :model
|
|
201
|
+
|
|
202
|
+
sig { params(model: String).void }
|
|
203
|
+
attr_writer :model
|
|
204
|
+
|
|
117
205
|
sig { returns(T.nilable(Telnyx::AI::ObservabilityReq)) }
|
|
118
206
|
attr_reader :observability_settings
|
|
119
207
|
|
|
@@ -130,13 +218,19 @@ module Telnyx
|
|
|
130
218
|
# can execute multiple parallel or sequential tools during this phase.
|
|
131
219
|
# Telephony-control tools (e.g. hangup, transfer) are unavailable
|
|
132
220
|
# post-conversation. Beta feature.
|
|
133
|
-
sig
|
|
221
|
+
sig do
|
|
222
|
+
returns(
|
|
223
|
+
T.nilable(
|
|
224
|
+
Telnyx::AI::AssistantCreateParams::PostConversationSettings
|
|
225
|
+
)
|
|
226
|
+
)
|
|
227
|
+
end
|
|
134
228
|
attr_reader :post_conversation_settings
|
|
135
229
|
|
|
136
230
|
sig do
|
|
137
231
|
params(
|
|
138
232
|
post_conversation_settings:
|
|
139
|
-
Telnyx::AI::
|
|
233
|
+
Telnyx::AI::AssistantCreateParams::PostConversationSettings::OrHash
|
|
140
234
|
).void
|
|
141
235
|
end
|
|
142
236
|
attr_writer :post_conversation_settings
|
|
@@ -149,6 +243,14 @@ module Telnyx
|
|
|
149
243
|
end
|
|
150
244
|
attr_writer :privacy_settings
|
|
151
245
|
|
|
246
|
+
# Tags associated with the assistant. Tags can also be managed with the assistant
|
|
247
|
+
# tag endpoints.
|
|
248
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
249
|
+
attr_reader :tags
|
|
250
|
+
|
|
251
|
+
sig { params(tags: T::Array[String]).void }
|
|
252
|
+
attr_writer :tags
|
|
253
|
+
|
|
152
254
|
sig { returns(T.nilable(Telnyx::AI::TelephonySettings)) }
|
|
153
255
|
attr_reader :telephony_settings
|
|
154
256
|
|
|
@@ -157,14 +259,17 @@ module Telnyx
|
|
|
157
259
|
end
|
|
158
260
|
attr_writer :telephony_settings
|
|
159
261
|
|
|
262
|
+
# IDs of shared tools to attach to the assistant. New integrations should prefer
|
|
263
|
+
# `tool_ids` over inline `tools`.
|
|
160
264
|
sig { returns(T.nilable(T::Array[String])) }
|
|
161
265
|
attr_reader :tool_ids
|
|
162
266
|
|
|
163
267
|
sig { params(tool_ids: T::Array[String]).void }
|
|
164
268
|
attr_writer :tool_ids
|
|
165
269
|
|
|
166
|
-
#
|
|
167
|
-
#
|
|
270
|
+
# Deprecated for new integrations. Inline tool definitions available to the
|
|
271
|
+
# assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
272
|
+
# endpoints.
|
|
168
273
|
sig do
|
|
169
274
|
returns(
|
|
170
275
|
T.nilable(
|
|
@@ -232,22 +337,32 @@ module Telnyx
|
|
|
232
337
|
sig do
|
|
233
338
|
params(
|
|
234
339
|
instructions: String,
|
|
235
|
-
model: String,
|
|
236
340
|
name: String,
|
|
237
341
|
description: String,
|
|
238
342
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
343
|
+
dynamic_variables_webhook_timeout_ms: Integer,
|
|
239
344
|
dynamic_variables_webhook_url: String,
|
|
240
345
|
enabled_features: T::Array[Telnyx::AI::EnabledFeatures::OrSymbol],
|
|
241
|
-
external_llm:
|
|
242
|
-
|
|
346
|
+
external_llm:
|
|
347
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::OrHash,
|
|
348
|
+
fallback_config:
|
|
349
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::OrHash,
|
|
243
350
|
greeting: String,
|
|
244
351
|
insight_settings: Telnyx::AI::InsightSettings::OrHash,
|
|
352
|
+
integrations:
|
|
353
|
+
T::Array[Telnyx::AI::AssistantCreateParams::Integration::OrHash],
|
|
354
|
+
interruption_settings:
|
|
355
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::OrHash,
|
|
245
356
|
llm_api_key_ref: String,
|
|
357
|
+
mcp_servers:
|
|
358
|
+
T::Array[Telnyx::AI::AssistantCreateParams::McpServer::OrHash],
|
|
246
359
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
360
|
+
model: String,
|
|
247
361
|
observability_settings: Telnyx::AI::ObservabilityReq::OrHash,
|
|
248
362
|
post_conversation_settings:
|
|
249
|
-
Telnyx::AI::
|
|
363
|
+
Telnyx::AI::AssistantCreateParams::PostConversationSettings::OrHash,
|
|
250
364
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
365
|
+
tags: T::Array[String],
|
|
251
366
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
252
367
|
tool_ids: T::Array[String],
|
|
253
368
|
tools:
|
|
@@ -275,18 +390,23 @@ module Telnyx
|
|
|
275
390
|
# System instructions for the assistant. These may be templated with
|
|
276
391
|
# [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
277
392
|
instructions:,
|
|
278
|
-
# ID of the model to use. You can use the
|
|
279
|
-
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
280
|
-
# to see all of your available models,
|
|
281
|
-
model:,
|
|
282
393
|
name:,
|
|
283
394
|
description: nil,
|
|
284
395
|
# Map of dynamic variables and their default values
|
|
285
396
|
dynamic_variables: nil,
|
|
286
|
-
#
|
|
287
|
-
#
|
|
288
|
-
#
|
|
289
|
-
#
|
|
397
|
+
# Timeout in milliseconds for the dynamic variables webhook. Must be between 1 and
|
|
398
|
+
# 10000 ms. If the webhook does not respond within this timeout, the call proceeds
|
|
399
|
+
# with default values. See the
|
|
400
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables).
|
|
401
|
+
dynamic_variables_webhook_timeout_ms: nil,
|
|
402
|
+
# If `dynamic_variables_webhook_url` is set, Telnyx sends a POST request to this
|
|
403
|
+
# URL at the start of the conversation to resolve dynamic variables. **Gotcha:**
|
|
404
|
+
# the webhook response must wrap variables under a top-level `dynamic_variables`
|
|
405
|
+
# object, e.g. `{"dynamic_variables": {"customer_name": "Jane"}}`. Returning a
|
|
406
|
+
# flat object will be ignored and variables will fall back to their defaults. See
|
|
407
|
+
# the
|
|
408
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
409
|
+
# for the full request/response format and timeout behavior.
|
|
290
410
|
dynamic_variables_webhook_url: nil,
|
|
291
411
|
enabled_features: nil,
|
|
292
412
|
external_llm: nil,
|
|
@@ -299,13 +419,35 @@ module Telnyx
|
|
|
299
419
|
# have the assistant generate the greeting based on the system instructions.
|
|
300
420
|
greeting: nil,
|
|
301
421
|
insight_settings: nil,
|
|
302
|
-
#
|
|
303
|
-
#
|
|
422
|
+
# Connected integrations attached to the assistant. The catalog of available
|
|
423
|
+
# integrations is at `/ai/integrations`; the user's connected integrations are at
|
|
424
|
+
# `/ai/integrations/connections`. Each item references a catalog integration by
|
|
425
|
+
# `integration_id`.
|
|
426
|
+
integrations: nil,
|
|
427
|
+
# Settings for interruptions and how the assistant decides the user has finished
|
|
428
|
+
# speaking. These timings are most relevant when using non turn-taking
|
|
429
|
+
# transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
|
|
430
|
+
# behavior is controlled by the transcription end-of-turn settings under
|
|
431
|
+
# `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
|
|
432
|
+
# `eager_eot_threshold`).
|
|
433
|
+
interruption_settings: nil,
|
|
434
|
+
# This is only needed when using third-party inference providers selected by
|
|
435
|
+
# `model`. The `identifier` for an integration secret
|
|
304
436
|
# [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
305
|
-
# that refers to your LLM provider's API key.
|
|
306
|
-
#
|
|
437
|
+
# that refers to your LLM provider's API key. For bring-your-own endpoint
|
|
438
|
+
# authentication, use `external_llm.llm_api_key_ref` instead. Warning: Free plans
|
|
439
|
+
# are unlikely to work with this integration.
|
|
307
440
|
llm_api_key_ref: nil,
|
|
441
|
+
# MCP servers attached to the assistant. Create MCP servers with
|
|
442
|
+
# `/ai/mcp_servers`, then reference them by `id` here.
|
|
443
|
+
mcp_servers: nil,
|
|
308
444
|
messaging_settings: nil,
|
|
445
|
+
# ID of the model to use when `external_llm` is not set. You can use the
|
|
446
|
+
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
447
|
+
# to see available models. If `external_llm` is provided, the assistant uses
|
|
448
|
+
# `external_llm` instead of this field. If neither `model` nor `external_llm` is
|
|
449
|
+
# provided, Telnyx applies the default model.
|
|
450
|
+
model: nil,
|
|
309
451
|
observability_settings: nil,
|
|
310
452
|
# Configuration for post-conversation processing. When enabled, the assistant
|
|
311
453
|
# receives one additional LLM turn after the conversation ends, allowing it to
|
|
@@ -315,10 +457,16 @@ module Telnyx
|
|
|
315
457
|
# post-conversation. Beta feature.
|
|
316
458
|
post_conversation_settings: nil,
|
|
317
459
|
privacy_settings: nil,
|
|
460
|
+
# Tags associated with the assistant. Tags can also be managed with the assistant
|
|
461
|
+
# tag endpoints.
|
|
462
|
+
tags: nil,
|
|
318
463
|
telephony_settings: nil,
|
|
464
|
+
# IDs of shared tools to attach to the assistant. New integrations should prefer
|
|
465
|
+
# `tool_ids` over inline `tools`.
|
|
319
466
|
tool_ids: nil,
|
|
320
|
-
#
|
|
321
|
-
#
|
|
467
|
+
# Deprecated for new integrations. Inline tool definitions available to the
|
|
468
|
+
# assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
469
|
+
# endpoints.
|
|
322
470
|
tools: nil,
|
|
323
471
|
transcription: nil,
|
|
324
472
|
voice_settings: nil,
|
|
@@ -332,22 +480,31 @@ module Telnyx
|
|
|
332
480
|
override.returns(
|
|
333
481
|
{
|
|
334
482
|
instructions: String,
|
|
335
|
-
model: String,
|
|
336
483
|
name: String,
|
|
337
484
|
description: String,
|
|
338
485
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
486
|
+
dynamic_variables_webhook_timeout_ms: Integer,
|
|
339
487
|
dynamic_variables_webhook_url: String,
|
|
340
488
|
enabled_features: T::Array[Telnyx::AI::EnabledFeatures::OrSymbol],
|
|
341
|
-
external_llm: Telnyx::AI::
|
|
342
|
-
fallback_config:
|
|
489
|
+
external_llm: Telnyx::AI::AssistantCreateParams::ExternalLlm,
|
|
490
|
+
fallback_config:
|
|
491
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig,
|
|
343
492
|
greeting: String,
|
|
344
493
|
insight_settings: Telnyx::AI::InsightSettings,
|
|
494
|
+
integrations:
|
|
495
|
+
T::Array[Telnyx::AI::AssistantCreateParams::Integration],
|
|
496
|
+
interruption_settings:
|
|
497
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings,
|
|
345
498
|
llm_api_key_ref: String,
|
|
499
|
+
mcp_servers:
|
|
500
|
+
T::Array[Telnyx::AI::AssistantCreateParams::McpServer],
|
|
346
501
|
messaging_settings: Telnyx::AI::MessagingSettings,
|
|
502
|
+
model: String,
|
|
347
503
|
observability_settings: Telnyx::AI::ObservabilityReq,
|
|
348
504
|
post_conversation_settings:
|
|
349
|
-
Telnyx::AI::
|
|
505
|
+
Telnyx::AI::AssistantCreateParams::PostConversationSettings,
|
|
350
506
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
507
|
+
tags: T::Array[String],
|
|
351
508
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
352
509
|
tool_ids: T::Array[String],
|
|
353
510
|
tools:
|
|
@@ -374,6 +531,750 @@ module Telnyx
|
|
|
374
531
|
end
|
|
375
532
|
def to_hash
|
|
376
533
|
end
|
|
534
|
+
|
|
535
|
+
class ExternalLlm < Telnyx::Internal::Type::BaseModel
|
|
536
|
+
OrHash =
|
|
537
|
+
T.type_alias do
|
|
538
|
+
T.any(
|
|
539
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm,
|
|
540
|
+
Telnyx::Internal::AnyHash
|
|
541
|
+
)
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
# Base URL for the external LLM endpoint.
|
|
545
|
+
sig { returns(String) }
|
|
546
|
+
attr_accessor :base_url
|
|
547
|
+
|
|
548
|
+
# Model identifier to use with the external LLM endpoint.
|
|
549
|
+
sig { returns(String) }
|
|
550
|
+
attr_accessor :model
|
|
551
|
+
|
|
552
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
553
|
+
sig do
|
|
554
|
+
returns(
|
|
555
|
+
T.nilable(
|
|
556
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod::OrSymbol
|
|
557
|
+
)
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
attr_reader :authentication_method
|
|
561
|
+
|
|
562
|
+
sig do
|
|
563
|
+
params(
|
|
564
|
+
authentication_method:
|
|
565
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod::OrSymbol
|
|
566
|
+
).void
|
|
567
|
+
end
|
|
568
|
+
attr_writer :authentication_method
|
|
569
|
+
|
|
570
|
+
# Integration secret identifier for the client certificate used with certificate
|
|
571
|
+
# authentication.
|
|
572
|
+
sig { returns(T.nilable(String)) }
|
|
573
|
+
attr_reader :certificate_ref
|
|
574
|
+
|
|
575
|
+
sig { params(certificate_ref: String).void }
|
|
576
|
+
attr_writer :certificate_ref
|
|
577
|
+
|
|
578
|
+
# When `true`, Telnyx forwards the assistant's dynamic variables to the external
|
|
579
|
+
# LLM endpoint as a top-level `extra_metadata` object on the chat completion
|
|
580
|
+
# request body. Defaults to `false`. Example payload sent to the external
|
|
581
|
+
# endpoint:
|
|
582
|
+
# `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
|
|
583
|
+
# Distinct from OpenAI's native `metadata` field, which has its own size and type
|
|
584
|
+
# limits.
|
|
585
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
586
|
+
attr_reader :forward_metadata
|
|
587
|
+
|
|
588
|
+
sig { params(forward_metadata: T::Boolean).void }
|
|
589
|
+
attr_writer :forward_metadata
|
|
590
|
+
|
|
591
|
+
# Integration secret identifier for the external LLM API key.
|
|
592
|
+
sig { returns(T.nilable(String)) }
|
|
593
|
+
attr_reader :llm_api_key_ref
|
|
594
|
+
|
|
595
|
+
sig { params(llm_api_key_ref: String).void }
|
|
596
|
+
attr_writer :llm_api_key_ref
|
|
597
|
+
|
|
598
|
+
# URL used to retrieve an access token when certificate authentication is enabled.
|
|
599
|
+
sig { returns(T.nilable(String)) }
|
|
600
|
+
attr_reader :token_retrieval_url
|
|
601
|
+
|
|
602
|
+
sig { params(token_retrieval_url: String).void }
|
|
603
|
+
attr_writer :token_retrieval_url
|
|
604
|
+
|
|
605
|
+
sig do
|
|
606
|
+
params(
|
|
607
|
+
base_url: String,
|
|
608
|
+
model: String,
|
|
609
|
+
authentication_method:
|
|
610
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod::OrSymbol,
|
|
611
|
+
certificate_ref: String,
|
|
612
|
+
forward_metadata: T::Boolean,
|
|
613
|
+
llm_api_key_ref: String,
|
|
614
|
+
token_retrieval_url: String
|
|
615
|
+
).returns(T.attached_class)
|
|
616
|
+
end
|
|
617
|
+
def self.new(
|
|
618
|
+
# Base URL for the external LLM endpoint.
|
|
619
|
+
base_url:,
|
|
620
|
+
# Model identifier to use with the external LLM endpoint.
|
|
621
|
+
model:,
|
|
622
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
623
|
+
authentication_method: nil,
|
|
624
|
+
# Integration secret identifier for the client certificate used with certificate
|
|
625
|
+
# authentication.
|
|
626
|
+
certificate_ref: nil,
|
|
627
|
+
# When `true`, Telnyx forwards the assistant's dynamic variables to the external
|
|
628
|
+
# LLM endpoint as a top-level `extra_metadata` object on the chat completion
|
|
629
|
+
# request body. Defaults to `false`. Example payload sent to the external
|
|
630
|
+
# endpoint:
|
|
631
|
+
# `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
|
|
632
|
+
# Distinct from OpenAI's native `metadata` field, which has its own size and type
|
|
633
|
+
# limits.
|
|
634
|
+
forward_metadata: nil,
|
|
635
|
+
# Integration secret identifier for the external LLM API key.
|
|
636
|
+
llm_api_key_ref: nil,
|
|
637
|
+
# URL used to retrieve an access token when certificate authentication is enabled.
|
|
638
|
+
token_retrieval_url: nil
|
|
639
|
+
)
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
sig do
|
|
643
|
+
override.returns(
|
|
644
|
+
{
|
|
645
|
+
base_url: String,
|
|
646
|
+
model: String,
|
|
647
|
+
authentication_method:
|
|
648
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod::OrSymbol,
|
|
649
|
+
certificate_ref: String,
|
|
650
|
+
forward_metadata: T::Boolean,
|
|
651
|
+
llm_api_key_ref: String,
|
|
652
|
+
token_retrieval_url: String
|
|
653
|
+
}
|
|
654
|
+
)
|
|
655
|
+
end
|
|
656
|
+
def to_hash
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
660
|
+
module AuthenticationMethod
|
|
661
|
+
extend Telnyx::Internal::Type::Enum
|
|
662
|
+
|
|
663
|
+
TaggedSymbol =
|
|
664
|
+
T.type_alias do
|
|
665
|
+
T.all(
|
|
666
|
+
Symbol,
|
|
667
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod
|
|
668
|
+
)
|
|
669
|
+
end
|
|
670
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
671
|
+
|
|
672
|
+
TOKEN =
|
|
673
|
+
T.let(
|
|
674
|
+
:token,
|
|
675
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod::TaggedSymbol
|
|
676
|
+
)
|
|
677
|
+
CERTIFICATE =
|
|
678
|
+
T.let(
|
|
679
|
+
:certificate,
|
|
680
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod::TaggedSymbol
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
sig do
|
|
684
|
+
override.returns(
|
|
685
|
+
T::Array[
|
|
686
|
+
Telnyx::AI::AssistantCreateParams::ExternalLlm::AuthenticationMethod::TaggedSymbol
|
|
687
|
+
]
|
|
688
|
+
)
|
|
689
|
+
end
|
|
690
|
+
def self.values
|
|
691
|
+
end
|
|
692
|
+
end
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
class FallbackConfig < Telnyx::Internal::Type::BaseModel
|
|
696
|
+
OrHash =
|
|
697
|
+
T.type_alias do
|
|
698
|
+
T.any(
|
|
699
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig,
|
|
700
|
+
Telnyx::Internal::AnyHash
|
|
701
|
+
)
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
sig do
|
|
705
|
+
returns(
|
|
706
|
+
T.nilable(
|
|
707
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm
|
|
708
|
+
)
|
|
709
|
+
)
|
|
710
|
+
end
|
|
711
|
+
attr_reader :external_llm
|
|
712
|
+
|
|
713
|
+
sig do
|
|
714
|
+
params(
|
|
715
|
+
external_llm:
|
|
716
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::OrHash
|
|
717
|
+
).void
|
|
718
|
+
end
|
|
719
|
+
attr_writer :external_llm
|
|
720
|
+
|
|
721
|
+
# Integration secret identifier for the fallback model API key.
|
|
722
|
+
sig { returns(T.nilable(String)) }
|
|
723
|
+
attr_reader :llm_api_key_ref
|
|
724
|
+
|
|
725
|
+
sig { params(llm_api_key_ref: String).void }
|
|
726
|
+
attr_writer :llm_api_key_ref
|
|
727
|
+
|
|
728
|
+
# Fallback Telnyx-hosted model to use when the primary LLM provider is
|
|
729
|
+
# unavailable.
|
|
730
|
+
sig { returns(T.nilable(String)) }
|
|
731
|
+
attr_reader :model
|
|
732
|
+
|
|
733
|
+
sig { params(model: String).void }
|
|
734
|
+
attr_writer :model
|
|
735
|
+
|
|
736
|
+
sig do
|
|
737
|
+
params(
|
|
738
|
+
external_llm:
|
|
739
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::OrHash,
|
|
740
|
+
llm_api_key_ref: String,
|
|
741
|
+
model: String
|
|
742
|
+
).returns(T.attached_class)
|
|
743
|
+
end
|
|
744
|
+
def self.new(
|
|
745
|
+
external_llm: nil,
|
|
746
|
+
# Integration secret identifier for the fallback model API key.
|
|
747
|
+
llm_api_key_ref: nil,
|
|
748
|
+
# Fallback Telnyx-hosted model to use when the primary LLM provider is
|
|
749
|
+
# unavailable.
|
|
750
|
+
model: nil
|
|
751
|
+
)
|
|
752
|
+
end
|
|
753
|
+
|
|
754
|
+
sig do
|
|
755
|
+
override.returns(
|
|
756
|
+
{
|
|
757
|
+
external_llm:
|
|
758
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm,
|
|
759
|
+
llm_api_key_ref: String,
|
|
760
|
+
model: String
|
|
761
|
+
}
|
|
762
|
+
)
|
|
763
|
+
end
|
|
764
|
+
def to_hash
|
|
765
|
+
end
|
|
766
|
+
|
|
767
|
+
class ExternalLlm < Telnyx::Internal::Type::BaseModel
|
|
768
|
+
OrHash =
|
|
769
|
+
T.type_alias do
|
|
770
|
+
T.any(
|
|
771
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm,
|
|
772
|
+
Telnyx::Internal::AnyHash
|
|
773
|
+
)
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
# Base URL for the external LLM endpoint.
|
|
777
|
+
sig { returns(String) }
|
|
778
|
+
attr_accessor :base_url
|
|
779
|
+
|
|
780
|
+
# Model identifier to use with the external LLM endpoint.
|
|
781
|
+
sig { returns(String) }
|
|
782
|
+
attr_accessor :model
|
|
783
|
+
|
|
784
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
785
|
+
sig do
|
|
786
|
+
returns(
|
|
787
|
+
T.nilable(
|
|
788
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod::OrSymbol
|
|
789
|
+
)
|
|
790
|
+
)
|
|
791
|
+
end
|
|
792
|
+
attr_reader :authentication_method
|
|
793
|
+
|
|
794
|
+
sig do
|
|
795
|
+
params(
|
|
796
|
+
authentication_method:
|
|
797
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod::OrSymbol
|
|
798
|
+
).void
|
|
799
|
+
end
|
|
800
|
+
attr_writer :authentication_method
|
|
801
|
+
|
|
802
|
+
# Integration secret identifier for the client certificate used with certificate
|
|
803
|
+
# authentication.
|
|
804
|
+
sig { returns(T.nilable(String)) }
|
|
805
|
+
attr_reader :certificate_ref
|
|
806
|
+
|
|
807
|
+
sig { params(certificate_ref: String).void }
|
|
808
|
+
attr_writer :certificate_ref
|
|
809
|
+
|
|
810
|
+
# When `true`, Telnyx forwards the assistant's dynamic variables to the external
|
|
811
|
+
# LLM endpoint as a top-level `extra_metadata` object on the chat completion
|
|
812
|
+
# request body. Defaults to `false`. Example payload sent to the external
|
|
813
|
+
# endpoint:
|
|
814
|
+
# `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
|
|
815
|
+
# Distinct from OpenAI's native `metadata` field, which has its own size and type
|
|
816
|
+
# limits.
|
|
817
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
818
|
+
attr_reader :forward_metadata
|
|
819
|
+
|
|
820
|
+
sig { params(forward_metadata: T::Boolean).void }
|
|
821
|
+
attr_writer :forward_metadata
|
|
822
|
+
|
|
823
|
+
# Integration secret identifier for the external LLM API key.
|
|
824
|
+
sig { returns(T.nilable(String)) }
|
|
825
|
+
attr_reader :llm_api_key_ref
|
|
826
|
+
|
|
827
|
+
sig { params(llm_api_key_ref: String).void }
|
|
828
|
+
attr_writer :llm_api_key_ref
|
|
829
|
+
|
|
830
|
+
# URL used to retrieve an access token when certificate authentication is enabled.
|
|
831
|
+
sig { returns(T.nilable(String)) }
|
|
832
|
+
attr_reader :token_retrieval_url
|
|
833
|
+
|
|
834
|
+
sig { params(token_retrieval_url: String).void }
|
|
835
|
+
attr_writer :token_retrieval_url
|
|
836
|
+
|
|
837
|
+
sig do
|
|
838
|
+
params(
|
|
839
|
+
base_url: String,
|
|
840
|
+
model: String,
|
|
841
|
+
authentication_method:
|
|
842
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod::OrSymbol,
|
|
843
|
+
certificate_ref: String,
|
|
844
|
+
forward_metadata: T::Boolean,
|
|
845
|
+
llm_api_key_ref: String,
|
|
846
|
+
token_retrieval_url: String
|
|
847
|
+
).returns(T.attached_class)
|
|
848
|
+
end
|
|
849
|
+
def self.new(
|
|
850
|
+
# Base URL for the external LLM endpoint.
|
|
851
|
+
base_url:,
|
|
852
|
+
# Model identifier to use with the external LLM endpoint.
|
|
853
|
+
model:,
|
|
854
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
855
|
+
authentication_method: nil,
|
|
856
|
+
# Integration secret identifier for the client certificate used with certificate
|
|
857
|
+
# authentication.
|
|
858
|
+
certificate_ref: nil,
|
|
859
|
+
# When `true`, Telnyx forwards the assistant's dynamic variables to the external
|
|
860
|
+
# LLM endpoint as a top-level `extra_metadata` object on the chat completion
|
|
861
|
+
# request body. Defaults to `false`. Example payload sent to the external
|
|
862
|
+
# endpoint:
|
|
863
|
+
# `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
|
|
864
|
+
# Distinct from OpenAI's native `metadata` field, which has its own size and type
|
|
865
|
+
# limits.
|
|
866
|
+
forward_metadata: nil,
|
|
867
|
+
# Integration secret identifier for the external LLM API key.
|
|
868
|
+
llm_api_key_ref: nil,
|
|
869
|
+
# URL used to retrieve an access token when certificate authentication is enabled.
|
|
870
|
+
token_retrieval_url: nil
|
|
871
|
+
)
|
|
872
|
+
end
|
|
873
|
+
|
|
874
|
+
sig do
|
|
875
|
+
override.returns(
|
|
876
|
+
{
|
|
877
|
+
base_url: String,
|
|
878
|
+
model: String,
|
|
879
|
+
authentication_method:
|
|
880
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod::OrSymbol,
|
|
881
|
+
certificate_ref: String,
|
|
882
|
+
forward_metadata: T::Boolean,
|
|
883
|
+
llm_api_key_ref: String,
|
|
884
|
+
token_retrieval_url: String
|
|
885
|
+
}
|
|
886
|
+
)
|
|
887
|
+
end
|
|
888
|
+
def to_hash
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
892
|
+
module AuthenticationMethod
|
|
893
|
+
extend Telnyx::Internal::Type::Enum
|
|
894
|
+
|
|
895
|
+
TaggedSymbol =
|
|
896
|
+
T.type_alias do
|
|
897
|
+
T.all(
|
|
898
|
+
Symbol,
|
|
899
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod
|
|
900
|
+
)
|
|
901
|
+
end
|
|
902
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
903
|
+
|
|
904
|
+
TOKEN =
|
|
905
|
+
T.let(
|
|
906
|
+
:token,
|
|
907
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod::TaggedSymbol
|
|
908
|
+
)
|
|
909
|
+
CERTIFICATE =
|
|
910
|
+
T.let(
|
|
911
|
+
:certificate,
|
|
912
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod::TaggedSymbol
|
|
913
|
+
)
|
|
914
|
+
|
|
915
|
+
sig do
|
|
916
|
+
override.returns(
|
|
917
|
+
T::Array[
|
|
918
|
+
Telnyx::AI::AssistantCreateParams::FallbackConfig::ExternalLlm::AuthenticationMethod::TaggedSymbol
|
|
919
|
+
]
|
|
920
|
+
)
|
|
921
|
+
end
|
|
922
|
+
def self.values
|
|
923
|
+
end
|
|
924
|
+
end
|
|
925
|
+
end
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
class Integration < Telnyx::Internal::Type::BaseModel
|
|
929
|
+
OrHash =
|
|
930
|
+
T.type_alias do
|
|
931
|
+
T.any(
|
|
932
|
+
Telnyx::AI::AssistantCreateParams::Integration,
|
|
933
|
+
Telnyx::Internal::AnyHash
|
|
934
|
+
)
|
|
935
|
+
end
|
|
936
|
+
|
|
937
|
+
# Catalog integration ID to attach. This is the `id` from the integrations catalog
|
|
938
|
+
# at `/ai/integrations` (the same value also appears as `integration_id` on
|
|
939
|
+
# entries returned by `/ai/integrations/connections`). It is **not** the
|
|
940
|
+
# connection-level `id` from `/ai/integrations/connections`.
|
|
941
|
+
sig { returns(String) }
|
|
942
|
+
attr_accessor :integration_id
|
|
943
|
+
|
|
944
|
+
# Optional per-assistant allowlist of integration tool names. When omitted or
|
|
945
|
+
# empty, all tools allowed by the connected integration are available to the
|
|
946
|
+
# assistant.
|
|
947
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
948
|
+
attr_reader :allowed_list
|
|
949
|
+
|
|
950
|
+
sig { params(allowed_list: T::Array[String]).void }
|
|
951
|
+
attr_writer :allowed_list
|
|
952
|
+
|
|
953
|
+
# Reference to a connected integration attached to an assistant. Discover
|
|
954
|
+
# available integrations with `/ai/integrations` and connected integrations with
|
|
955
|
+
# `/ai/integrations/connections`.
|
|
956
|
+
sig do
|
|
957
|
+
params(
|
|
958
|
+
integration_id: String,
|
|
959
|
+
allowed_list: T::Array[String]
|
|
960
|
+
).returns(T.attached_class)
|
|
961
|
+
end
|
|
962
|
+
def self.new(
|
|
963
|
+
# Catalog integration ID to attach. This is the `id` from the integrations catalog
|
|
964
|
+
# at `/ai/integrations` (the same value also appears as `integration_id` on
|
|
965
|
+
# entries returned by `/ai/integrations/connections`). It is **not** the
|
|
966
|
+
# connection-level `id` from `/ai/integrations/connections`.
|
|
967
|
+
integration_id:,
|
|
968
|
+
# Optional per-assistant allowlist of integration tool names. When omitted or
|
|
969
|
+
# empty, all tools allowed by the connected integration are available to the
|
|
970
|
+
# assistant.
|
|
971
|
+
allowed_list: nil
|
|
972
|
+
)
|
|
973
|
+
end
|
|
974
|
+
|
|
975
|
+
sig do
|
|
976
|
+
override.returns(
|
|
977
|
+
{ integration_id: String, allowed_list: T::Array[String] }
|
|
978
|
+
)
|
|
979
|
+
end
|
|
980
|
+
def to_hash
|
|
981
|
+
end
|
|
982
|
+
end
|
|
983
|
+
|
|
984
|
+
class InterruptionSettings < Telnyx::Internal::Type::BaseModel
|
|
985
|
+
OrHash =
|
|
986
|
+
T.type_alias do
|
|
987
|
+
T.any(
|
|
988
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings,
|
|
989
|
+
Telnyx::Internal::AnyHash
|
|
990
|
+
)
|
|
991
|
+
end
|
|
992
|
+
|
|
993
|
+
# Whether users can interrupt the assistant while it is speaking.
|
|
994
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
995
|
+
attr_reader :enable
|
|
996
|
+
|
|
997
|
+
sig { params(enable: T::Boolean).void }
|
|
998
|
+
attr_writer :enable
|
|
999
|
+
|
|
1000
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
1001
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
1002
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
1003
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
1004
|
+
sig do
|
|
1005
|
+
returns(
|
|
1006
|
+
T.nilable(
|
|
1007
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan
|
|
1008
|
+
)
|
|
1009
|
+
)
|
|
1010
|
+
end
|
|
1011
|
+
attr_reader :start_speaking_plan
|
|
1012
|
+
|
|
1013
|
+
sig do
|
|
1014
|
+
params(
|
|
1015
|
+
start_speaking_plan:
|
|
1016
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan::OrHash
|
|
1017
|
+
).void
|
|
1018
|
+
end
|
|
1019
|
+
attr_writer :start_speaking_plan
|
|
1020
|
+
|
|
1021
|
+
# Settings for interruptions and how the assistant decides the user has finished
|
|
1022
|
+
# speaking. These timings are most relevant when using non turn-taking
|
|
1023
|
+
# transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
|
|
1024
|
+
# behavior is controlled by the transcription end-of-turn settings under
|
|
1025
|
+
# `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
|
|
1026
|
+
# `eager_eot_threshold`).
|
|
1027
|
+
sig do
|
|
1028
|
+
params(
|
|
1029
|
+
enable: T::Boolean,
|
|
1030
|
+
start_speaking_plan:
|
|
1031
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan::OrHash
|
|
1032
|
+
).returns(T.attached_class)
|
|
1033
|
+
end
|
|
1034
|
+
def self.new(
|
|
1035
|
+
# Whether users can interrupt the assistant while it is speaking.
|
|
1036
|
+
enable: nil,
|
|
1037
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
1038
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
1039
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
1040
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
1041
|
+
start_speaking_plan: nil
|
|
1042
|
+
)
|
|
1043
|
+
end
|
|
1044
|
+
|
|
1045
|
+
sig do
|
|
1046
|
+
override.returns(
|
|
1047
|
+
{
|
|
1048
|
+
enable: T::Boolean,
|
|
1049
|
+
start_speaking_plan:
|
|
1050
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan
|
|
1051
|
+
}
|
|
1052
|
+
)
|
|
1053
|
+
end
|
|
1054
|
+
def to_hash
|
|
1055
|
+
end
|
|
1056
|
+
|
|
1057
|
+
class StartSpeakingPlan < Telnyx::Internal::Type::BaseModel
|
|
1058
|
+
OrHash =
|
|
1059
|
+
T.type_alias do
|
|
1060
|
+
T.any(
|
|
1061
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan,
|
|
1062
|
+
Telnyx::Internal::AnyHash
|
|
1063
|
+
)
|
|
1064
|
+
end
|
|
1065
|
+
|
|
1066
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
1067
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
1068
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
1069
|
+
# `eager_eot_threshold`.
|
|
1070
|
+
sig do
|
|
1071
|
+
returns(
|
|
1072
|
+
T.nilable(
|
|
1073
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan
|
|
1074
|
+
)
|
|
1075
|
+
)
|
|
1076
|
+
end
|
|
1077
|
+
attr_reader :transcription_endpointing_plan
|
|
1078
|
+
|
|
1079
|
+
sig do
|
|
1080
|
+
params(
|
|
1081
|
+
transcription_endpointing_plan:
|
|
1082
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan::OrHash
|
|
1083
|
+
).void
|
|
1084
|
+
end
|
|
1085
|
+
attr_writer :transcription_endpointing_plan
|
|
1086
|
+
|
|
1087
|
+
# Minimum seconds to wait before the assistant starts speaking.
|
|
1088
|
+
sig { returns(T.nilable(Float)) }
|
|
1089
|
+
attr_reader :wait_seconds
|
|
1090
|
+
|
|
1091
|
+
sig { params(wait_seconds: Float).void }
|
|
1092
|
+
attr_writer :wait_seconds
|
|
1093
|
+
|
|
1094
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
1095
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
1096
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
1097
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
1098
|
+
sig do
|
|
1099
|
+
params(
|
|
1100
|
+
transcription_endpointing_plan:
|
|
1101
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan::OrHash,
|
|
1102
|
+
wait_seconds: Float
|
|
1103
|
+
).returns(T.attached_class)
|
|
1104
|
+
end
|
|
1105
|
+
def self.new(
|
|
1106
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
1107
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
1108
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
1109
|
+
# `eager_eot_threshold`.
|
|
1110
|
+
transcription_endpointing_plan: nil,
|
|
1111
|
+
# Minimum seconds to wait before the assistant starts speaking.
|
|
1112
|
+
wait_seconds: nil
|
|
1113
|
+
)
|
|
1114
|
+
end
|
|
1115
|
+
|
|
1116
|
+
sig do
|
|
1117
|
+
override.returns(
|
|
1118
|
+
{
|
|
1119
|
+
transcription_endpointing_plan:
|
|
1120
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan,
|
|
1121
|
+
wait_seconds: Float
|
|
1122
|
+
}
|
|
1123
|
+
)
|
|
1124
|
+
end
|
|
1125
|
+
def to_hash
|
|
1126
|
+
end
|
|
1127
|
+
|
|
1128
|
+
class TranscriptionEndpointingPlan < Telnyx::Internal::Type::BaseModel
|
|
1129
|
+
OrHash =
|
|
1130
|
+
T.type_alias do
|
|
1131
|
+
T.any(
|
|
1132
|
+
Telnyx::AI::AssistantCreateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan,
|
|
1133
|
+
Telnyx::Internal::AnyHash
|
|
1134
|
+
)
|
|
1135
|
+
end
|
|
1136
|
+
|
|
1137
|
+
# Seconds to wait after the transcript ends without punctuation.
|
|
1138
|
+
sig { returns(T.nilable(Float)) }
|
|
1139
|
+
attr_reader :on_no_punctuation_seconds
|
|
1140
|
+
|
|
1141
|
+
sig { params(on_no_punctuation_seconds: Float).void }
|
|
1142
|
+
attr_writer :on_no_punctuation_seconds
|
|
1143
|
+
|
|
1144
|
+
# Seconds to wait after the transcript ends with a number.
|
|
1145
|
+
sig { returns(T.nilable(Float)) }
|
|
1146
|
+
attr_reader :on_number_seconds
|
|
1147
|
+
|
|
1148
|
+
sig { params(on_number_seconds: Float).void }
|
|
1149
|
+
attr_writer :on_number_seconds
|
|
1150
|
+
|
|
1151
|
+
# Seconds to wait after the transcript ends with punctuation.
|
|
1152
|
+
sig { returns(T.nilable(Float)) }
|
|
1153
|
+
attr_reader :on_punctuation_seconds
|
|
1154
|
+
|
|
1155
|
+
sig { params(on_punctuation_seconds: Float).void }
|
|
1156
|
+
attr_writer :on_punctuation_seconds
|
|
1157
|
+
|
|
1158
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
1159
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
1160
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
1161
|
+
# `eager_eot_threshold`.
|
|
1162
|
+
sig do
|
|
1163
|
+
params(
|
|
1164
|
+
on_no_punctuation_seconds: Float,
|
|
1165
|
+
on_number_seconds: Float,
|
|
1166
|
+
on_punctuation_seconds: Float
|
|
1167
|
+
).returns(T.attached_class)
|
|
1168
|
+
end
|
|
1169
|
+
def self.new(
|
|
1170
|
+
# Seconds to wait after the transcript ends without punctuation.
|
|
1171
|
+
on_no_punctuation_seconds: nil,
|
|
1172
|
+
# Seconds to wait after the transcript ends with a number.
|
|
1173
|
+
on_number_seconds: nil,
|
|
1174
|
+
# Seconds to wait after the transcript ends with punctuation.
|
|
1175
|
+
on_punctuation_seconds: nil
|
|
1176
|
+
)
|
|
1177
|
+
end
|
|
1178
|
+
|
|
1179
|
+
sig do
|
|
1180
|
+
override.returns(
|
|
1181
|
+
{
|
|
1182
|
+
on_no_punctuation_seconds: Float,
|
|
1183
|
+
on_number_seconds: Float,
|
|
1184
|
+
on_punctuation_seconds: Float
|
|
1185
|
+
}
|
|
1186
|
+
)
|
|
1187
|
+
end
|
|
1188
|
+
def to_hash
|
|
1189
|
+
end
|
|
1190
|
+
end
|
|
1191
|
+
end
|
|
1192
|
+
end
|
|
1193
|
+
|
|
1194
|
+
class McpServer < Telnyx::Internal::Type::BaseModel
|
|
1195
|
+
OrHash =
|
|
1196
|
+
T.type_alias do
|
|
1197
|
+
T.any(
|
|
1198
|
+
Telnyx::AI::AssistantCreateParams::McpServer,
|
|
1199
|
+
Telnyx::Internal::AnyHash
|
|
1200
|
+
)
|
|
1201
|
+
end
|
|
1202
|
+
|
|
1203
|
+
# ID of the MCP server to attach. This must be the `id` of an MCP server returned
|
|
1204
|
+
# by the `/ai/mcp_servers` endpoints.
|
|
1205
|
+
sig { returns(String) }
|
|
1206
|
+
attr_accessor :id
|
|
1207
|
+
|
|
1208
|
+
# Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
|
|
1209
|
+
# uses the MCP server's configured `allowed_tools`.
|
|
1210
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1211
|
+
attr_reader :allowed_tools
|
|
1212
|
+
|
|
1213
|
+
sig { params(allowed_tools: T::Array[String]).void }
|
|
1214
|
+
attr_writer :allowed_tools
|
|
1215
|
+
|
|
1216
|
+
# Reference to an MCP server attached to an assistant. Create and manage MCP
|
|
1217
|
+
# servers with the `/ai/mcp_servers` endpoints, then attach them to assistants by
|
|
1218
|
+
# ID.
|
|
1219
|
+
sig do
|
|
1220
|
+
params(id: String, allowed_tools: T::Array[String]).returns(
|
|
1221
|
+
T.attached_class
|
|
1222
|
+
)
|
|
1223
|
+
end
|
|
1224
|
+
def self.new(
|
|
1225
|
+
# ID of the MCP server to attach. This must be the `id` of an MCP server returned
|
|
1226
|
+
# by the `/ai/mcp_servers` endpoints.
|
|
1227
|
+
id:,
|
|
1228
|
+
# Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
|
|
1229
|
+
# uses the MCP server's configured `allowed_tools`.
|
|
1230
|
+
allowed_tools: nil
|
|
1231
|
+
)
|
|
1232
|
+
end
|
|
1233
|
+
|
|
1234
|
+
sig do
|
|
1235
|
+
override.returns({ id: String, allowed_tools: T::Array[String] })
|
|
1236
|
+
end
|
|
1237
|
+
def to_hash
|
|
1238
|
+
end
|
|
1239
|
+
end
|
|
1240
|
+
|
|
1241
|
+
class PostConversationSettings < Telnyx::Internal::Type::BaseModel
|
|
1242
|
+
OrHash =
|
|
1243
|
+
T.type_alias do
|
|
1244
|
+
T.any(
|
|
1245
|
+
Telnyx::AI::AssistantCreateParams::PostConversationSettings,
|
|
1246
|
+
Telnyx::Internal::AnyHash
|
|
1247
|
+
)
|
|
1248
|
+
end
|
|
1249
|
+
|
|
1250
|
+
# Whether post-conversation processing is enabled. When true, the assistant will
|
|
1251
|
+
# be invoked after the conversation ends to perform any final tool calls. Defaults
|
|
1252
|
+
# to false.
|
|
1253
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
1254
|
+
attr_reader :enabled
|
|
1255
|
+
|
|
1256
|
+
sig { params(enabled: T::Boolean).void }
|
|
1257
|
+
attr_writer :enabled
|
|
1258
|
+
|
|
1259
|
+
# Configuration for post-conversation processing. When enabled, the assistant
|
|
1260
|
+
# receives one additional LLM turn after the conversation ends, allowing it to
|
|
1261
|
+
# execute tool calls such as logging to a CRM or sending a summary. The assistant
|
|
1262
|
+
# can execute multiple parallel or sequential tools during this phase.
|
|
1263
|
+
# Telephony-control tools (e.g. hangup, transfer) are unavailable
|
|
1264
|
+
# post-conversation. Beta feature.
|
|
1265
|
+
sig { params(enabled: T::Boolean).returns(T.attached_class) }
|
|
1266
|
+
def self.new(
|
|
1267
|
+
# Whether post-conversation processing is enabled. When true, the assistant will
|
|
1268
|
+
# be invoked after the conversation ends to perform any final tool calls. Defaults
|
|
1269
|
+
# to false.
|
|
1270
|
+
enabled: nil
|
|
1271
|
+
)
|
|
1272
|
+
end
|
|
1273
|
+
|
|
1274
|
+
sig { override.returns({ enabled: T::Boolean }) }
|
|
1275
|
+
def to_hash
|
|
1276
|
+
end
|
|
1277
|
+
end
|
|
377
1278
|
end
|
|
378
1279
|
end
|
|
379
1280
|
end
|