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