telnyx 5.97.0 → 5.99.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 (67) 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 +9 -231
  5. data/lib/telnyx/models/ai/assistant_update_params.rb +9 -231
  6. data/lib/telnyx/models/ai/assistants/update_assistant.rb +9 -236
  7. data/lib/telnyx/models/ai/external_llm.rb +89 -0
  8. data/lib/telnyx/models/ai/external_llm_req.rb +89 -0
  9. data/lib/telnyx/models/ai/fallback_config.rb +37 -0
  10. data/lib/telnyx/models/ai/fallback_config_req.rb +37 -0
  11. data/lib/telnyx/models/ai/inference_embedding.rb +9 -234
  12. data/lib/telnyx/models/ai/observability.rb +57 -1
  13. data/lib/telnyx/models/ai/observability_req.rb +57 -1
  14. data/lib/telnyx/models/ai/post_conversation_settings.rb +30 -0
  15. data/lib/telnyx/models/ai/post_conversation_settings_req.rb +30 -0
  16. data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +26 -3
  17. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +26 -3
  18. data/lib/telnyx/models/calls/action_speak_params.rb +26 -3
  19. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +26 -3
  20. data/lib/telnyx/models/conferences/action_speak_params.rb +26 -3
  21. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -3
  22. data/lib/telnyx/resources/ai/assistants.rb +6 -6
  23. data/lib/telnyx/resources/calls/actions.rb +4 -4
  24. data/lib/telnyx/resources/conferences/actions.rb +1 -1
  25. data/lib/telnyx/version.rb +1 -1
  26. data/lib/telnyx.rb +6 -0
  27. data/rbi/telnyx/models/ai/assistant_create_params.rbi +12 -463
  28. data/rbi/telnyx/models/ai/assistant_update_params.rbi +12 -463
  29. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +12 -469
  30. data/rbi/telnyx/models/ai/external_llm.rbi +161 -0
  31. data/rbi/telnyx/models/ai/external_llm_req.rbi +161 -0
  32. data/rbi/telnyx/models/ai/fallback_config.rbi +64 -0
  33. data/rbi/telnyx/models/ai/fallback_config_req.rbi +64 -0
  34. data/rbi/telnyx/models/ai/inference_embedding.rbi +12 -460
  35. data/rbi/telnyx/models/ai/observability.rbi +85 -0
  36. data/rbi/telnyx/models/ai/observability_req.rbi +86 -0
  37. data/rbi/telnyx/models/ai/post_conversation_settings.rbi +45 -0
  38. data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +45 -0
  39. data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +50 -5
  40. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +50 -5
  41. data/rbi/telnyx/models/calls/action_speak_params.rbi +50 -5
  42. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +50 -5
  43. data/rbi/telnyx/models/conferences/action_speak_params.rbi +50 -5
  44. data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -5
  45. data/rbi/telnyx/resources/ai/assistants.rbi +6 -10
  46. data/rbi/telnyx/resources/calls/actions.rbi +16 -4
  47. data/rbi/telnyx/resources/conferences/actions.rbi +4 -1
  48. data/sig/telnyx/models/ai/assistant_create_params.rbs +18 -205
  49. data/sig/telnyx/models/ai/assistant_update_params.rbs +18 -205
  50. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +18 -205
  51. data/sig/telnyx/models/ai/external_llm.rbs +75 -0
  52. data/sig/telnyx/models/ai/external_llm_req.rbs +75 -0
  53. data/sig/telnyx/models/ai/fallback_config.rbs +38 -0
  54. data/sig/telnyx/models/ai/fallback_config_req.rbs +40 -0
  55. data/sig/telnyx/models/ai/inference_embedding.rbs +17 -206
  56. data/sig/telnyx/models/ai/observability.rbs +41 -0
  57. data/sig/telnyx/models/ai/observability_req.rbs +41 -0
  58. data/sig/telnyx/models/ai/post_conversation_settings.rbs +17 -0
  59. data/sig/telnyx/models/ai/post_conversation_settings_req.rbs +17 -0
  60. data/sig/telnyx/models/calls/action_gather_using_ai_params.rbs +15 -0
  61. data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +15 -0
  62. data/sig/telnyx/models/calls/action_speak_params.rbs +15 -0
  63. data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +15 -0
  64. data/sig/telnyx/models/conferences/action_speak_params.rbs +15 -0
  65. data/sig/telnyx/resources/ai/assistants/versions.rbs +3 -3
  66. data/sig/telnyx/resources/ai/assistants.rbs +6 -6
  67. metadata +20 -2
@@ -45,13 +45,13 @@ module Telnyx
45
45
 
46
46
  # @!attribute external_llm
47
47
  #
48
- # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm, nil]
49
- optional :external_llm, -> { Telnyx::AI::Assistants::UpdateAssistant::ExternalLlm }
48
+ # @return [Telnyx::Models::AI::ExternalLlmReq, nil]
49
+ optional :external_llm, -> { Telnyx::AI::ExternalLlmReq }
50
50
 
51
51
  # @!attribute fallback_config
52
52
  #
53
- # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig, nil]
54
- optional :fallback_config, -> { Telnyx::AI::Assistants::UpdateAssistant::FallbackConfig }
53
+ # @return [Telnyx::Models::AI::FallbackConfigReq, nil]
54
+ optional :fallback_config, -> { Telnyx::AI::FallbackConfigReq }
55
55
 
56
56
  # @!attribute greeting
57
57
  # Text that the assistant will use to start the conversation. This may be
@@ -149,9 +149,8 @@ module Telnyx
149
149
  # Telephony-control tools (e.g. hangup, transfer) are unavailable
150
150
  # post-conversation. Beta feature.
151
151
  #
152
- # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::PostConversationSettings, nil]
153
- optional :post_conversation_settings,
154
- -> { Telnyx::AI::Assistants::UpdateAssistant::PostConversationSettings }
152
+ # @return [Telnyx::Models::AI::PostConversationSettingsReq, nil]
153
+ optional :post_conversation_settings, -> { Telnyx::AI::PostConversationSettingsReq }
155
154
 
156
155
  # @!attribute privacy_settings
157
156
  #
@@ -221,9 +220,9 @@ module Telnyx
221
220
  #
222
221
  # @param enabled_features [Array<Symbol, Telnyx::Models::AI::EnabledFeatures>]
223
222
  #
224
- # @param external_llm [Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm]
223
+ # @param external_llm [Telnyx::Models::AI::ExternalLlmReq]
225
224
  #
226
- # @param fallback_config [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig]
225
+ # @param fallback_config [Telnyx::Models::AI::FallbackConfigReq]
227
226
  #
228
227
  # @param greeting [String] Text that the assistant will use to start the conversation. This may be template
229
228
  #
@@ -247,7 +246,7 @@ module Telnyx
247
246
  #
248
247
  # @param observability_settings [Telnyx::Models::AI::ObservabilityReq]
249
248
  #
250
- # @param post_conversation_settings [Telnyx::Models::AI::Assistants::UpdateAssistant::PostConversationSettings] Configuration for post-conversation processing. When enabled, the assistant rece
249
+ # @param post_conversation_settings [Telnyx::Models::AI::PostConversationSettingsReq] Configuration for post-conversation processing. When enabled, the assistant rece
251
250
  #
252
251
  # @param privacy_settings [Telnyx::Models::AI::PrivacySettings]
253
252
  #
@@ -267,207 +266,6 @@ module Telnyx
267
266
  #
268
267
  # @param widget_settings [Telnyx::Models::AI::WidgetSettings] Configuration settings for the assistant's web widget.
269
268
 
270
- # @see Telnyx::Models::AI::Assistants::UpdateAssistant#external_llm
271
- class ExternalLlm < Telnyx::Internal::Type::BaseModel
272
- # @!attribute base_url
273
- # Base URL for the external LLM endpoint.
274
- #
275
- # @return [String]
276
- required :base_url, String
277
-
278
- # @!attribute model
279
- # Model identifier to use with the external LLM endpoint.
280
- #
281
- # @return [String]
282
- required :model, String
283
-
284
- # @!attribute authentication_method
285
- # Authentication method used when connecting to the external LLM endpoint.
286
- #
287
- # @return [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm::AuthenticationMethod, nil]
288
- optional :authentication_method,
289
- enum: -> { Telnyx::AI::Assistants::UpdateAssistant::ExternalLlm::AuthenticationMethod }
290
-
291
- # @!attribute certificate_ref
292
- # Integration secret identifier for the client certificate used with certificate
293
- # authentication.
294
- #
295
- # @return [String, nil]
296
- optional :certificate_ref, String
297
-
298
- # @!attribute forward_metadata
299
- # When `true`, Telnyx forwards the assistant's dynamic variables to the external
300
- # LLM endpoint as a top-level `extra_metadata` object on the chat completion
301
- # request body. Defaults to `false`. Example payload sent to the external
302
- # endpoint:
303
- # `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
304
- # Distinct from OpenAI's native `metadata` field, which has its own size and type
305
- # limits.
306
- #
307
- # @return [Boolean, nil]
308
- optional :forward_metadata, Telnyx::Internal::Type::Boolean
309
-
310
- # @!attribute llm_api_key_ref
311
- # Integration secret identifier for the external LLM API key.
312
- #
313
- # @return [String, nil]
314
- optional :llm_api_key_ref, String
315
-
316
- # @!attribute token_retrieval_url
317
- # URL used to retrieve an access token when certificate authentication is enabled.
318
- #
319
- # @return [String, nil]
320
- optional :token_retrieval_url, String
321
-
322
- # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
323
- # Some parameter documentations has been truncated, see
324
- # {Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm} for more details.
325
- #
326
- # @param base_url [String] Base URL for the external LLM endpoint.
327
- #
328
- # @param model [String] Model identifier to use with the external LLM endpoint.
329
- #
330
- # @param authentication_method [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
331
- #
332
- # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
333
- #
334
- # @param forward_metadata [Boolean] When `true`, Telnyx forwards the assistant's dynamic variables to the external L
335
- #
336
- # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
337
- #
338
- # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
339
-
340
- # Authentication method used when connecting to the external LLM endpoint.
341
- #
342
- # @see Telnyx::Models::AI::Assistants::UpdateAssistant::ExternalLlm#authentication_method
343
- module AuthenticationMethod
344
- extend Telnyx::Internal::Type::Enum
345
-
346
- TOKEN = :token
347
- CERTIFICATE = :certificate
348
-
349
- # @!method self.values
350
- # @return [Array<Symbol>]
351
- end
352
- end
353
-
354
- # @see Telnyx::Models::AI::Assistants::UpdateAssistant#fallback_config
355
- class FallbackConfig < Telnyx::Internal::Type::BaseModel
356
- # @!attribute external_llm
357
- #
358
- # @return [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm, nil]
359
- optional :external_llm, -> { Telnyx::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm }
360
-
361
- # @!attribute llm_api_key_ref
362
- # Integration secret identifier for the fallback model API key.
363
- #
364
- # @return [String, nil]
365
- optional :llm_api_key_ref, String
366
-
367
- # @!attribute model
368
- # Fallback Telnyx-hosted model to use when the primary LLM provider is
369
- # unavailable.
370
- #
371
- # @return [String, nil]
372
- optional :model, String
373
-
374
- # @!method initialize(external_llm: nil, llm_api_key_ref: nil, model: nil)
375
- # Some parameter documentations has been truncated, see
376
- # {Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig} for more
377
- # details.
378
- #
379
- # @param external_llm [Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm]
380
- #
381
- # @param llm_api_key_ref [String] Integration secret identifier for the fallback model API key.
382
- #
383
- # @param model [String] Fallback Telnyx-hosted model to use when the primary LLM provider is unavailable
384
-
385
- # @see Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig#external_llm
386
- class ExternalLlm < Telnyx::Internal::Type::BaseModel
387
- # @!attribute base_url
388
- # Base URL for the external LLM endpoint.
389
- #
390
- # @return [String]
391
- required :base_url, String
392
-
393
- # @!attribute model
394
- # Model identifier to use with the external LLM endpoint.
395
- #
396
- # @return [String]
397
- required :model, String
398
-
399
- # @!attribute authentication_method
400
- # Authentication method used when connecting to the external LLM endpoint.
401
- #
402
- # @return [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm::AuthenticationMethod, nil]
403
- optional :authentication_method,
404
- enum: -> { Telnyx::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm::AuthenticationMethod }
405
-
406
- # @!attribute certificate_ref
407
- # Integration secret identifier for the client certificate used with certificate
408
- # authentication.
409
- #
410
- # @return [String, nil]
411
- optional :certificate_ref, String
412
-
413
- # @!attribute forward_metadata
414
- # When `true`, Telnyx forwards the assistant's dynamic variables to the external
415
- # LLM endpoint as a top-level `extra_metadata` object on the chat completion
416
- # request body. Defaults to `false`. Example payload sent to the external
417
- # endpoint:
418
- # `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
419
- # Distinct from OpenAI's native `metadata` field, which has its own size and type
420
- # limits.
421
- #
422
- # @return [Boolean, nil]
423
- optional :forward_metadata, Telnyx::Internal::Type::Boolean
424
-
425
- # @!attribute llm_api_key_ref
426
- # Integration secret identifier for the external LLM API key.
427
- #
428
- # @return [String, nil]
429
- optional :llm_api_key_ref, String
430
-
431
- # @!attribute token_retrieval_url
432
- # URL used to retrieve an access token when certificate authentication is enabled.
433
- #
434
- # @return [String, nil]
435
- optional :token_retrieval_url, String
436
-
437
- # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
438
- # Some parameter documentations has been truncated, see
439
- # {Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm}
440
- # for more details.
441
- #
442
- # @param base_url [String] Base URL for the external LLM endpoint.
443
- #
444
- # @param model [String] Model identifier to use with the external LLM endpoint.
445
- #
446
- # @param authentication_method [Symbol, Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
447
- #
448
- # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
449
- #
450
- # @param forward_metadata [Boolean] When `true`, Telnyx forwards the assistant's dynamic variables to the external L
451
- #
452
- # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
453
- #
454
- # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
455
-
456
- # Authentication method used when connecting to the external LLM endpoint.
457
- #
458
- # @see Telnyx::Models::AI::Assistants::UpdateAssistant::FallbackConfig::ExternalLlm#authentication_method
459
- module AuthenticationMethod
460
- extend Telnyx::Internal::Type::Enum
461
-
462
- TOKEN = :token
463
- CERTIFICATE = :certificate
464
-
465
- # @!method self.values
466
- # @return [Array<Symbol>]
467
- end
468
- end
469
- end
470
-
471
269
  class Integration < Telnyx::Internal::Type::BaseModel
472
270
  # @!attribute integration_id
473
271
  # Catalog integration ID to attach. This is the `id` from the integrations catalog
@@ -627,31 +425,6 @@ module Telnyx
627
425
  #
628
426
  # @param allowed_tools [Array<String>] Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
629
427
  end
630
-
631
- # @see Telnyx::Models::AI::Assistants::UpdateAssistant#post_conversation_settings
632
- class PostConversationSettings < Telnyx::Internal::Type::BaseModel
633
- # @!attribute enabled
634
- # Whether post-conversation processing is enabled. When true, the assistant will
635
- # be invoked after the conversation ends to perform any final tool calls. Defaults
636
- # to false.
637
- #
638
- # @return [Boolean, nil]
639
- optional :enabled, Telnyx::Internal::Type::Boolean
640
-
641
- # @!method initialize(enabled: nil)
642
- # Some parameter documentations has been truncated, see
643
- # {Telnyx::Models::AI::Assistants::UpdateAssistant::PostConversationSettings} for
644
- # more details.
645
- #
646
- # Configuration for post-conversation processing. When enabled, the assistant
647
- # receives one additional LLM turn after the conversation ends, allowing it to
648
- # execute tool calls such as logging to a CRM or sending a summary. The assistant
649
- # can execute multiple parallel or sequential tools during this phase.
650
- # Telephony-control tools (e.g. hangup, transfer) are unavailable
651
- # post-conversation. Beta feature.
652
- #
653
- # @param enabled [Boolean] Whether post-conversation processing is enabled. When true, the assistant will b
654
- end
655
428
  end
656
429
  end
657
430
 
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class ExternalLlm < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute base_url
8
+ # Base URL for the external LLM endpoint.
9
+ #
10
+ # @return [String]
11
+ required :base_url, String
12
+
13
+ # @!attribute model
14
+ # Model identifier to use with the external LLM endpoint.
15
+ #
16
+ # @return [String]
17
+ required :model, String
18
+
19
+ # @!attribute authentication_method
20
+ # Authentication method used when connecting to the external LLM endpoint.
21
+ #
22
+ # @return [Symbol, Telnyx::Models::AI::ExternalLlm::AuthenticationMethod, nil]
23
+ optional :authentication_method, enum: -> { Telnyx::AI::ExternalLlm::AuthenticationMethod }
24
+
25
+ # @!attribute certificate_ref
26
+ # Integration secret identifier for the client certificate used with certificate
27
+ # authentication.
28
+ #
29
+ # @return [String, nil]
30
+ optional :certificate_ref, String
31
+
32
+ # @!attribute forward_metadata
33
+ # When `true`, Telnyx forwards the assistant's dynamic variables to the external
34
+ # LLM endpoint as a top-level `extra_metadata` object on the chat completion
35
+ # request body. Defaults to `false`. Example payload sent to the external
36
+ # endpoint:
37
+ # `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
38
+ # Distinct from OpenAI's native `metadata` field, which has its own size and type
39
+ # limits.
40
+ #
41
+ # @return [Boolean, nil]
42
+ optional :forward_metadata, Telnyx::Internal::Type::Boolean
43
+
44
+ # @!attribute llm_api_key_ref
45
+ # Integration secret identifier for the external LLM API key.
46
+ #
47
+ # @return [String, nil]
48
+ optional :llm_api_key_ref, String
49
+
50
+ # @!attribute token_retrieval_url
51
+ # URL used to retrieve an access token when certificate authentication is enabled.
52
+ #
53
+ # @return [String, nil]
54
+ optional :token_retrieval_url, String
55
+
56
+ # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
57
+ # Some parameter documentations has been truncated, see
58
+ # {Telnyx::Models::AI::ExternalLlm} for more details.
59
+ #
60
+ # @param base_url [String] Base URL for the external LLM endpoint.
61
+ #
62
+ # @param model [String] Model identifier to use with the external LLM endpoint.
63
+ #
64
+ # @param authentication_method [Symbol, Telnyx::Models::AI::ExternalLlm::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
65
+ #
66
+ # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
67
+ #
68
+ # @param forward_metadata [Boolean] When `true`, Telnyx forwards the assistant's dynamic variables to the external L
69
+ #
70
+ # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
71
+ #
72
+ # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
73
+
74
+ # Authentication method used when connecting to the external LLM endpoint.
75
+ #
76
+ # @see Telnyx::Models::AI::ExternalLlm#authentication_method
77
+ module AuthenticationMethod
78
+ extend Telnyx::Internal::Type::Enum
79
+
80
+ TOKEN = :token
81
+ CERTIFICATE = :certificate
82
+
83
+ # @!method self.values
84
+ # @return [Array<Symbol>]
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class ExternalLlmReq < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute base_url
8
+ # Base URL for the external LLM endpoint.
9
+ #
10
+ # @return [String]
11
+ required :base_url, String
12
+
13
+ # @!attribute model
14
+ # Model identifier to use with the external LLM endpoint.
15
+ #
16
+ # @return [String]
17
+ required :model, String
18
+
19
+ # @!attribute authentication_method
20
+ # Authentication method used when connecting to the external LLM endpoint.
21
+ #
22
+ # @return [Symbol, Telnyx::Models::AI::ExternalLlmReq::AuthenticationMethod, nil]
23
+ optional :authentication_method, enum: -> { Telnyx::AI::ExternalLlmReq::AuthenticationMethod }
24
+
25
+ # @!attribute certificate_ref
26
+ # Integration secret identifier for the client certificate used with certificate
27
+ # authentication.
28
+ #
29
+ # @return [String, nil]
30
+ optional :certificate_ref, String
31
+
32
+ # @!attribute forward_metadata
33
+ # When `true`, Telnyx forwards the assistant's dynamic variables to the external
34
+ # LLM endpoint as a top-level `extra_metadata` object on the chat completion
35
+ # request body. Defaults to `false`. Example payload sent to the external
36
+ # endpoint:
37
+ # `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
38
+ # Distinct from OpenAI's native `metadata` field, which has its own size and type
39
+ # limits.
40
+ #
41
+ # @return [Boolean, nil]
42
+ optional :forward_metadata, Telnyx::Internal::Type::Boolean
43
+
44
+ # @!attribute llm_api_key_ref
45
+ # Integration secret identifier for the external LLM API key.
46
+ #
47
+ # @return [String, nil]
48
+ optional :llm_api_key_ref, String
49
+
50
+ # @!attribute token_retrieval_url
51
+ # URL used to retrieve an access token when certificate authentication is enabled.
52
+ #
53
+ # @return [String, nil]
54
+ optional :token_retrieval_url, String
55
+
56
+ # @!method initialize(base_url:, model:, authentication_method: nil, certificate_ref: nil, forward_metadata: nil, llm_api_key_ref: nil, token_retrieval_url: nil)
57
+ # Some parameter documentations has been truncated, see
58
+ # {Telnyx::Models::AI::ExternalLlmReq} for more details.
59
+ #
60
+ # @param base_url [String] Base URL for the external LLM endpoint.
61
+ #
62
+ # @param model [String] Model identifier to use with the external LLM endpoint.
63
+ #
64
+ # @param authentication_method [Symbol, Telnyx::Models::AI::ExternalLlmReq::AuthenticationMethod] Authentication method used when connecting to the external LLM endpoint.
65
+ #
66
+ # @param certificate_ref [String] Integration secret identifier for the client certificate used with certificate a
67
+ #
68
+ # @param forward_metadata [Boolean] When `true`, Telnyx forwards the assistant's dynamic variables to the external L
69
+ #
70
+ # @param llm_api_key_ref [String] Integration secret identifier for the external LLM API key.
71
+ #
72
+ # @param token_retrieval_url [String] URL used to retrieve an access token when certificate authentication is enabled.
73
+
74
+ # Authentication method used when connecting to the external LLM endpoint.
75
+ #
76
+ # @see Telnyx::Models::AI::ExternalLlmReq#authentication_method
77
+ module AuthenticationMethod
78
+ extend Telnyx::Internal::Type::Enum
79
+
80
+ TOKEN = :token
81
+ CERTIFICATE = :certificate
82
+
83
+ # @!method self.values
84
+ # @return [Array<Symbol>]
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class FallbackConfig < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute external_llm
8
+ #
9
+ # @return [Telnyx::Models::AI::ExternalLlm, nil]
10
+ optional :external_llm, -> { Telnyx::AI::ExternalLlm }
11
+
12
+ # @!attribute llm_api_key_ref
13
+ # Integration secret identifier for the fallback model API key.
14
+ #
15
+ # @return [String, nil]
16
+ optional :llm_api_key_ref, String
17
+
18
+ # @!attribute model
19
+ # Fallback Telnyx-hosted model to use when the primary LLM provider is
20
+ # unavailable.
21
+ #
22
+ # @return [String, nil]
23
+ optional :model, String
24
+
25
+ # @!method initialize(external_llm: nil, llm_api_key_ref: nil, model: nil)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Telnyx::Models::AI::FallbackConfig} for more details.
28
+ #
29
+ # @param external_llm [Telnyx::Models::AI::ExternalLlm]
30
+ #
31
+ # @param llm_api_key_ref [String] Integration secret identifier for the fallback model API key.
32
+ #
33
+ # @param model [String] Fallback Telnyx-hosted model to use when the primary LLM provider is unavailable
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class FallbackConfigReq < Telnyx::Internal::Type::BaseModel
7
+ # @!attribute external_llm
8
+ #
9
+ # @return [Telnyx::Models::AI::ExternalLlmReq, nil]
10
+ optional :external_llm, -> { Telnyx::AI::ExternalLlmReq }
11
+
12
+ # @!attribute llm_api_key_ref
13
+ # Integration secret identifier for the fallback model API key.
14
+ #
15
+ # @return [String, nil]
16
+ optional :llm_api_key_ref, String
17
+
18
+ # @!attribute model
19
+ # Fallback Telnyx-hosted model to use when the primary LLM provider is
20
+ # unavailable.
21
+ #
22
+ # @return [String, nil]
23
+ optional :model, String
24
+
25
+ # @!method initialize(external_llm: nil, llm_api_key_ref: nil, model: nil)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Telnyx::Models::AI::FallbackConfigReq} for more details.
28
+ #
29
+ # @param external_llm [Telnyx::Models::AI::ExternalLlmReq]
30
+ #
31
+ # @param llm_api_key_ref [String] Integration secret identifier for the fallback model API key.
32
+ #
33
+ # @param model [String] Fallback Telnyx-hosted model to use when the primary LLM provider is unavailable
34
+ end
35
+ end
36
+ end
37
+ end