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
|
@@ -24,11 +24,24 @@ module Telnyx
|
|
|
24
24
|
# @return [Hash{Symbol=>Object}, nil]
|
|
25
25
|
optional :dynamic_variables, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
|
|
26
26
|
|
|
27
|
+
# @!attribute dynamic_variables_webhook_timeout_ms
|
|
28
|
+
# Timeout in milliseconds for the dynamic variables webhook. Must be between 1 and
|
|
29
|
+
# 10000 ms. If the webhook does not respond within this timeout, the call proceeds
|
|
30
|
+
# with default values. See the
|
|
31
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables).
|
|
32
|
+
#
|
|
33
|
+
# @return [Integer, nil]
|
|
34
|
+
optional :dynamic_variables_webhook_timeout_ms, Integer
|
|
35
|
+
|
|
27
36
|
# @!attribute dynamic_variables_webhook_url
|
|
28
|
-
# If
|
|
29
|
-
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
37
|
+
# If `dynamic_variables_webhook_url` is set, Telnyx sends a POST request to this
|
|
38
|
+
# URL at the start of the conversation to resolve dynamic variables. **Gotcha:**
|
|
39
|
+
# the webhook response must wrap variables under a top-level `dynamic_variables`
|
|
40
|
+
# object, e.g. `{"dynamic_variables": {"customer_name": "Jane"}}`. Returning a
|
|
41
|
+
# flat object will be ignored and variables will fall back to their defaults. See
|
|
42
|
+
# the
|
|
43
|
+
# [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
|
|
44
|
+
# for the full request/response format and timeout behavior.
|
|
32
45
|
#
|
|
33
46
|
# @return [String, nil]
|
|
34
47
|
optional :dynamic_variables_webhook_url, String
|
|
@@ -40,13 +53,13 @@ module Telnyx
|
|
|
40
53
|
|
|
41
54
|
# @!attribute external_llm
|
|
42
55
|
#
|
|
43
|
-
# @return [Telnyx::Models::AI::
|
|
44
|
-
optional :external_llm, -> { Telnyx::AI::
|
|
56
|
+
# @return [Telnyx::Models::AI::AssistantUpdateParams::ExternalLlm, nil]
|
|
57
|
+
optional :external_llm, -> { Telnyx::AI::AssistantUpdateParams::ExternalLlm }
|
|
45
58
|
|
|
46
59
|
# @!attribute fallback_config
|
|
47
60
|
#
|
|
48
|
-
# @return [Telnyx::Models::AI::
|
|
49
|
-
optional :fallback_config, -> { Telnyx::AI::
|
|
61
|
+
# @return [Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig, nil]
|
|
62
|
+
optional :fallback_config, -> { Telnyx::AI::AssistantUpdateParams::FallbackConfig }
|
|
50
63
|
|
|
51
64
|
# @!attribute greeting
|
|
52
65
|
# Text that the assistant will use to start the conversation. This may be
|
|
@@ -71,25 +84,57 @@ module Telnyx
|
|
|
71
84
|
# @return [String, nil]
|
|
72
85
|
optional :instructions, String
|
|
73
86
|
|
|
87
|
+
# @!attribute integrations
|
|
88
|
+
# Connected integrations attached to the assistant. The catalog of available
|
|
89
|
+
# integrations is at `/ai/integrations`; the user's connected integrations are at
|
|
90
|
+
# `/ai/integrations/connections`. Each item references a catalog integration by
|
|
91
|
+
# `integration_id`.
|
|
92
|
+
#
|
|
93
|
+
# @return [Array<Telnyx::Models::AI::AssistantUpdateParams::Integration>, nil]
|
|
94
|
+
optional :integrations,
|
|
95
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AssistantUpdateParams::Integration] }
|
|
96
|
+
|
|
97
|
+
# @!attribute interruption_settings
|
|
98
|
+
# Settings for interruptions and how the assistant decides the user has finished
|
|
99
|
+
# speaking. These timings are most relevant when using non turn-taking
|
|
100
|
+
# transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
|
|
101
|
+
# behavior is controlled by the transcription end-of-turn settings under
|
|
102
|
+
# `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
|
|
103
|
+
# `eager_eot_threshold`).
|
|
104
|
+
#
|
|
105
|
+
# @return [Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings, nil]
|
|
106
|
+
optional :interruption_settings, -> { Telnyx::AI::AssistantUpdateParams::InterruptionSettings }
|
|
107
|
+
|
|
74
108
|
# @!attribute llm_api_key_ref
|
|
75
|
-
# This is only needed when using third-party inference providers
|
|
76
|
-
# for an integration secret
|
|
109
|
+
# This is only needed when using third-party inference providers selected by
|
|
110
|
+
# `model`. The `identifier` for an integration secret
|
|
77
111
|
# [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
|
|
78
|
-
# that refers to your LLM provider's API key.
|
|
79
|
-
#
|
|
112
|
+
# that refers to your LLM provider's API key. For bring-your-own endpoint
|
|
113
|
+
# authentication, use `external_llm.llm_api_key_ref` instead. Warning: Free plans
|
|
114
|
+
# are unlikely to work with this integration.
|
|
80
115
|
#
|
|
81
116
|
# @return [String, nil]
|
|
82
117
|
optional :llm_api_key_ref, String
|
|
83
118
|
|
|
119
|
+
# @!attribute mcp_servers
|
|
120
|
+
# MCP servers attached to the assistant. Create MCP servers with
|
|
121
|
+
# `/ai/mcp_servers`, then reference them by `id` here.
|
|
122
|
+
#
|
|
123
|
+
# @return [Array<Telnyx::Models::AI::AssistantUpdateParams::McpServer>, nil]
|
|
124
|
+
optional :mcp_servers,
|
|
125
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::AssistantUpdateParams::McpServer] }
|
|
126
|
+
|
|
84
127
|
# @!attribute messaging_settings
|
|
85
128
|
#
|
|
86
129
|
# @return [Telnyx::Models::AI::MessagingSettings, nil]
|
|
87
130
|
optional :messaging_settings, -> { Telnyx::AI::MessagingSettings }
|
|
88
131
|
|
|
89
132
|
# @!attribute model
|
|
90
|
-
# ID of the model to use. You can use the
|
|
133
|
+
# ID of the model to use when `external_llm` is not set. You can use the
|
|
91
134
|
# [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
|
|
92
|
-
# to see
|
|
135
|
+
# to see available models. If `external_llm` is provided, the assistant uses
|
|
136
|
+
# `external_llm` instead of this field. If neither `model` nor `external_llm` is
|
|
137
|
+
# provided, Telnyx applies the default model.
|
|
93
138
|
#
|
|
94
139
|
# @return [String, nil]
|
|
95
140
|
optional :model, String
|
|
@@ -112,8 +157,8 @@ module Telnyx
|
|
|
112
157
|
# Telephony-control tools (e.g. hangup, transfer) are unavailable
|
|
113
158
|
# post-conversation. Beta feature.
|
|
114
159
|
#
|
|
115
|
-
# @return [Telnyx::Models::AI::
|
|
116
|
-
optional :post_conversation_settings, -> { Telnyx::AI::
|
|
160
|
+
# @return [Telnyx::Models::AI::AssistantUpdateParams::PostConversationSettings, nil]
|
|
161
|
+
optional :post_conversation_settings, -> { Telnyx::AI::AssistantUpdateParams::PostConversationSettings }
|
|
117
162
|
|
|
118
163
|
# @!attribute privacy_settings
|
|
119
164
|
#
|
|
@@ -127,19 +172,29 @@ module Telnyx
|
|
|
127
172
|
# @return [Boolean, nil]
|
|
128
173
|
optional :promote_to_main, Telnyx::Internal::Type::Boolean
|
|
129
174
|
|
|
175
|
+
# @!attribute tags
|
|
176
|
+
# Tags associated with the assistant. Tags can also be managed with the assistant
|
|
177
|
+
# tag endpoints.
|
|
178
|
+
#
|
|
179
|
+
# @return [Array<String>, nil]
|
|
180
|
+
optional :tags, Telnyx::Internal::Type::ArrayOf[String]
|
|
181
|
+
|
|
130
182
|
# @!attribute telephony_settings
|
|
131
183
|
#
|
|
132
184
|
# @return [Telnyx::Models::AI::TelephonySettings, nil]
|
|
133
185
|
optional :telephony_settings, -> { Telnyx::AI::TelephonySettings }
|
|
134
186
|
|
|
135
187
|
# @!attribute tool_ids
|
|
188
|
+
# IDs of shared tools to attach to the assistant. New integrations should prefer
|
|
189
|
+
# `tool_ids` over inline `tools`.
|
|
136
190
|
#
|
|
137
191
|
# @return [Array<String>, nil]
|
|
138
192
|
optional :tool_ids, Telnyx::Internal::Type::ArrayOf[String]
|
|
139
193
|
|
|
140
194
|
# @!attribute tools
|
|
141
|
-
#
|
|
142
|
-
#
|
|
195
|
+
# Deprecated for new integrations. Inline tool definitions available to the
|
|
196
|
+
# assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
|
|
197
|
+
# endpoints.
|
|
143
198
|
#
|
|
144
199
|
# @return [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>, nil]
|
|
145
200
|
optional :tools, -> { Telnyx::Internal::Type::ArrayOf[union: Telnyx::AI::AssistantTool] }
|
|
@@ -149,6 +204,12 @@ module Telnyx
|
|
|
149
204
|
# @return [Telnyx::Models::AI::TranscriptionSettings, nil]
|
|
150
205
|
optional :transcription, -> { Telnyx::AI::TranscriptionSettings }
|
|
151
206
|
|
|
207
|
+
# @!attribute version_name
|
|
208
|
+
# Human-readable name for the assistant version.
|
|
209
|
+
#
|
|
210
|
+
# @return [String, nil]
|
|
211
|
+
optional :version_name, String
|
|
212
|
+
|
|
152
213
|
# @!attribute voice_settings
|
|
153
214
|
#
|
|
154
215
|
# @return [Telnyx::Models::AI::VoiceSettings, nil]
|
|
@@ -160,7 +221,7 @@ module Telnyx
|
|
|
160
221
|
# @return [Telnyx::Models::AI::WidgetSettings, nil]
|
|
161
222
|
optional :widget_settings, -> { Telnyx::AI::WidgetSettings }
|
|
162
223
|
|
|
163
|
-
# @!method initialize(assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, external_llm: nil, fallback_config: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, promote_to_main: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
224
|
+
# @!method initialize(assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_timeout_ms: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, external_llm: nil, fallback_config: nil, greeting: nil, insight_settings: nil, instructions: nil, integrations: nil, interruption_settings: nil, llm_api_key_ref: nil, mcp_servers: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, promote_to_main: nil, tags: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, version_name: nil, voice_settings: nil, widget_settings: nil, request_options: {})
|
|
164
225
|
# Some parameter documentations has been truncated, see
|
|
165
226
|
# {Telnyx::Models::AI::AssistantUpdateParams} for more details.
|
|
166
227
|
#
|
|
@@ -170,13 +231,15 @@ module Telnyx
|
|
|
170
231
|
#
|
|
171
232
|
# @param dynamic_variables [Hash{Symbol=>Object}] Map of dynamic variables and their default values
|
|
172
233
|
#
|
|
173
|
-
# @param
|
|
234
|
+
# @param dynamic_variables_webhook_timeout_ms [Integer] Timeout in milliseconds for the dynamic variables webhook. Must be between 1 and
|
|
235
|
+
#
|
|
236
|
+
# @param dynamic_variables_webhook_url [String] If `dynamic_variables_webhook_url` is set, Telnyx sends a POST request to this U
|
|
174
237
|
#
|
|
175
238
|
# @param enabled_features [Array<Symbol, Telnyx::Models::AI::EnabledFeatures>]
|
|
176
239
|
#
|
|
177
|
-
# @param external_llm [Telnyx::Models::AI::
|
|
240
|
+
# @param external_llm [Telnyx::Models::AI::AssistantUpdateParams::ExternalLlm]
|
|
178
241
|
#
|
|
179
|
-
# @param fallback_config [Telnyx::Models::AI::
|
|
242
|
+
# @param fallback_config [Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig]
|
|
180
243
|
#
|
|
181
244
|
# @param greeting [String] Text that the assistant will use to start the conversation. This may be template
|
|
182
245
|
#
|
|
@@ -184,35 +247,426 @@ module Telnyx
|
|
|
184
247
|
#
|
|
185
248
|
# @param instructions [String] System instructions for the assistant. These may be templated with [dynamic vari
|
|
186
249
|
#
|
|
187
|
-
# @param
|
|
250
|
+
# @param integrations [Array<Telnyx::Models::AI::AssistantUpdateParams::Integration>] Connected integrations attached to the assistant. The catalog of available integ
|
|
251
|
+
#
|
|
252
|
+
# @param interruption_settings [Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings] Settings for interruptions and how the assistant decides the user has finished s
|
|
253
|
+
#
|
|
254
|
+
# @param llm_api_key_ref [String] This is only needed when using third-party inference providers selected by `mode
|
|
255
|
+
#
|
|
256
|
+
# @param mcp_servers [Array<Telnyx::Models::AI::AssistantUpdateParams::McpServer>] MCP servers attached to the assistant. Create MCP servers with `/ai/mcp_servers`
|
|
188
257
|
#
|
|
189
258
|
# @param messaging_settings [Telnyx::Models::AI::MessagingSettings]
|
|
190
259
|
#
|
|
191
|
-
# @param model [String] ID of the model to use. You can use the [Get
|
|
260
|
+
# @param model [String] ID of the model to use when `external_llm` is not set. You can use the [Get mode
|
|
192
261
|
#
|
|
193
262
|
# @param name [String]
|
|
194
263
|
#
|
|
195
264
|
# @param observability_settings [Telnyx::Models::AI::ObservabilityReq]
|
|
196
265
|
#
|
|
197
|
-
# @param post_conversation_settings [Telnyx::Models::AI::
|
|
266
|
+
# @param post_conversation_settings [Telnyx::Models::AI::AssistantUpdateParams::PostConversationSettings] Configuration for post-conversation processing. When enabled, the assistant rece
|
|
198
267
|
#
|
|
199
268
|
# @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
|
|
200
269
|
#
|
|
201
270
|
# @param promote_to_main [Boolean] Indicates whether the assistant should be promoted to the main version. Defaults
|
|
202
271
|
#
|
|
272
|
+
# @param tags [Array<String>] Tags associated with the assistant. Tags can also be managed with the assistant
|
|
273
|
+
#
|
|
203
274
|
# @param telephony_settings [Telnyx::Models::AI::TelephonySettings]
|
|
204
275
|
#
|
|
205
|
-
# @param tool_ids [Array<String>]
|
|
276
|
+
# @param tool_ids [Array<String>] IDs of shared tools to attach to the assistant. New integrations should prefer `
|
|
206
277
|
#
|
|
207
|
-
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>]
|
|
278
|
+
# @param tools [Array<Telnyx::Models::AI::InferenceEmbeddingWebhookToolParams, Telnyx::Models::AI::RetrievalTool, Telnyx::Models::AI::AssistantTool::Handoff, Telnyx::Models::AI::HangupTool, Telnyx::Models::AI::AssistantTool::Transfer, Telnyx::Models::AI::AssistantTool::Invite, Telnyx::Models::AI::AssistantTool::Refer, Telnyx::Models::AI::AssistantTool::SendDtmf, Telnyx::Models::AI::AssistantTool::SendMessage, Telnyx::Models::AI::AssistantTool::SkipTurn>] Deprecated for new integrations. Inline tool definitions available to the assist
|
|
208
279
|
#
|
|
209
280
|
# @param transcription [Telnyx::Models::AI::TranscriptionSettings]
|
|
210
281
|
#
|
|
282
|
+
# @param version_name [String] Human-readable name for the assistant version.
|
|
283
|
+
#
|
|
211
284
|
# @param voice_settings [Telnyx::Models::AI::VoiceSettings]
|
|
212
285
|
#
|
|
213
286
|
# @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
|
|
214
287
|
#
|
|
215
288
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
289
|
+
|
|
290
|
+
class ExternalLlm < Telnyx::Internal::Type::BaseModel
|
|
291
|
+
# @!attribute base_url
|
|
292
|
+
# Base URL for the external LLM endpoint.
|
|
293
|
+
#
|
|
294
|
+
# @return [String]
|
|
295
|
+
required :base_url, String
|
|
296
|
+
|
|
297
|
+
# @!attribute model
|
|
298
|
+
# Model identifier to use with the external LLM endpoint.
|
|
299
|
+
#
|
|
300
|
+
# @return [String]
|
|
301
|
+
required :model, String
|
|
302
|
+
|
|
303
|
+
# @!attribute authentication_method
|
|
304
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
305
|
+
#
|
|
306
|
+
# @return [Symbol, Telnyx::Models::AI::AssistantUpdateParams::ExternalLlm::AuthenticationMethod, nil]
|
|
307
|
+
optional :authentication_method,
|
|
308
|
+
enum: -> { Telnyx::AI::AssistantUpdateParams::ExternalLlm::AuthenticationMethod }
|
|
309
|
+
|
|
310
|
+
# @!attribute certificate_ref
|
|
311
|
+
# Integration secret identifier for the client certificate used with certificate
|
|
312
|
+
# authentication.
|
|
313
|
+
#
|
|
314
|
+
# @return [String, nil]
|
|
315
|
+
optional :certificate_ref, String
|
|
316
|
+
|
|
317
|
+
# @!attribute forward_metadata
|
|
318
|
+
# When `true`, Telnyx forwards the assistant's dynamic variables to the external
|
|
319
|
+
# LLM endpoint as a top-level `extra_metadata` object on the chat completion
|
|
320
|
+
# request body. Defaults to `false`. Example payload sent to the external
|
|
321
|
+
# endpoint:
|
|
322
|
+
# `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
|
|
323
|
+
# Distinct from OpenAI's native `metadata` field, which has its own size and type
|
|
324
|
+
# limits.
|
|
325
|
+
#
|
|
326
|
+
# @return [Boolean, nil]
|
|
327
|
+
optional :forward_metadata, Telnyx::Internal::Type::Boolean
|
|
328
|
+
|
|
329
|
+
# @!attribute llm_api_key_ref
|
|
330
|
+
# Integration secret identifier for the external LLM API key.
|
|
331
|
+
#
|
|
332
|
+
# @return [String, nil]
|
|
333
|
+
optional :llm_api_key_ref, String
|
|
334
|
+
|
|
335
|
+
# @!attribute token_retrieval_url
|
|
336
|
+
# URL used to retrieve an access token when certificate authentication is enabled.
|
|
337
|
+
#
|
|
338
|
+
# @return [String, nil]
|
|
339
|
+
optional :token_retrieval_url, String
|
|
340
|
+
|
|
341
|
+
# @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
|
|
342
|
+
# Some parameter documentations has been truncated, see
|
|
343
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::ExternalLlm} for more details.
|
|
344
|
+
#
|
|
345
|
+
# @param base_url [String] Base URL for the external LLM endpoint.
|
|
346
|
+
#
|
|
347
|
+
# @param model [String] Model identifier to use with the external LLM endpoint.
|
|
348
|
+
#
|
|
349
|
+
# @param authentication_method [Symbol, Telnyx::Models::AI::AssistantUpdateParams::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
|
|
350
|
+
#
|
|
351
|
+
# @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
|
|
352
|
+
#
|
|
353
|
+
# @param forward_metadata [Boolean] When `true`, Telnyx forwards the assistant's dynamic variables to the external L
|
|
354
|
+
#
|
|
355
|
+
# @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
|
|
356
|
+
#
|
|
357
|
+
# @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
|
|
358
|
+
|
|
359
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
360
|
+
#
|
|
361
|
+
# @see Telnyx::Models::AI::AssistantUpdateParams::ExternalLlm#authentication_method
|
|
362
|
+
module AuthenticationMethod
|
|
363
|
+
extend Telnyx::Internal::Type::Enum
|
|
364
|
+
|
|
365
|
+
TOKEN = :token
|
|
366
|
+
CERTIFICATE = :certificate
|
|
367
|
+
|
|
368
|
+
# @!method self.values
|
|
369
|
+
# @return [Array<Symbol>]
|
|
370
|
+
end
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
class FallbackConfig < Telnyx::Internal::Type::BaseModel
|
|
374
|
+
# @!attribute external_llm
|
|
375
|
+
#
|
|
376
|
+
# @return [Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm, nil]
|
|
377
|
+
optional :external_llm, -> { Telnyx::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm }
|
|
378
|
+
|
|
379
|
+
# @!attribute llm_api_key_ref
|
|
380
|
+
# Integration secret identifier for the fallback model API key.
|
|
381
|
+
#
|
|
382
|
+
# @return [String, nil]
|
|
383
|
+
optional :llm_api_key_ref, String
|
|
384
|
+
|
|
385
|
+
# @!attribute model
|
|
386
|
+
# Fallback Telnyx-hosted model to use when the primary LLM provider is
|
|
387
|
+
# unavailable.
|
|
388
|
+
#
|
|
389
|
+
# @return [String, nil]
|
|
390
|
+
optional :model, String
|
|
391
|
+
|
|
392
|
+
# @!method initialize(external_llm: nil, llm_api_key_ref: nil, model: nil)
|
|
393
|
+
# Some parameter documentations has been truncated, see
|
|
394
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig} for more details.
|
|
395
|
+
#
|
|
396
|
+
# @param external_llm [Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm]
|
|
397
|
+
#
|
|
398
|
+
# @param llm_api_key_ref [String] Integration secret identifier for the fallback model API key.
|
|
399
|
+
#
|
|
400
|
+
# @param model [String] Fallback Telnyx-hosted model to use when the primary LLM provider is unavailable
|
|
401
|
+
|
|
402
|
+
# @see Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig#external_llm
|
|
403
|
+
class ExternalLlm < Telnyx::Internal::Type::BaseModel
|
|
404
|
+
# @!attribute base_url
|
|
405
|
+
# Base URL for the external LLM endpoint.
|
|
406
|
+
#
|
|
407
|
+
# @return [String]
|
|
408
|
+
required :base_url, String
|
|
409
|
+
|
|
410
|
+
# @!attribute model
|
|
411
|
+
# Model identifier to use with the external LLM endpoint.
|
|
412
|
+
#
|
|
413
|
+
# @return [String]
|
|
414
|
+
required :model, String
|
|
415
|
+
|
|
416
|
+
# @!attribute authentication_method
|
|
417
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
418
|
+
#
|
|
419
|
+
# @return [Symbol, Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm::AuthenticationMethod, nil]
|
|
420
|
+
optional :authentication_method,
|
|
421
|
+
enum: -> { Telnyx::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm::AuthenticationMethod }
|
|
422
|
+
|
|
423
|
+
# @!attribute certificate_ref
|
|
424
|
+
# Integration secret identifier for the client certificate used with certificate
|
|
425
|
+
# authentication.
|
|
426
|
+
#
|
|
427
|
+
# @return [String, nil]
|
|
428
|
+
optional :certificate_ref, String
|
|
429
|
+
|
|
430
|
+
# @!attribute forward_metadata
|
|
431
|
+
# When `true`, Telnyx forwards the assistant's dynamic variables to the external
|
|
432
|
+
# LLM endpoint as a top-level `extra_metadata` object on the chat completion
|
|
433
|
+
# request body. Defaults to `false`. Example payload sent to the external
|
|
434
|
+
# endpoint:
|
|
435
|
+
# `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
|
|
436
|
+
# Distinct from OpenAI's native `metadata` field, which has its own size and type
|
|
437
|
+
# limits.
|
|
438
|
+
#
|
|
439
|
+
# @return [Boolean, nil]
|
|
440
|
+
optional :forward_metadata, Telnyx::Internal::Type::Boolean
|
|
441
|
+
|
|
442
|
+
# @!attribute llm_api_key_ref
|
|
443
|
+
# Integration secret identifier for the external LLM API key.
|
|
444
|
+
#
|
|
445
|
+
# @return [String, nil]
|
|
446
|
+
optional :llm_api_key_ref, String
|
|
447
|
+
|
|
448
|
+
# @!attribute token_retrieval_url
|
|
449
|
+
# URL used to retrieve an access token when certificate authentication is enabled.
|
|
450
|
+
#
|
|
451
|
+
# @return [String, nil]
|
|
452
|
+
optional :token_retrieval_url, String
|
|
453
|
+
|
|
454
|
+
# @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
|
|
455
|
+
# Some parameter documentations has been truncated, see
|
|
456
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm} for
|
|
457
|
+
# more details.
|
|
458
|
+
#
|
|
459
|
+
# @param base_url [String] Base URL for the external LLM endpoint.
|
|
460
|
+
#
|
|
461
|
+
# @param model [String] Model identifier to use with the external LLM endpoint.
|
|
462
|
+
#
|
|
463
|
+
# @param authentication_method [Symbol, Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
|
|
464
|
+
#
|
|
465
|
+
# @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
|
|
466
|
+
#
|
|
467
|
+
# @param forward_metadata [Boolean] When `true`, Telnyx forwards the assistant's dynamic variables to the external L
|
|
468
|
+
#
|
|
469
|
+
# @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
|
|
470
|
+
#
|
|
471
|
+
# @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
|
|
472
|
+
|
|
473
|
+
# Authentication method used when connecting to the external LLM endpoint.
|
|
474
|
+
#
|
|
475
|
+
# @see Telnyx::Models::AI::AssistantUpdateParams::FallbackConfig::ExternalLlm#authentication_method
|
|
476
|
+
module AuthenticationMethod
|
|
477
|
+
extend Telnyx::Internal::Type::Enum
|
|
478
|
+
|
|
479
|
+
TOKEN = :token
|
|
480
|
+
CERTIFICATE = :certificate
|
|
481
|
+
|
|
482
|
+
# @!method self.values
|
|
483
|
+
# @return [Array<Symbol>]
|
|
484
|
+
end
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
class Integration < Telnyx::Internal::Type::BaseModel
|
|
489
|
+
# @!attribute integration_id
|
|
490
|
+
# Catalog integration ID to attach. This is the `id` from the integrations catalog
|
|
491
|
+
# at `/ai/integrations` (the same value also appears as `integration_id` on
|
|
492
|
+
# entries returned by `/ai/integrations/connections`). It is **not** the
|
|
493
|
+
# connection-level `id` from `/ai/integrations/connections`.
|
|
494
|
+
#
|
|
495
|
+
# @return [String]
|
|
496
|
+
required :integration_id, String
|
|
497
|
+
|
|
498
|
+
# @!attribute allowed_list
|
|
499
|
+
# Optional per-assistant allowlist of integration tool names. When omitted or
|
|
500
|
+
# empty, all tools allowed by the connected integration are available to the
|
|
501
|
+
# assistant.
|
|
502
|
+
#
|
|
503
|
+
# @return [Array<String>, nil]
|
|
504
|
+
optional :allowed_list, Telnyx::Internal::Type::ArrayOf[String]
|
|
505
|
+
|
|
506
|
+
# @!method initialize(integration_id:, allowed_list: nil)
|
|
507
|
+
# Some parameter documentations has been truncated, see
|
|
508
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::Integration} for more details.
|
|
509
|
+
#
|
|
510
|
+
# Reference to a connected integration attached to an assistant. Discover
|
|
511
|
+
# available integrations with `/ai/integrations` and connected integrations with
|
|
512
|
+
# `/ai/integrations/connections`.
|
|
513
|
+
#
|
|
514
|
+
# @param integration_id [String] Catalog integration ID to attach. This is the `id` from the integrations catalog
|
|
515
|
+
#
|
|
516
|
+
# @param allowed_list [Array<String>] Optional per-assistant allowlist of integration tool names. When omitted or empt
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
class InterruptionSettings < Telnyx::Internal::Type::BaseModel
|
|
520
|
+
# @!attribute enable
|
|
521
|
+
# Whether users can interrupt the assistant while it is speaking.
|
|
522
|
+
#
|
|
523
|
+
# @return [Boolean, nil]
|
|
524
|
+
optional :enable, Telnyx::Internal::Type::Boolean
|
|
525
|
+
|
|
526
|
+
# @!attribute start_speaking_plan
|
|
527
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
528
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
529
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
530
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
531
|
+
#
|
|
532
|
+
# @return [Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan, nil]
|
|
533
|
+
optional :start_speaking_plan,
|
|
534
|
+
-> { Telnyx::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan }
|
|
535
|
+
|
|
536
|
+
# @!method initialize(enable: nil, start_speaking_plan: nil)
|
|
537
|
+
# Some parameter documentations has been truncated, see
|
|
538
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings} for more
|
|
539
|
+
# details.
|
|
540
|
+
#
|
|
541
|
+
# Settings for interruptions and how the assistant decides the user has finished
|
|
542
|
+
# speaking. These timings are most relevant when using non turn-taking
|
|
543
|
+
# transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
|
|
544
|
+
# behavior is controlled by the transcription end-of-turn settings under
|
|
545
|
+
# `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
|
|
546
|
+
# `eager_eot_threshold`).
|
|
547
|
+
#
|
|
548
|
+
# @param enable [Boolean] Whether users can interrupt the assistant while it is speaking.
|
|
549
|
+
#
|
|
550
|
+
# @param start_speaking_plan [Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan] Controls when the assistant starts speaking after the user stops. These threshol
|
|
551
|
+
|
|
552
|
+
# @see Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings#start_speaking_plan
|
|
553
|
+
class StartSpeakingPlan < Telnyx::Internal::Type::BaseModel
|
|
554
|
+
# @!attribute transcription_endpointing_plan
|
|
555
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
556
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
557
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
558
|
+
# `eager_eot_threshold`.
|
|
559
|
+
#
|
|
560
|
+
# @return [Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan, nil]
|
|
561
|
+
optional :transcription_endpointing_plan,
|
|
562
|
+
-> { Telnyx::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan }
|
|
563
|
+
|
|
564
|
+
# @!attribute wait_seconds
|
|
565
|
+
# Minimum seconds to wait before the assistant starts speaking.
|
|
566
|
+
#
|
|
567
|
+
# @return [Float, nil]
|
|
568
|
+
optional :wait_seconds, Float
|
|
569
|
+
|
|
570
|
+
# @!method initialize(transcription_endpointing_plan: nil, wait_seconds: nil)
|
|
571
|
+
# Some parameter documentations has been truncated, see
|
|
572
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan}
|
|
573
|
+
# for more details.
|
|
574
|
+
#
|
|
575
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
576
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
577
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
578
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
579
|
+
#
|
|
580
|
+
# @param transcription_endpointing_plan [Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan] Endpointing thresholds used to decide when the user has finished speaking. Appli
|
|
581
|
+
#
|
|
582
|
+
# @param wait_seconds [Float] Minimum seconds to wait before the assistant starts speaking.
|
|
583
|
+
|
|
584
|
+
# @see Telnyx::Models::AI::AssistantUpdateParams::InterruptionSettings::StartSpeakingPlan#transcription_endpointing_plan
|
|
585
|
+
class TranscriptionEndpointingPlan < Telnyx::Internal::Type::BaseModel
|
|
586
|
+
# @!attribute on_no_punctuation_seconds
|
|
587
|
+
# Seconds to wait after the transcript ends without punctuation.
|
|
588
|
+
#
|
|
589
|
+
# @return [Float, nil]
|
|
590
|
+
optional :on_no_punctuation_seconds, Float
|
|
591
|
+
|
|
592
|
+
# @!attribute on_number_seconds
|
|
593
|
+
# Seconds to wait after the transcript ends with a number.
|
|
594
|
+
#
|
|
595
|
+
# @return [Float, nil]
|
|
596
|
+
optional :on_number_seconds, Float
|
|
597
|
+
|
|
598
|
+
# @!attribute on_punctuation_seconds
|
|
599
|
+
# Seconds to wait after the transcript ends with punctuation.
|
|
600
|
+
#
|
|
601
|
+
# @return [Float, nil]
|
|
602
|
+
optional :on_punctuation_seconds, Float
|
|
603
|
+
|
|
604
|
+
# @!method initialize(on_no_punctuation_seconds: nil, on_number_seconds: nil, on_punctuation_seconds: nil)
|
|
605
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
606
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
607
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
608
|
+
# `eager_eot_threshold`.
|
|
609
|
+
#
|
|
610
|
+
# @param on_no_punctuation_seconds [Float] Seconds to wait after the transcript ends without punctuation.
|
|
611
|
+
#
|
|
612
|
+
# @param on_number_seconds [Float] Seconds to wait after the transcript ends with a number.
|
|
613
|
+
#
|
|
614
|
+
# @param on_punctuation_seconds [Float] Seconds to wait after the transcript ends with punctuation.
|
|
615
|
+
end
|
|
616
|
+
end
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
class McpServer < Telnyx::Internal::Type::BaseModel
|
|
620
|
+
# @!attribute id
|
|
621
|
+
# ID of the MCP server to attach. This must be the `id` of an MCP server returned
|
|
622
|
+
# by the `/ai/mcp_servers` endpoints.
|
|
623
|
+
#
|
|
624
|
+
# @return [String]
|
|
625
|
+
required :id, String
|
|
626
|
+
|
|
627
|
+
# @!attribute allowed_tools
|
|
628
|
+
# Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
|
|
629
|
+
# uses the MCP server's configured `allowed_tools`.
|
|
630
|
+
#
|
|
631
|
+
# @return [Array<String>, nil]
|
|
632
|
+
optional :allowed_tools, Telnyx::Internal::Type::ArrayOf[String]
|
|
633
|
+
|
|
634
|
+
# @!method initialize(id:, allowed_tools: nil)
|
|
635
|
+
# Some parameter documentations has been truncated, see
|
|
636
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::McpServer} for more details.
|
|
637
|
+
#
|
|
638
|
+
# Reference to an MCP server attached to an assistant. Create and manage MCP
|
|
639
|
+
# servers with the `/ai/mcp_servers` endpoints, then attach them to assistants by
|
|
640
|
+
# ID.
|
|
641
|
+
#
|
|
642
|
+
# @param id [String] ID of the MCP server to attach. This must be the `id` of an MCP server returned
|
|
643
|
+
#
|
|
644
|
+
# @param allowed_tools [Array<String>] Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
class PostConversationSettings < Telnyx::Internal::Type::BaseModel
|
|
648
|
+
# @!attribute enabled
|
|
649
|
+
# Whether post-conversation processing is enabled. When true, the assistant will
|
|
650
|
+
# be invoked after the conversation ends to perform any final tool calls. Defaults
|
|
651
|
+
# to false.
|
|
652
|
+
#
|
|
653
|
+
# @return [Boolean, nil]
|
|
654
|
+
optional :enabled, Telnyx::Internal::Type::Boolean
|
|
655
|
+
|
|
656
|
+
# @!method initialize(enabled: nil)
|
|
657
|
+
# Some parameter documentations has been truncated, see
|
|
658
|
+
# {Telnyx::Models::AI::AssistantUpdateParams::PostConversationSettings} for more
|
|
659
|
+
# details.
|
|
660
|
+
#
|
|
661
|
+
# Configuration for post-conversation processing. When enabled, the assistant
|
|
662
|
+
# receives one additional LLM turn after the conversation ends, allowing it to
|
|
663
|
+
# execute tool calls such as logging to a CRM or sending a summary. The assistant
|
|
664
|
+
# can execute multiple parallel or sequential tools during this phase.
|
|
665
|
+
# Telephony-control tools (e.g. hangup, transfer) are unavailable
|
|
666
|
+
# post-conversation. Beta feature.
|
|
667
|
+
#
|
|
668
|
+
# @param enabled [Boolean] Whether post-conversation processing is enabled. When true, the assistant will b
|
|
669
|
+
end
|
|
216
670
|
end
|
|
217
671
|
end
|
|
218
672
|
end
|