telnyx 5.92.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 +8 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/assistant_create_params.rb +265 -37
- data/lib/telnyx/models/ai/assistant_update_params.rb +266 -30
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +267 -30
- data/lib/telnyx/models/ai/inference_embedding.rb +287 -29
- data/lib/telnyx/resources/ai/assistants/versions.rb +18 -6
- data/lib/telnyx/resources/ai/assistants.rb +35 -13
- data/lib/telnyx/version.rb +1 -1
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +510 -52
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +510 -44
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +526 -44
- data/rbi/telnyx/models/ai/inference_embedding.rbi +540 -44
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +61 -13
- data/rbi/telnyx/resources/ai/assistants.rbi +112 -27
- data/sig/telnyx/models/ai/assistant_create_params.rbs +172 -5
- data/sig/telnyx/models/ai/assistant_update_params.rbs +172 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +175 -0
- data/sig/telnyx/models/ai/inference_embedding.rbs +193 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +6 -0
- data/sig/telnyx/resources/ai/assistants.rbs +12 -1
- metadata +1 -1
|
@@ -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
|
|
|
@@ -103,17 +117,75 @@ module Telnyx
|
|
|
103
117
|
sig { params(instructions: String).void }
|
|
104
118
|
attr_writer :instructions
|
|
105
119
|
|
|
106
|
-
#
|
|
107
|
-
#
|
|
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
|
|
108
162
|
# [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
109
|
-
# that refers to your LLM provider's API key.
|
|
110
|
-
#
|
|
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.
|
|
111
166
|
sig { returns(T.nilable(String)) }
|
|
112
167
|
attr_reader :llm_api_key_ref
|
|
113
168
|
|
|
114
169
|
sig { params(llm_api_key_ref: String).void }
|
|
115
170
|
attr_writer :llm_api_key_ref
|
|
116
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
|
+
|
|
117
189
|
sig { returns(T.nilable(Telnyx::AI::MessagingSettings)) }
|
|
118
190
|
attr_reader :messaging_settings
|
|
119
191
|
|
|
@@ -122,9 +194,11 @@ module Telnyx
|
|
|
122
194
|
end
|
|
123
195
|
attr_writer :messaging_settings
|
|
124
196
|
|
|
125
|
-
# 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
|
|
126
198
|
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
127
|
-
# 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.
|
|
128
202
|
sig { returns(T.nilable(String)) }
|
|
129
203
|
attr_reader :model
|
|
130
204
|
|
|
@@ -186,6 +260,14 @@ module Telnyx
|
|
|
186
260
|
sig { params(promote_to_main: T::Boolean).void }
|
|
187
261
|
attr_writer :promote_to_main
|
|
188
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
|
+
|
|
189
271
|
sig { returns(T.nilable(Telnyx::AI::TelephonySettings)) }
|
|
190
272
|
attr_reader :telephony_settings
|
|
191
273
|
|
|
@@ -194,14 +276,17 @@ module Telnyx
|
|
|
194
276
|
end
|
|
195
277
|
attr_writer :telephony_settings
|
|
196
278
|
|
|
279
|
+
# IDs of shared tools to attach to the assistant. New integrations should prefer
|
|
280
|
+
# `tool_ids` over inline `tools`.
|
|
197
281
|
sig { returns(T.nilable(T::Array[String])) }
|
|
198
282
|
attr_reader :tool_ids
|
|
199
283
|
|
|
200
284
|
sig { params(tool_ids: T::Array[String]).void }
|
|
201
285
|
attr_writer :tool_ids
|
|
202
286
|
|
|
203
|
-
#
|
|
204
|
-
#
|
|
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.
|
|
205
290
|
sig do
|
|
206
291
|
returns(
|
|
207
292
|
T.nilable(
|
|
@@ -253,6 +338,13 @@ module Telnyx
|
|
|
253
338
|
end
|
|
254
339
|
attr_writer :transcription
|
|
255
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
|
+
|
|
256
348
|
sig { returns(T.nilable(Telnyx::AI::VoiceSettings)) }
|
|
257
349
|
attr_reader :voice_settings
|
|
258
350
|
|
|
@@ -271,6 +363,7 @@ module Telnyx
|
|
|
271
363
|
assistant_id: String,
|
|
272
364
|
description: String,
|
|
273
365
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
366
|
+
dynamic_variables_webhook_timeout_ms: Integer,
|
|
274
367
|
dynamic_variables_webhook_url: String,
|
|
275
368
|
enabled_features: T::Array[Telnyx::AI::EnabledFeatures::OrSymbol],
|
|
276
369
|
external_llm:
|
|
@@ -280,7 +373,13 @@ module Telnyx
|
|
|
280
373
|
greeting: String,
|
|
281
374
|
insight_settings: Telnyx::AI::InsightSettings::OrHash,
|
|
282
375
|
instructions: String,
|
|
376
|
+
integrations:
|
|
377
|
+
T::Array[Telnyx::AI::AssistantUpdateParams::Integration::OrHash],
|
|
378
|
+
interruption_settings:
|
|
379
|
+
Telnyx::AI::AssistantUpdateParams::InterruptionSettings::OrHash,
|
|
283
380
|
llm_api_key_ref: String,
|
|
381
|
+
mcp_servers:
|
|
382
|
+
T::Array[Telnyx::AI::AssistantUpdateParams::McpServer::OrHash],
|
|
284
383
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
285
384
|
model: String,
|
|
286
385
|
name: String,
|
|
@@ -289,6 +388,7 @@ module Telnyx
|
|
|
289
388
|
Telnyx::AI::AssistantUpdateParams::PostConversationSettings::OrHash,
|
|
290
389
|
privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
|
|
291
390
|
promote_to_main: T::Boolean,
|
|
391
|
+
tags: T::Array[String],
|
|
292
392
|
telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
|
|
293
393
|
tool_ids: T::Array[String],
|
|
294
394
|
tools:
|
|
@@ -307,6 +407,7 @@ module Telnyx
|
|
|
307
407
|
)
|
|
308
408
|
],
|
|
309
409
|
transcription: Telnyx::AI::TranscriptionSettings::OrHash,
|
|
410
|
+
version_name: String,
|
|
310
411
|
voice_settings: Telnyx::AI::VoiceSettings::OrHash,
|
|
311
412
|
widget_settings: Telnyx::AI::WidgetSettings::OrHash,
|
|
312
413
|
request_options: Telnyx::RequestOptions::OrHash
|
|
@@ -317,10 +418,19 @@ module Telnyx
|
|
|
317
418
|
description: nil,
|
|
318
419
|
# Map of dynamic variables and their default values
|
|
319
420
|
dynamic_variables: nil,
|
|
320
|
-
#
|
|
321
|
-
#
|
|
322
|
-
#
|
|
323
|
-
#
|
|
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.
|
|
324
434
|
dynamic_variables_webhook_url: nil,
|
|
325
435
|
enabled_features: nil,
|
|
326
436
|
external_llm: nil,
|
|
@@ -336,16 +446,34 @@ module Telnyx
|
|
|
336
446
|
# System instructions for the assistant. These may be templated with
|
|
337
447
|
# [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
338
448
|
instructions: nil,
|
|
339
|
-
#
|
|
340
|
-
#
|
|
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
|
|
341
463
|
# [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
342
|
-
# that refers to your LLM provider's API key.
|
|
343
|
-
#
|
|
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.
|
|
344
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,
|
|
345
471
|
messaging_settings: nil,
|
|
346
|
-
# 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
|
|
347
473
|
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
348
|
-
# 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.
|
|
349
477
|
model: nil,
|
|
350
478
|
name: nil,
|
|
351
479
|
observability_settings: nil,
|
|
@@ -360,12 +488,20 @@ module Telnyx
|
|
|
360
488
|
# Indicates whether the assistant should be promoted to the main version. Defaults
|
|
361
489
|
# to true.
|
|
362
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,
|
|
363
494
|
telephony_settings: nil,
|
|
495
|
+
# IDs of shared tools to attach to the assistant. New integrations should prefer
|
|
496
|
+
# `tool_ids` over inline `tools`.
|
|
364
497
|
tool_ids: nil,
|
|
365
|
-
#
|
|
366
|
-
#
|
|
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.
|
|
367
501
|
tools: nil,
|
|
368
502
|
transcription: nil,
|
|
503
|
+
# Human-readable name for the assistant version.
|
|
504
|
+
version_name: nil,
|
|
369
505
|
voice_settings: nil,
|
|
370
506
|
# Configuration settings for the assistant's web widget.
|
|
371
507
|
widget_settings: nil,
|
|
@@ -379,6 +515,7 @@ module Telnyx
|
|
|
379
515
|
assistant_id: String,
|
|
380
516
|
description: String,
|
|
381
517
|
dynamic_variables: T::Hash[Symbol, T.anything],
|
|
518
|
+
dynamic_variables_webhook_timeout_ms: Integer,
|
|
382
519
|
dynamic_variables_webhook_url: String,
|
|
383
520
|
enabled_features: T::Array[Telnyx::AI::EnabledFeatures::OrSymbol],
|
|
384
521
|
external_llm: Telnyx::AI::AssistantUpdateParams::ExternalLlm,
|
|
@@ -387,7 +524,13 @@ module Telnyx
|
|
|
387
524
|
greeting: String,
|
|
388
525
|
insight_settings: Telnyx::AI::InsightSettings,
|
|
389
526
|
instructions: String,
|
|
527
|
+
integrations:
|
|
528
|
+
T::Array[Telnyx::AI::AssistantUpdateParams::Integration],
|
|
529
|
+
interruption_settings:
|
|
530
|
+
Telnyx::AI::AssistantUpdateParams::InterruptionSettings,
|
|
390
531
|
llm_api_key_ref: String,
|
|
532
|
+
mcp_servers:
|
|
533
|
+
T::Array[Telnyx::AI::AssistantUpdateParams::McpServer],
|
|
391
534
|
messaging_settings: Telnyx::AI::MessagingSettings,
|
|
392
535
|
model: String,
|
|
393
536
|
name: String,
|
|
@@ -396,6 +539,7 @@ module Telnyx
|
|
|
396
539
|
Telnyx::AI::AssistantUpdateParams::PostConversationSettings,
|
|
397
540
|
privacy_settings: Telnyx::AI::PrivacySettings,
|
|
398
541
|
promote_to_main: T::Boolean,
|
|
542
|
+
tags: T::Array[String],
|
|
399
543
|
telephony_settings: Telnyx::AI::TelephonySettings,
|
|
400
544
|
tool_ids: T::Array[String],
|
|
401
545
|
tools:
|
|
@@ -414,6 +558,7 @@ module Telnyx
|
|
|
414
558
|
)
|
|
415
559
|
],
|
|
416
560
|
transcription: Telnyx::AI::TranscriptionSettings,
|
|
561
|
+
version_name: String,
|
|
417
562
|
voice_settings: Telnyx::AI::VoiceSettings,
|
|
418
563
|
widget_settings: Telnyx::AI::WidgetSettings,
|
|
419
564
|
request_options: Telnyx::RequestOptions
|
|
@@ -466,11 +611,13 @@ module Telnyx
|
|
|
466
611
|
sig { params(certificate_ref: String).void }
|
|
467
612
|
attr_writer :certificate_ref
|
|
468
613
|
|
|
469
|
-
# When
|
|
470
|
-
# LLM endpoint
|
|
471
|
-
#
|
|
472
|
-
#
|
|
473
|
-
# `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
|
|
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.
|
|
474
621
|
sig { returns(T.nilable(T::Boolean)) }
|
|
475
622
|
attr_reader :forward_metadata
|
|
476
623
|
|
|
@@ -513,11 +660,13 @@ module Telnyx
|
|
|
513
660
|
# Integration secret identifier for the client certificate used with certificate
|
|
514
661
|
# authentication.
|
|
515
662
|
certificate_ref: nil,
|
|
516
|
-
# When
|
|
517
|
-
# LLM endpoint
|
|
518
|
-
#
|
|
519
|
-
#
|
|
520
|
-
# `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
|
|
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.
|
|
521
670
|
forward_metadata: nil,
|
|
522
671
|
# Integration secret identifier for the external LLM API key.
|
|
523
672
|
llm_api_key_ref: nil,
|
|
@@ -694,11 +843,13 @@ module Telnyx
|
|
|
694
843
|
sig { params(certificate_ref: String).void }
|
|
695
844
|
attr_writer :certificate_ref
|
|
696
845
|
|
|
697
|
-
# When
|
|
698
|
-
# LLM endpoint
|
|
699
|
-
#
|
|
700
|
-
#
|
|
701
|
-
# `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
|
|
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.
|
|
702
853
|
sig { returns(T.nilable(T::Boolean)) }
|
|
703
854
|
attr_reader :forward_metadata
|
|
704
855
|
|
|
@@ -741,11 +892,13 @@ module Telnyx
|
|
|
741
892
|
# Integration secret identifier for the client certificate used with certificate
|
|
742
893
|
# authentication.
|
|
743
894
|
certificate_ref: nil,
|
|
744
|
-
# When
|
|
745
|
-
# LLM endpoint
|
|
746
|
-
#
|
|
747
|
-
#
|
|
748
|
-
# `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
|
|
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.
|
|
749
902
|
forward_metadata: nil,
|
|
750
903
|
# Integration secret identifier for the external LLM API key.
|
|
751
904
|
llm_api_key_ref: nil,
|
|
@@ -808,6 +961,319 @@ module Telnyx
|
|
|
808
961
|
end
|
|
809
962
|
end
|
|
810
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
|
+
|
|
811
1277
|
class PostConversationSettings < Telnyx::Internal::Type::BaseModel
|
|
812
1278
|
OrHash =
|
|
813
1279
|
T.type_alias do
|