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