telnyx 5.91.0 → 5.92.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 +8 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/ai/assistant_create_params.rb +227 -9
  5. data/lib/telnyx/models/ai/assistant_update_params.rb +227 -9
  6. data/lib/telnyx/models/ai/assistants/update_assistant.rb +232 -9
  7. data/lib/telnyx/models/ai/inference_embedding.rb +230 -9
  8. data/lib/telnyx/models/calls/transcription_start_request.rb +171 -3
  9. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -3
  10. data/lib/telnyx/resources/ai/assistants.rb +6 -6
  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 +455 -12
  15. data/rbi/telnyx/models/ai/assistant_update_params.rbi +455 -12
  16. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +461 -12
  17. data/rbi/telnyx/models/ai/inference_embedding.rbi +452 -12
  18. data/rbi/telnyx/models/calls/transcription_start_request.rbi +490 -0
  19. data/rbi/telnyx/resources/ai/assistants/versions.rbi +5 -3
  20. data/rbi/telnyx/resources/ai/assistants.rbi +10 -6
  21. data/rbi/telnyx/resources/calls/actions.rbi +2 -0
  22. data/sig/telnyx/models/ai/assistant_create_params.rbs +205 -18
  23. data/sig/telnyx/models/ai/assistant_update_params.rbs +205 -18
  24. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +205 -18
  25. data/sig/telnyx/models/ai/inference_embedding.rbs +206 -17
  26. data/sig/telnyx/models/calls/transcription_start_request.rbs +187 -1
  27. data/sig/telnyx/resources/ai/assistants/versions.rbs +3 -3
  28. data/sig/telnyx/resources/ai/assistants.rbs +6 -6
  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
@@ -32,13 +32,13 @@ module Telnyx
32
32
 
33
33
  # @!attribute external_llm
34
34
  #
35
- # @return [Telnyx::Models::AI::ExternalLlmReq, nil]
36
- optional :external_llm, -> { Telnyx::AI::ExternalLlmReq }
35
+ # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm, nil]
36
+ optional :external_llm, -> { Telnyx::AI::Assistants::UpdateAssistant::ExternalLlm }
37
37
 
38
38
  # @!attribute fallback_config
39
39
  #
40
- # @return [Telnyx::Models::AI::FallbackConfigReq, nil]
41
- optional :fallback_config, -> { Telnyx::AI::FallbackConfigReq }
40
+ # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig, nil]
41
+ optional :fallback_config, -> { Telnyx::AI::Assistants::UpdateAssistant::FallbackConfig }
42
42
 
43
43
  # @!attribute greeting
44
44
  # Text that the assistant will use to start the conversation. This may be
@@ -104,8 +104,9 @@ module Telnyx
104
104
  # Telephony-control tools (e.g. hangup, transfer) are unavailable
105
105
  # post-conversation. Beta feature.
106
106
  #
107
- # @return [Telnyx::Models::AI::PostConversationSettingsReq, nil]
108
- optional :post_conversation_settings, -> { Telnyx::AI::PostConversationSettingsReq }
107
+ # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::PostConversationSettings, nil]
108
+ optional :post_conversation_settings,
109
+ -> { Telnyx::AI::Assistants::UpdateAssistant::PostConversationSettings }
109
110
 
110
111
  # @!attribute privacy_settings
111
112
  #
@@ -157,9 +158,9 @@ module Telnyx
157
158
  #
158
159
  # @param enabled_features [Array<Symbol, Telnyx::Models::AI::EnabledFeatures>]
159
160
  #
160
- # @param external_llm [Telnyx::Models::AI::ExternalLlmReq]
161
+ # @param external_llm [Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm]
161
162
  #
162
- # @param fallback_config [Telnyx::Models::AI::FallbackConfigReq]
163
+ # @param fallback_config [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig]
163
164
  #
164
165
  # @param greeting [String] Text that the assistant will use to start the conversation. This may be template
165
166
  #
@@ -177,7 +178,7 @@ module Telnyx
177
178
  #
178
179
  # @param observability_settings [Telnyx::Models::AI::ObservabilityReq]
179
180
  #
180
- # @param post_conversation_settings [Telnyx::Models::AI::PostConversationSettingsReq] Configuration for post-conversation processing. When enabled, the assistant rece
181
+ # @param post_conversation_settings [Telnyx::Models::AI::Assistants::UpdateAssistant::PostConversationSettings] Configuration for post-conversation processing. When enabled, the assistant rece
181
182
  #
182
183
  # @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
183
184
  #
@@ -192,6 +193,228 @@ module Telnyx
192
193
  # @param voice_settings [Telnyx::Models::AI::VoiceSettings]
193
194
  #
194
195
  # @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
196
+
197
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant#external_llm
198
+ class ExternalLlm < Telnyx::Internal::Type::BaseModel
199
+ # @!attribute base_url
200
+ # Base URL for the external LLM endpoint.
201
+ #
202
+ # @return [String]
203
+ required :base_url, String
204
+
205
+ # @!attribute model
206
+ # Model identifier to use with the external LLM endpoint.
207
+ #
208
+ # @return [String]
209
+ required :model, String
210
+
211
+ # @!attribute authentication_method
212
+ # Authentication method used when connecting to the external LLM endpoint.
213
+ #
214
+ # @return [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm::AuthenticationMethod, nil]
215
+ optional :authentication_method,
216
+ enum: -> { Telnyx::AI::Assistants::UpdateAssistant::ExternalLlm::AuthenticationMethod }
217
+
218
+ # @!attribute certificate_ref
219
+ # Integration secret identifier for the client certificate used with certificate
220
+ # authentication.
221
+ #
222
+ # @return [String, nil]
223
+ optional :certificate_ref, String
224
+
225
+ # @!attribute forward_metadata
226
+ # When enabled, Telnyx forwards the assistant's dynamic variables to the external
227
+ # LLM endpoint. Defaults to false. The chat completion request includes a
228
+ # top-level `extra_metadata` object when dynamic variables are available. For
229
+ # example:
230
+ # `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
231
+ #
232
+ # @return [Boolean, nil]
233
+ optional :forward_metadata, Telnyx::Internal::Type::Boolean
234
+
235
+ # @!attribute llm_api_key_ref
236
+ # Integration secret identifier for the external LLM API key.
237
+ #
238
+ # @return [String, nil]
239
+ optional :llm_api_key_ref, String
240
+
241
+ # @!attribute token_retrieval_url
242
+ # URL used to retrieve an access token when certificate authentication is enabled.
243
+ #
244
+ # @return [String, nil]
245
+ optional :token_retrieval_url, String
246
+
247
+ # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
248
+ # Some parameter documentations has been truncated, see
249
+ # {Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm} for more details.
250
+ #
251
+ # @param base_url [String] Base URL for the external LLM endpoint.
252
+ #
253
+ # @param model [String] Model identifier to use with the external LLM endpoint.
254
+ #
255
+ # @param authentication_method [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
256
+ #
257
+ # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
258
+ #
259
+ # @param forward_metadata [Boolean] When enabled, Telnyx forwards the assistant's dynamic variables to the external
260
+ #
261
+ # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
262
+ #
263
+ # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
264
+
265
+ # Authentication method used when connecting to the external LLM endpoint.
266
+ #
267
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm#authentication_method
268
+ module AuthenticationMethod
269
+ extend Telnyx::Internal::Type::Enum
270
+
271
+ TOKEN = :token
272
+ CERTIFICATE = :certificate
273
+
274
+ # @!method self.values
275
+ # @return [Array<Symbol>]
276
+ end
277
+ end
278
+
279
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant#fallback_config
280
+ class FallbackConfig < Telnyx::Internal::Type::BaseModel
281
+ # @!attribute external_llm
282
+ #
283
+ # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm, nil]
284
+ optional :external_llm, -> { Telnyx::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm }
285
+
286
+ # @!attribute llm_api_key_ref
287
+ # Integration secret identifier for the fallback model API key.
288
+ #
289
+ # @return [String, nil]
290
+ optional :llm_api_key_ref, String
291
+
292
+ # @!attribute model
293
+ # Fallback Telnyx-hosted model to use when the primary LLM provider is
294
+ # unavailable.
295
+ #
296
+ # @return [String, nil]
297
+ optional :model, String
298
+
299
+ # @!method initialize(external_llm: nil, llm_api_key_ref: nil, model: nil)
300
+ # Some parameter documentations has been truncated, see
301
+ # {Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig} for more
302
+ # details.
303
+ #
304
+ # @param external_llm [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm]
305
+ #
306
+ # @param llm_api_key_ref [String] Integration secret identifier for the fallback model API key.
307
+ #
308
+ # @param model [String] Fallback Telnyx-hosted model to use when the primary LLM provider is unavailable
309
+
310
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig#external_llm
311
+ class ExternalLlm < Telnyx::Internal::Type::BaseModel
312
+ # @!attribute base_url
313
+ # Base URL for the external LLM endpoint.
314
+ #
315
+ # @return [String]
316
+ required :base_url, String
317
+
318
+ # @!attribute model
319
+ # Model identifier to use with the external LLM endpoint.
320
+ #
321
+ # @return [String]
322
+ required :model, String
323
+
324
+ # @!attribute authentication_method
325
+ # Authentication method used when connecting to the external LLM endpoint.
326
+ #
327
+ # @return [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm::AuthenticationMethod, nil]
328
+ optional :authentication_method,
329
+ enum: -> { Telnyx::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm::AuthenticationMethod }
330
+
331
+ # @!attribute certificate_ref
332
+ # Integration secret identifier for the client certificate used with certificate
333
+ # authentication.
334
+ #
335
+ # @return [String, nil]
336
+ optional :certificate_ref, String
337
+
338
+ # @!attribute forward_metadata
339
+ # When enabled, Telnyx forwards the assistant's dynamic variables to the external
340
+ # LLM endpoint. Defaults to false. The chat completion request includes a
341
+ # top-level `extra_metadata` object when dynamic variables are available. For
342
+ # example:
343
+ # `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
344
+ #
345
+ # @return [Boolean, nil]
346
+ optional :forward_metadata, Telnyx::Internal::Type::Boolean
347
+
348
+ # @!attribute llm_api_key_ref
349
+ # Integration secret identifier for the external LLM API key.
350
+ #
351
+ # @return [String, nil]
352
+ optional :llm_api_key_ref, String
353
+
354
+ # @!attribute token_retrieval_url
355
+ # URL used to retrieve an access token when certificate authentication is enabled.
356
+ #
357
+ # @return [String, nil]
358
+ optional :token_retrieval_url, String
359
+
360
+ # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
361
+ # Some parameter documentations has been truncated, see
362
+ # {Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm}
363
+ # for more details.
364
+ #
365
+ # @param base_url [String] Base URL for the external LLM endpoint.
366
+ #
367
+ # @param model [String] Model identifier to use with the external LLM endpoint.
368
+ #
369
+ # @param authentication_method [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
370
+ #
371
+ # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
372
+ #
373
+ # @param forward_metadata [Boolean] When enabled, Telnyx forwards the assistant's dynamic variables to the external
374
+ #
375
+ # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
376
+ #
377
+ # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
378
+
379
+ # Authentication method used when connecting to the external LLM endpoint.
380
+ #
381
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm#authentication_method
382
+ module AuthenticationMethod
383
+ extend Telnyx::Internal::Type::Enum
384
+
385
+ TOKEN = :token
386
+ CERTIFICATE = :certificate
387
+
388
+ # @!method self.values
389
+ # @return [Array<Symbol>]
390
+ end
391
+ end
392
+ end
393
+
394
+ # @see Telnyx::Models::AI::Assistants::UpdateAssistant#post_conversation_settings
395
+ class PostConversationSettings < Telnyx::Internal::Type::BaseModel
396
+ # @!attribute enabled
397
+ # Whether post-conversation processing is enabled. When true, the assistant will
398
+ # be invoked after the conversation ends to perform any final tool calls. Defaults
399
+ # to false.
400
+ #
401
+ # @return [Boolean, nil]
402
+ optional :enabled, Telnyx::Internal::Type::Boolean
403
+
404
+ # @!method initialize(enabled: nil)
405
+ # Some parameter documentations has been truncated, see
406
+ # {Telnyx::Models::AI::Assistants::UpdateAssistant::PostConversationSettings} for
407
+ # more details.
408
+ #
409
+ # Configuration for post-conversation processing. When enabled, the assistant
410
+ # receives one additional LLM turn after the conversation ends, allowing it to
411
+ # execute tool calls such as logging to a CRM or sending a summary. The assistant
412
+ # can execute multiple parallel or sequential tools during this phase.
413
+ # Telephony-control tools (e.g. hangup, transfer) are unavailable
414
+ # post-conversation. Beta feature.
415
+ #
416
+ # @param enabled [Boolean] Whether post-conversation processing is enabled. When true, the assistant will b
417
+ end
195
418
  end
196
419
  end
197
420
 
@@ -62,13 +62,13 @@ module Telnyx
62
62
 
63
63
  # @!attribute external_llm
64
64
  #
65
- # @return [Telnyx::Models::AI::ExternalLlm, nil]
66
- optional :external_llm, -> { Telnyx::AI::ExternalLlm }
65
+ # @return [Telnyx::Models::AI::InferenceEmbedding::ExternalLlm, nil]
66
+ optional :external_llm, -> { Telnyx::AI::InferenceEmbedding::ExternalLlm }
67
67
 
68
68
  # @!attribute fallback_config
69
69
  #
70
- # @return [Telnyx::Models::AI::FallbackConfig, nil]
71
- optional :fallback_config, -> { Telnyx::AI::FallbackConfig }
70
+ # @return [Telnyx::Models::AI::InferenceEmbedding::FallbackConfig, nil]
71
+ optional :fallback_config, -> { Telnyx::AI::InferenceEmbedding::FallbackConfig }
72
72
 
73
73
  # @!attribute greeting
74
74
  # Text that the assistant will use to start the conversation. This may be
@@ -119,8 +119,8 @@ module Telnyx
119
119
  # Telephony-control tools (e.g. hangup, transfer) are unavailable
120
120
  # post-conversation. Beta feature.
121
121
  #
122
- # @return [Telnyx::Models::AI::PostConversationSettings, nil]
123
- optional :post_conversation_settings, -> { Telnyx::AI::PostConversationSettings }
122
+ # @return [Telnyx::Models::AI::InferenceEmbedding::PostConversationSettings, nil]
123
+ optional :post_conversation_settings, -> { Telnyx::AI::InferenceEmbedding::PostConversationSettings }
124
124
 
125
125
  # @!attribute privacy_settings
126
126
  #
@@ -177,9 +177,9 @@ module Telnyx
177
177
  #
178
178
  # @param enabled_features [Array<Symbol, Telnyx::Models::AI::EnabledFeatures>]
179
179
  #
180
- # @param external_llm [Telnyx::Models::AI::ExternalLlm]
180
+ # @param external_llm [Telnyx::Models::AI::InferenceEmbedding::ExternalLlm]
181
181
  #
182
- # @param fallback_config [Telnyx::Models::AI::FallbackConfig]
182
+ # @param fallback_config [Telnyx::Models::AI::InferenceEmbedding::FallbackConfig]
183
183
  #
184
184
  # @param greeting [String] Text that the assistant will use to start the conversation. This may be template
185
185
  #
@@ -193,7 +193,7 @@ module Telnyx
193
193
  #
194
194
  # @param observability_settings [Telnyx::Models::AI::Observability]
195
195
  #
196
- # @param post_conversation_settings [Telnyx::Models::AI::PostConversationSettings] Configuration for post-conversation processing. When enabled, the assistant rece
196
+ # @param post_conversation_settings [Telnyx::Models::AI::InferenceEmbedding::PostConversationSettings] Configuration for post-conversation processing. When enabled, the assistant rece
197
197
  #
198
198
  # @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
199
199
  #
@@ -206,6 +206,227 @@ module Telnyx
206
206
  # @param voice_settings [Telnyx::Models::AI::VoiceSettings]
207
207
  #
208
208
  # @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
209
+
210
+ # @see Telnyx::Models::AI::InferenceEmbedding#external_llm
211
+ class ExternalLlm < Telnyx::Internal::Type::BaseModel
212
+ # @!attribute base_url
213
+ # Base URL for the external LLM endpoint.
214
+ #
215
+ # @return [String]
216
+ required :base_url, String
217
+
218
+ # @!attribute model
219
+ # Model identifier to use with the external LLM endpoint.
220
+ #
221
+ # @return [String]
222
+ required :model, String
223
+
224
+ # @!attribute authentication_method
225
+ # Authentication method used when connecting to the external LLM endpoint.
226
+ #
227
+ # @return [Symbol, Telnyx::Models::AI::InferenceEmbedding::ExternalLlm::AuthenticationMethod, nil]
228
+ optional :authentication_method,
229
+ enum: -> { Telnyx::AI::InferenceEmbedding::ExternalLlm::AuthenticationMethod }
230
+
231
+ # @!attribute certificate_ref
232
+ # Integration secret identifier for the client certificate used with certificate
233
+ # authentication.
234
+ #
235
+ # @return [String, nil]
236
+ optional :certificate_ref, String
237
+
238
+ # @!attribute forward_metadata
239
+ # When enabled, Telnyx forwards the assistant's dynamic variables to the external
240
+ # LLM endpoint. Defaults to false. The chat completion request includes a
241
+ # top-level `extra_metadata` object when dynamic variables are available. For
242
+ # example:
243
+ # `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
244
+ #
245
+ # @return [Boolean, nil]
246
+ optional :forward_metadata, Telnyx::Internal::Type::Boolean
247
+
248
+ # @!attribute llm_api_key_ref
249
+ # Integration secret identifier for the external LLM API key.
250
+ #
251
+ # @return [String, nil]
252
+ optional :llm_api_key_ref, String
253
+
254
+ # @!attribute token_retrieval_url
255
+ # URL used to retrieve an access token when certificate authentication is enabled.
256
+ #
257
+ # @return [String, nil]
258
+ optional :token_retrieval_url, String
259
+
260
+ # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
261
+ # Some parameter documentations has been truncated, see
262
+ # {Telnyx::Models::AI::InferenceEmbedding::ExternalLlm} for more details.
263
+ #
264
+ # @param base_url [String] Base URL for the external LLM endpoint.
265
+ #
266
+ # @param model [String] Model identifier to use with the external LLM endpoint.
267
+ #
268
+ # @param authentication_method [Symbol, Telnyx::Models::AI::InferenceEmbedding::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
269
+ #
270
+ # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
271
+ #
272
+ # @param forward_metadata [Boolean] When enabled, Telnyx forwards the assistant's dynamic variables to the external
273
+ #
274
+ # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
275
+ #
276
+ # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
277
+
278
+ # Authentication method used when connecting to the external LLM endpoint.
279
+ #
280
+ # @see Telnyx::Models::AI::InferenceEmbedding::ExternalLlm#authentication_method
281
+ module AuthenticationMethod
282
+ extend Telnyx::Internal::Type::Enum
283
+
284
+ TOKEN = :token
285
+ CERTIFICATE = :certificate
286
+
287
+ # @!method self.values
288
+ # @return [Array<Symbol>]
289
+ end
290
+ end
291
+
292
+ # @see Telnyx::Models::AI::InferenceEmbedding#fallback_config
293
+ class FallbackConfig < Telnyx::Internal::Type::BaseModel
294
+ # @!attribute external_llm
295
+ #
296
+ # @return [Telnyx::Models::AI::InferenceEmbedding::FallbackConfig::ExternalLlm, nil]
297
+ optional :external_llm, -> { Telnyx::AI::InferenceEmbedding::FallbackConfig::ExternalLlm }
298
+
299
+ # @!attribute llm_api_key_ref
300
+ # Integration secret identifier for the fallback model API key.
301
+ #
302
+ # @return [String, nil]
303
+ optional :llm_api_key_ref, String
304
+
305
+ # @!attribute model
306
+ # Fallback Telnyx-hosted model to use when the primary LLM provider is
307
+ # unavailable.
308
+ #
309
+ # @return [String, nil]
310
+ optional :model, String
311
+
312
+ # @!method initialize(external_llm: nil, llm_api_key_ref: nil, model: nil)
313
+ # Some parameter documentations has been truncated, see
314
+ # {Telnyx::Models::AI::InferenceEmbedding::FallbackConfig} for more details.
315
+ #
316
+ # @param external_llm [Telnyx::Models::AI::InferenceEmbedding::FallbackConfig::ExternalLlm]
317
+ #
318
+ # @param llm_api_key_ref [String] Integration secret identifier for the fallback model API key.
319
+ #
320
+ # @param model [String] Fallback Telnyx-hosted model to use when the primary LLM provider is unavailable
321
+
322
+ # @see Telnyx::Models::AI::InferenceEmbedding::FallbackConfig#external_llm
323
+ class ExternalLlm < Telnyx::Internal::Type::BaseModel
324
+ # @!attribute base_url
325
+ # Base URL for the external LLM endpoint.
326
+ #
327
+ # @return [String]
328
+ required :base_url, String
329
+
330
+ # @!attribute model
331
+ # Model identifier to use with the external LLM endpoint.
332
+ #
333
+ # @return [String]
334
+ required :model, String
335
+
336
+ # @!attribute authentication_method
337
+ # Authentication method used when connecting to the external LLM endpoint.
338
+ #
339
+ # @return [Symbol, Telnyx::Models::AI::InferenceEmbedding::FallbackConfig::ExternalLlm::AuthenticationMethod, nil]
340
+ optional :authentication_method,
341
+ enum: -> { Telnyx::AI::InferenceEmbedding::FallbackConfig::ExternalLlm::AuthenticationMethod }
342
+
343
+ # @!attribute certificate_ref
344
+ # Integration secret identifier for the client certificate used with certificate
345
+ # authentication.
346
+ #
347
+ # @return [String, nil]
348
+ optional :certificate_ref, String
349
+
350
+ # @!attribute forward_metadata
351
+ # When enabled, Telnyx forwards the assistant's dynamic variables to the external
352
+ # LLM endpoint. Defaults to false. The chat completion request includes a
353
+ # top-level `extra_metadata` object when dynamic variables are available. For
354
+ # example:
355
+ # `{"extra_metadata":{"customer_name":"Jane","account_id":"acct_789","telnyx_agent_target":"+13125550100","telnyx_end_user_target":"+13125550123"}}`.
356
+ #
357
+ # @return [Boolean, nil]
358
+ optional :forward_metadata, Telnyx::Internal::Type::Boolean
359
+
360
+ # @!attribute llm_api_key_ref
361
+ # Integration secret identifier for the external LLM API key.
362
+ #
363
+ # @return [String, nil]
364
+ optional :llm_api_key_ref, String
365
+
366
+ # @!attribute token_retrieval_url
367
+ # URL used to retrieve an access token when certificate authentication is enabled.
368
+ #
369
+ # @return [String, nil]
370
+ optional :token_retrieval_url, String
371
+
372
+ # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
373
+ # Some parameter documentations has been truncated, see
374
+ # {Telnyx::Models::AI::InferenceEmbedding::FallbackConfig::ExternalLlm} for more
375
+ # details.
376
+ #
377
+ # @param base_url [String] Base URL for the external LLM endpoint.
378
+ #
379
+ # @param model [String] Model identifier to use with the external LLM endpoint.
380
+ #
381
+ # @param authentication_method [Symbol, Telnyx::Models::AI::InferenceEmbedding::FallbackConfig::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
382
+ #
383
+ # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
384
+ #
385
+ # @param forward_metadata [Boolean] When enabled, Telnyx forwards the assistant's dynamic variables to the external
386
+ #
387
+ # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
388
+ #
389
+ # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
390
+
391
+ # Authentication method used when connecting to the external LLM endpoint.
392
+ #
393
+ # @see Telnyx::Models::AI::InferenceEmbedding::FallbackConfig::ExternalLlm#authentication_method
394
+ module AuthenticationMethod
395
+ extend Telnyx::Internal::Type::Enum
396
+
397
+ TOKEN = :token
398
+ CERTIFICATE = :certificate
399
+
400
+ # @!method self.values
401
+ # @return [Array<Symbol>]
402
+ end
403
+ end
404
+ end
405
+
406
+ # @see Telnyx::Models::AI::InferenceEmbedding#post_conversation_settings
407
+ class PostConversationSettings < Telnyx::Internal::Type::BaseModel
408
+ # @!attribute enabled
409
+ # Whether post-conversation processing is enabled. When true, the assistant will
410
+ # be invoked after the conversation ends to perform any final tool calls. Defaults
411
+ # to false.
412
+ #
413
+ # @return [Boolean, nil]
414
+ optional :enabled, Telnyx::Internal::Type::Boolean
415
+
416
+ # @!method initialize(enabled: nil)
417
+ # Some parameter documentations has been truncated, see
418
+ # {Telnyx::Models::AI::InferenceEmbedding::PostConversationSettings} for more
419
+ # details.
420
+ #
421
+ # Configuration for post-conversation processing. When enabled, the assistant
422
+ # receives one additional LLM turn after the conversation ends, allowing it to
423
+ # execute tool calls such as logging to a CRM or sending a summary. The assistant
424
+ # can execute multiple parallel or sequential tools during this phase.
425
+ # Telephony-control tools (e.g. hangup, transfer) are unavailable
426
+ # post-conversation. Beta feature.
427
+ #
428
+ # @param enabled [Boolean] Whether post-conversation processing is enabled. When true, the assistant will b
429
+ end
209
430
  end
210
431
  end
211
432
  end