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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/assistant_create_params.rb +480 -34
  5. data/lib/telnyx/models/ai/assistant_update_params.rb +481 -27
  6. data/lib/telnyx/models/ai/assistants/update_assistant.rb +487 -27
  7. data/lib/telnyx/models/ai/inference_embedding.rb +505 -26
  8. data/lib/telnyx/models/calls/transcription_start_request.rb +171 -3
  9. data/lib/telnyx/resources/ai/assistants/versions.rb +21 -9
  10. data/lib/telnyx/resources/ai/assistants.rb +41 -19
  11. data/lib/telnyx/resources/calls/actions.rb +1 -1
  12. data/lib/telnyx/version.rb +1 -1
  13. data/lib/telnyx.rb +0 -6
  14. data/rbi/telnyx/models/ai/assistant_create_params.rbi +945 -44
  15. data/rbi/telnyx/models/ai/assistant_update_params.rbi +945 -36
  16. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +967 -36
  17. data/rbi/telnyx/models/ai/inference_embedding.rbi +972 -36
  18. data/rbi/telnyx/models/calls/transcription_start_request.rbi +490 -0
  19. data/rbi/telnyx/resources/ai/assistants/versions.rbi +66 -16
  20. data/rbi/telnyx/resources/ai/assistants.rbi +122 -33
  21. data/rbi/telnyx/resources/calls/actions.rbi +2 -0
  22. data/sig/telnyx/models/ai/assistant_create_params.rbs +377 -23
  23. data/sig/telnyx/models/ai/assistant_update_params.rbs +377 -18
  24. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +380 -18
  25. data/sig/telnyx/models/ai/inference_embedding.rbs +399 -17
  26. data/sig/telnyx/models/calls/transcription_start_request.rbs +187 -1
  27. data/sig/telnyx/resources/ai/assistants/versions.rbs +9 -3
  28. data/sig/telnyx/resources/ai/assistants.rbs +18 -7
  29. metadata +1 -19
  30. data/lib/telnyx/models/ai/external_llm.rb +0 -87
  31. data/lib/telnyx/models/ai/external_llm_req.rb +0 -87
  32. data/lib/telnyx/models/ai/fallback_config.rb +0 -37
  33. data/lib/telnyx/models/ai/fallback_config_req.rb +0 -37
  34. data/lib/telnyx/models/ai/post_conversation_settings.rb +0 -30
  35. data/lib/telnyx/models/ai/post_conversation_settings_req.rb +0 -30
  36. data/rbi/telnyx/models/ai/external_llm.rbi +0 -157
  37. data/rbi/telnyx/models/ai/external_llm_req.rbi +0 -157
  38. data/rbi/telnyx/models/ai/fallback_config.rbi +0 -64
  39. data/rbi/telnyx/models/ai/fallback_config_req.rbi +0 -64
  40. data/rbi/telnyx/models/ai/post_conversation_settings.rbi +0 -45
  41. data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +0 -45
  42. data/sig/telnyx/models/ai/external_llm.rbs +0 -75
  43. data/sig/telnyx/models/ai/external_llm_req.rbs +0 -75
  44. data/sig/telnyx/models/ai/fallback_config.rbs +0 -38
  45. data/sig/telnyx/models/ai/fallback_config_req.rbs +0 -40
  46. data/sig/telnyx/models/ai/post_conversation_settings.rbs +0 -17
  47. data/sig/telnyx/models/ai/post_conversation_settings_req.rbs +0 -17
@@ -33,22 +33,32 @@ module Telnyx
33
33
  sig do
34
34
  params(
35
35
  instructions: String,
36
- model: String,
37
36
  name: String,
38
37
  description: String,
39
38
  dynamic_variables: T::Hash[Symbol, T.anything],
39
+ dynamic_variables_webhook_timeout_ms: Integer,
40
40
  dynamic_variables_webhook_url: String,
41
41
  enabled_features: T::Array[Telnyx::AI::EnabledFeatures::OrSymbol],
42
- external_llm: Telnyx::AI::ExternalLlmReq::OrHash,
43
- fallback_config: Telnyx::AI::FallbackConfigReq::OrHash,
42
+ external_llm:
43
+ Telnyx::AI::AssistantCreateParams::ExternalLlm::OrHash,
44
+ fallback_config:
45
+ Telnyx::AI::AssistantCreateParams::FallbackConfig::OrHash,
44
46
  greeting: String,
45
47
  insight_settings: Telnyx::AI::InsightSettings::OrHash,
48
+ integrations:
49
+ T::Array[Telnyx::AI::AssistantCreateParams::Integration::OrHash],
50
+ interruption_settings:
51
+ Telnyx::AI::AssistantCreateParams::InterruptionSettings::OrHash,
46
52
  llm_api_key_ref: String,
53
+ mcp_servers:
54
+ T::Array[Telnyx::AI::AssistantCreateParams::McpServer::OrHash],
47
55
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
56
+ model: String,
48
57
  observability_settings: Telnyx::AI::ObservabilityReq::OrHash,
49
58
  post_conversation_settings:
50
- Telnyx::AI::PostConversationSettingsReq::OrHash,
59
+ Telnyx::AI::AssistantCreateParams::PostConversationSettings::OrHash,
51
60
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
61
+ tags: T::Array[String],
52
62
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
53
63
  tool_ids: T::Array[String],
54
64
  tools:
@@ -76,18 +86,23 @@ module Telnyx
76
86
  # System instructions for the assistant. These may be templated with
77
87
  # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
78
88
  instructions:,
79
- # ID of the model to use. You can use the
80
- # [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
81
- # to see all of your available models,
82
- model:,
83
89
  name:,
84
90
  description: nil,
85
91
  # Map of dynamic variables and their default values
86
92
  dynamic_variables: nil,
87
- # If the dynamic_variables_webhook_url is set for the assistant, we will send a
88
- # request at the start of the conversation. See our
89
- # [guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
90
- # for more information.
93
+ # Timeout in milliseconds for the dynamic variables webhook. Must be between 1 and
94
+ # 10000 ms. If the webhook does not respond within this timeout, the call proceeds
95
+ # with default values. See the
96
+ # [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables).
97
+ dynamic_variables_webhook_timeout_ms: nil,
98
+ # If `dynamic_variables_webhook_url` is set, Telnyx sends a POST request to this
99
+ # URL at the start of the conversation to resolve dynamic variables. **Gotcha:**
100
+ # the webhook response must wrap variables under a top-level `dynamic_variables`
101
+ # object, e.g. `{"dynamic_variables": {"customer_name": "Jane"}}`. Returning a
102
+ # flat object will be ignored and variables will fall back to their defaults. See
103
+ # the
104
+ # [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
105
+ # for the full request/response format and timeout behavior.
91
106
  dynamic_variables_webhook_url: nil,
92
107
  enabled_features: nil,
93
108
  external_llm: nil,
@@ -100,13 +115,35 @@ module Telnyx
100
115
  # have the assistant generate the greeting based on the system instructions.
101
116
  greeting: nil,
102
117
  insight_settings: nil,
103
- # This is only needed when using third-party inference providers. The `identifier`
104
- # for an integration secret
118
+ # Connected integrations attached to the assistant. The catalog of available
119
+ # integrations is at `/ai/integrations`; the user's connected integrations are at
120
+ # `/ai/integrations/connections`. Each item references a catalog integration by
121
+ # `integration_id`.
122
+ integrations: nil,
123
+ # Settings for interruptions and how the assistant decides the user has finished
124
+ # speaking. These timings are most relevant when using non turn-taking
125
+ # transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
126
+ # behavior is controlled by the transcription end-of-turn settings under
127
+ # `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
128
+ # `eager_eot_threshold`).
129
+ interruption_settings: nil,
130
+ # This is only needed when using third-party inference providers selected by
131
+ # `model`. The `identifier` for an integration secret
105
132
  # [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
106
- # that refers to your LLM provider's API key. Warning: Free plans are unlikely to
107
- # work with this integration.
133
+ # that refers to your LLM provider's API key. For bring-your-own endpoint
134
+ # authentication, use `external_llm.llm_api_key_ref` instead. Warning: Free plans
135
+ # are unlikely to work with this integration.
108
136
  llm_api_key_ref: nil,
137
+ # MCP servers attached to the assistant. Create MCP servers with
138
+ # `/ai/mcp_servers`, then reference them by `id` here.
139
+ mcp_servers: nil,
109
140
  messaging_settings: nil,
141
+ # ID of the model to use when `external_llm` is not set. You can use the
142
+ # [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
143
+ # to see available models. If `external_llm` is provided, the assistant uses
144
+ # `external_llm` instead of this field. If neither `model` nor `external_llm` is
145
+ # provided, Telnyx applies the default model.
146
+ model: nil,
110
147
  observability_settings: nil,
111
148
  # Configuration for post-conversation processing. When enabled, the assistant
112
149
  # receives one additional LLM turn after the conversation ends, allowing it to
@@ -116,10 +153,16 @@ module Telnyx
116
153
  # post-conversation. Beta feature.
117
154
  post_conversation_settings: nil,
118
155
  privacy_settings: nil,
156
+ # Tags associated with the assistant. Tags can also be managed with the assistant
157
+ # tag endpoints.
158
+ tags: nil,
119
159
  telephony_settings: nil,
160
+ # IDs of shared tools to attach to the assistant. New integrations should prefer
161
+ # `tool_ids` over inline `tools`.
120
162
  tool_ids: nil,
121
- # The tools that the assistant can use. These may be templated with
122
- # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
163
+ # Deprecated for new integrations. Inline tool definitions available to the
164
+ # assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
165
+ # endpoints.
123
166
  tools: nil,
124
167
  transcription: nil,
125
168
  voice_settings: nil,
@@ -156,22 +199,32 @@ module Telnyx
156
199
  assistant_id: String,
157
200
  description: String,
158
201
  dynamic_variables: T::Hash[Symbol, T.anything],
202
+ dynamic_variables_webhook_timeout_ms: Integer,
159
203
  dynamic_variables_webhook_url: String,
160
204
  enabled_features: T::Array[Telnyx::AI::EnabledFeatures::OrSymbol],
161
- external_llm: Telnyx::AI::ExternalLlmReq::OrHash,
162
- fallback_config: Telnyx::AI::FallbackConfigReq::OrHash,
205
+ external_llm:
206
+ Telnyx::AI::AssistantUpdateParams::ExternalLlm::OrHash,
207
+ fallback_config:
208
+ Telnyx::AI::AssistantUpdateParams::FallbackConfig::OrHash,
163
209
  greeting: String,
164
210
  insight_settings: Telnyx::AI::InsightSettings::OrHash,
165
211
  instructions: String,
212
+ integrations:
213
+ T::Array[Telnyx::AI::AssistantUpdateParams::Integration::OrHash],
214
+ interruption_settings:
215
+ Telnyx::AI::AssistantUpdateParams::InterruptionSettings::OrHash,
166
216
  llm_api_key_ref: String,
217
+ mcp_servers:
218
+ T::Array[Telnyx::AI::AssistantUpdateParams::McpServer::OrHash],
167
219
  messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
168
220
  model: String,
169
221
  name: String,
170
222
  observability_settings: Telnyx::AI::ObservabilityReq::OrHash,
171
223
  post_conversation_settings:
172
- Telnyx::AI::PostConversationSettingsReq::OrHash,
224
+ Telnyx::AI::AssistantUpdateParams::PostConversationSettings::OrHash,
173
225
  privacy_settings: Telnyx::AI::PrivacySettings::OrHash,
174
226
  promote_to_main: T::Boolean,
227
+ tags: T::Array[String],
175
228
  telephony_settings: Telnyx::AI::TelephonySettings::OrHash,
176
229
  tool_ids: T::Array[String],
177
230
  tools:
@@ -190,6 +243,7 @@ module Telnyx
190
243
  )
191
244
  ],
192
245
  transcription: Telnyx::AI::TranscriptionSettings::OrHash,
246
+ version_name: String,
193
247
  voice_settings: Telnyx::AI::VoiceSettings::OrHash,
194
248
  widget_settings: Telnyx::AI::WidgetSettings::OrHash,
195
249
  request_options: Telnyx::RequestOptions::OrHash
@@ -200,10 +254,19 @@ module Telnyx
200
254
  description: nil,
201
255
  # Map of dynamic variables and their default values
202
256
  dynamic_variables: nil,
203
- # If the dynamic_variables_webhook_url is set for the assistant, we will send a
204
- # request at the start of the conversation. See our
205
- # [guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
206
- # for more information.
257
+ # Timeout in milliseconds for the dynamic variables webhook. Must be between 1 and
258
+ # 10000 ms. If the webhook does not respond within this timeout, the call proceeds
259
+ # with default values. See the
260
+ # [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables).
261
+ dynamic_variables_webhook_timeout_ms: nil,
262
+ # If `dynamic_variables_webhook_url` is set, Telnyx sends a POST request to this
263
+ # URL at the start of the conversation to resolve dynamic variables. **Gotcha:**
264
+ # the webhook response must wrap variables under a top-level `dynamic_variables`
265
+ # object, e.g. `{"dynamic_variables": {"customer_name": "Jane"}}`. Returning a
266
+ # flat object will be ignored and variables will fall back to their defaults. See
267
+ # the
268
+ # [dynamic variables guide](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
269
+ # for the full request/response format and timeout behavior.
207
270
  dynamic_variables_webhook_url: nil,
208
271
  enabled_features: nil,
209
272
  external_llm: nil,
@@ -219,16 +282,34 @@ module Telnyx
219
282
  # System instructions for the assistant. These may be templated with
220
283
  # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
221
284
  instructions: nil,
222
- # This is only needed when using third-party inference providers. The `identifier`
223
- # for an integration secret
285
+ # Connected integrations attached to the assistant. The catalog of available
286
+ # integrations is at `/ai/integrations`; the user's connected integrations are at
287
+ # `/ai/integrations/connections`. Each item references a catalog integration by
288
+ # `integration_id`.
289
+ integrations: nil,
290
+ # Settings for interruptions and how the assistant decides the user has finished
291
+ # speaking. These timings are most relevant when using non turn-taking
292
+ # transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
293
+ # behavior is controlled by the transcription end-of-turn settings under
294
+ # `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
295
+ # `eager_eot_threshold`).
296
+ interruption_settings: nil,
297
+ # This is only needed when using third-party inference providers selected by
298
+ # `model`. The `identifier` for an integration secret
224
299
  # [/v2/integration_secrets](https://developers.telnyx.com/api-reference/integration-secrets/create-a-secret)
225
- # that refers to your LLM provider's API key. Warning: Free plans are unlikely to
226
- # work with this integration.
300
+ # that refers to your LLM provider's API key. For bring-your-own endpoint
301
+ # authentication, use `external_llm.llm_api_key_ref` instead. Warning: Free plans
302
+ # are unlikely to work with this integration.
227
303
  llm_api_key_ref: nil,
304
+ # MCP servers attached to the assistant. Create MCP servers with
305
+ # `/ai/mcp_servers`, then reference them by `id` here.
306
+ mcp_servers: nil,
228
307
  messaging_settings: nil,
229
- # ID of the model to use. You can use the
308
+ # ID of the model to use when `external_llm` is not set. You can use the
230
309
  # [Get models API](https://developers.telnyx.com/api-reference/chat/get-available-models)
231
- # to see all of your available models,
310
+ # to see available models. If `external_llm` is provided, the assistant uses
311
+ # `external_llm` instead of this field. If neither `model` nor `external_llm` is
312
+ # provided, Telnyx applies the default model.
232
313
  model: nil,
233
314
  name: nil,
234
315
  observability_settings: nil,
@@ -243,12 +324,20 @@ module Telnyx
243
324
  # Indicates whether the assistant should be promoted to the main version. Defaults
244
325
  # to true.
245
326
  promote_to_main: nil,
327
+ # Tags associated with the assistant. Tags can also be managed with the assistant
328
+ # tag endpoints.
329
+ tags: nil,
246
330
  telephony_settings: nil,
331
+ # IDs of shared tools to attach to the assistant. New integrations should prefer
332
+ # `tool_ids` over inline `tools`.
247
333
  tool_ids: nil,
248
- # The tools that the assistant can use. These may be templated with
249
- # [dynamic variables](https://developers.telnyx.com/docs/inference/ai-assistants/dynamic-variables)
334
+ # Deprecated for new integrations. Inline tool definitions available to the
335
+ # assistant. Prefer `tool_ids` to attach shared tools created with the AI Tools
336
+ # endpoints.
250
337
  tools: nil,
251
338
  transcription: nil,
339
+ # Human-readable name for the assistant version.
340
+ version_name: nil,
252
341
  voice_settings: nil,
253
342
  # Configuration settings for the assistant's web widget.
254
343
  widget_settings: nil,
@@ -1650,6 +1650,8 @@ module Telnyx
1650
1650
  Telnyx::Calls::TranscriptionEngineGoogleConfig::OrHash,
1651
1651
  Telnyx::Calls::TranscriptionEngineTelnyxConfig::OrHash,
1652
1652
  Telnyx::Calls::TranscriptionEngineAzureConfig::OrHash,
1653
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::XAI::OrHash,
1654
+ Telnyx::Calls::TranscriptionStartRequest::TranscriptionEngineConfig::AssemblyAI::OrHash,
1653
1655
  Telnyx::Calls::TranscriptionEngineAConfig::OrHash,
1654
1656
  Telnyx::Calls::TranscriptionEngineBConfig::OrHash,
1655
1657
  Telnyx::Calls::DeepgramNova2Config::OrHash,