telnyx 5.98.0 → 5.100.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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/telnyx/client.rb +5 -0
  5. data/lib/telnyx/models/ai/assistant_create_params.rb +9 -231
  6. data/lib/telnyx/models/ai/assistant_update_params.rb +9 -231
  7. data/lib/telnyx/models/ai/assistants/canary_deploy.rb +128 -7
  8. data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +131 -7
  9. data/lib/telnyx/models/ai/assistants/update_assistant.rb +9 -236
  10. data/lib/telnyx/models/ai/external_llm.rb +89 -0
  11. data/lib/telnyx/models/ai/external_llm_req.rb +89 -0
  12. data/lib/telnyx/models/ai/fallback_config.rb +37 -0
  13. data/lib/telnyx/models/ai/fallback_config_req.rb +37 -0
  14. data/lib/telnyx/models/ai/inference_embedding.rb +9 -234
  15. data/lib/telnyx/models/ai/post_conversation_settings.rb +30 -0
  16. data/lib/telnyx/models/ai/post_conversation_settings_req.rb +30 -0
  17. data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +26 -3
  18. data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +26 -3
  19. data/lib/telnyx/models/calls/action_speak_params.rb +26 -3
  20. data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +26 -3
  21. data/lib/telnyx/models/conferences/action_speak_params.rb +26 -3
  22. data/lib/telnyx/models/uac_connection_create_params.rb +738 -0
  23. data/lib/telnyx/models/uac_connection_create_response.rb +898 -0
  24. data/lib/telnyx/models/uac_connection_delete_params.rb +20 -0
  25. data/lib/telnyx/models/uac_connection_delete_response.rb +898 -0
  26. data/lib/telnyx/models/uac_connection_list_params.rb +143 -0
  27. data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
  28. data/lib/telnyx/models/uac_connection_retrieve_params.rb +20 -0
  29. data/lib/telnyx/models/uac_connection_retrieve_response.rb +899 -0
  30. data/lib/telnyx/models/uac_connection_update_params.rb +740 -0
  31. data/lib/telnyx/models/uac_connection_update_response.rb +898 -0
  32. data/lib/telnyx/models/uac_connections/action_check_registration_status_params.rb +22 -0
  33. data/lib/telnyx/models/uac_connections/action_check_registration_status_response.rb +104 -0
  34. data/lib/telnyx/models.rb +12 -0
  35. data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +6 -10
  36. data/lib/telnyx/resources/ai/assistants/versions.rb +3 -3
  37. data/lib/telnyx/resources/ai/assistants.rb +6 -6
  38. data/lib/telnyx/resources/calls/actions.rb +4 -4
  39. data/lib/telnyx/resources/conferences/actions.rb +1 -1
  40. data/lib/telnyx/resources/uac_connections/actions.rb +39 -0
  41. data/lib/telnyx/resources/uac_connections.rb +256 -0
  42. data/lib/telnyx/version.rb +1 -1
  43. data/lib/telnyx.rb +20 -1
  44. data/rbi/telnyx/client.rbi +4 -0
  45. data/rbi/telnyx/models/ai/assistant_create_params.rbi +12 -463
  46. data/rbi/telnyx/models/ai/assistant_update_params.rbi +12 -463
  47. data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +303 -10
  48. data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +309 -9
  49. data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +12 -469
  50. data/rbi/telnyx/models/ai/external_llm.rbi +161 -0
  51. data/rbi/telnyx/models/ai/external_llm_req.rbi +161 -0
  52. data/rbi/telnyx/models/ai/fallback_config.rbi +64 -0
  53. data/rbi/telnyx/models/ai/fallback_config_req.rbi +64 -0
  54. data/rbi/telnyx/models/ai/inference_embedding.rbi +12 -460
  55. data/rbi/telnyx/models/ai/post_conversation_settings.rbi +45 -0
  56. data/rbi/telnyx/models/ai/post_conversation_settings_req.rbi +45 -0
  57. data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +50 -5
  58. data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +50 -5
  59. data/rbi/telnyx/models/calls/action_speak_params.rbi +50 -5
  60. data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +50 -5
  61. data/rbi/telnyx/models/conferences/action_speak_params.rbi +50 -5
  62. data/rbi/telnyx/models/uac_connection_create_params.rbi +1465 -0
  63. data/rbi/telnyx/models/uac_connection_create_response.rbi +1793 -0
  64. data/rbi/telnyx/models/uac_connection_delete_params.rbi +35 -0
  65. data/rbi/telnyx/models/uac_connection_delete_response.rbi +1793 -0
  66. data/rbi/telnyx/models/uac_connection_list_params.rbi +261 -0
  67. data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
  68. data/rbi/telnyx/models/uac_connection_retrieve_params.rbi +35 -0
  69. data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1793 -0
  70. data/rbi/telnyx/models/uac_connection_update_params.rbi +1463 -0
  71. data/rbi/telnyx/models/uac_connection_update_response.rbi +1793 -0
  72. data/rbi/telnyx/models/uac_connections/action_check_registration_status_params.rbi +40 -0
  73. data/rbi/telnyx/models/uac_connections/action_check_registration_status_response.rbi +237 -0
  74. data/rbi/telnyx/models.rbi +12 -0
  75. data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +6 -14
  76. data/rbi/telnyx/resources/ai/assistants/versions.rbi +3 -5
  77. data/rbi/telnyx/resources/ai/assistants.rbi +6 -10
  78. data/rbi/telnyx/resources/calls/actions.rbi +16 -4
  79. data/rbi/telnyx/resources/conferences/actions.rbi +4 -1
  80. data/rbi/telnyx/resources/uac_connections/actions.rbi +33 -0
  81. data/rbi/telnyx/resources/uac_connections.rbi +348 -0
  82. data/sig/telnyx/client.rbs +2 -0
  83. data/sig/telnyx/models/ai/assistant_create_params.rbs +18 -205
  84. data/sig/telnyx/models/ai/assistant_update_params.rbs +18 -205
  85. data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -4
  86. data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +113 -8
  87. data/sig/telnyx/models/ai/assistants/update_assistant.rbs +18 -205
  88. data/sig/telnyx/models/ai/external_llm.rbs +75 -0
  89. data/sig/telnyx/models/ai/external_llm_req.rbs +75 -0
  90. data/sig/telnyx/models/ai/fallback_config.rbs +38 -0
  91. data/sig/telnyx/models/ai/fallback_config_req.rbs +40 -0
  92. data/sig/telnyx/models/ai/inference_embedding.rbs +17 -206
  93. data/sig/telnyx/models/ai/post_conversation_settings.rbs +17 -0
  94. data/sig/telnyx/models/ai/post_conversation_settings_req.rbs +17 -0
  95. data/sig/telnyx/models/calls/action_gather_using_ai_params.rbs +15 -0
  96. data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +15 -0
  97. data/sig/telnyx/models/calls/action_speak_params.rbs +15 -0
  98. data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +15 -0
  99. data/sig/telnyx/models/conferences/action_speak_params.rbs +15 -0
  100. data/sig/telnyx/models/uac_connection_create_params.rbs +609 -0
  101. data/sig/telnyx/models/uac_connection_create_response.rbs +741 -0
  102. data/sig/telnyx/models/uac_connection_delete_params.rbs +20 -0
  103. data/sig/telnyx/models/uac_connection_delete_response.rbs +741 -0
  104. data/sig/telnyx/models/uac_connection_list_params.rbs +112 -0
  105. data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
  106. data/sig/telnyx/models/uac_connection_retrieve_params.rbs +20 -0
  107. data/sig/telnyx/models/uac_connection_retrieve_response.rbs +741 -0
  108. data/sig/telnyx/models/uac_connection_update_params.rbs +615 -0
  109. data/sig/telnyx/models/uac_connection_update_response.rbs +741 -0
  110. data/sig/telnyx/models/uac_connections/action_check_registration_status_params.rbs +22 -0
  111. data/sig/telnyx/models/uac_connections/action_check_registration_status_response.rbs +117 -0
  112. data/sig/telnyx/models.rbs +12 -0
  113. data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
  114. data/sig/telnyx/resources/ai/assistants/versions.rbs +3 -3
  115. data/sig/telnyx/resources/ai/assistants.rbs +6 -6
  116. data/sig/telnyx/resources/uac_connections/actions.rbs +14 -0
  117. data/sig/telnyx/resources/uac_connections.rbs +90 -0
  118. metadata +62 -5
  119. data/lib/telnyx/models/ai/assistants/version_config.rb +0 -30
  120. data/rbi/telnyx/models/ai/assistants/version_config.rbi +0 -45
  121. data/sig/telnyx/models/ai/assistants/version_config.rbs +0 -19
@@ -5,16 +5,137 @@ module Telnyx
5
5
  module AI
6
6
  module Assistants
7
7
  class CanaryDeploy < Telnyx::Internal::Type::BaseModel
8
- # @!attribute versions
9
- # List of version configurations
8
+ # @!attribute rules
10
9
  #
11
- # @return [Array<Telnyx::Models::AI::Assistants::VersionConfig>]
12
- required :versions, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::VersionConfig] }
10
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule>, nil]
11
+ optional :rules, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule] }
13
12
 
14
- # @!method initialize(versions:)
15
- # Request model for creating or updating canary deploys.
13
+ # @!method initialize(rules: nil)
14
+ # Create/update request body. Accepts:
16
15
  #
17
- # @param versions [Array<Telnyx::Models::AI::Assistants::VersionConfig>] List of version configurations
16
+ # - `rules` canonical ordered list of routing rules
17
+ #
18
+ # @param rules [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule>]
19
+
20
+ class Rule < Telnyx::Internal::Type::BaseModel
21
+ # @!attribute serve
22
+ # What a rule serves when matched.
23
+ #
24
+ # Exactly one of:
25
+ #
26
+ # - `version_id` — serve a specific version
27
+ # - `rollout` — weighted random across versions; weights must sum to less than
28
+ # 100, with the leftover routing to the main version
29
+ #
30
+ # @return [Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve]
31
+ required :serve, -> { Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve }
32
+
33
+ # @!attribute match
34
+ #
35
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match>, nil]
36
+ optional :match, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule::Match] }
37
+
38
+ # @!method initialize(serve:, match: nil)
39
+ # Some parameter documentations has been truncated, see
40
+ # {Telnyx::Models::AI::Assistants::CanaryDeploy::Rule} for more details.
41
+ #
42
+ # A targeting rule: `match` clauses (AND) gate `serve`.
43
+ #
44
+ # An empty `match` is a catch-all (always fires).
45
+ #
46
+ # @param serve [Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve] What a rule serves when matched.
47
+ #
48
+ # @param match [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match>]
49
+
50
+ # @see Telnyx::Models::AI::Assistants::CanaryDeploy::Rule#serve
51
+ class Serve < Telnyx::Internal::Type::BaseModel
52
+ # @!attribute rollout
53
+ #
54
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout>, nil]
55
+ optional :rollout,
56
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout] }
57
+
58
+ # @!attribute version_id
59
+ #
60
+ # @return [String, nil]
61
+ optional :version_id, String
62
+
63
+ # @!method initialize(rollout: nil, version_id: nil)
64
+ # What a rule serves when matched.
65
+ #
66
+ # Exactly one of:
67
+ #
68
+ # - `version_id` — serve a specific version
69
+ # - `rollout` — weighted random across versions; weights must sum to less than
70
+ # 100, with the leftover routing to the main version
71
+ #
72
+ # @param rollout [Array<Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Serve::Rollout>]
73
+ # @param version_id [String]
74
+
75
+ class Rollout < Telnyx::Internal::Type::BaseModel
76
+ # @!attribute version_id
77
+ #
78
+ # @return [String]
79
+ required :version_id, String
80
+
81
+ # @!attribute weight
82
+ #
83
+ # @return [Float]
84
+ required :weight, Float
85
+
86
+ # @!method initialize(version_id:, weight:)
87
+ # One slot in a percentage rollout.
88
+ #
89
+ # @param version_id [String]
90
+ # @param weight [Float]
91
+ end
92
+ end
93
+
94
+ class Match < Telnyx::Internal::Type::BaseModel
95
+ # @!attribute attribute
96
+ # Attribute name from the routing context
97
+ #
98
+ # @return [String]
99
+ required :attribute, String
100
+
101
+ # @!attribute operator
102
+ # Match operator
103
+ #
104
+ # @return [Symbol, Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::Operator]
105
+ required :operator, enum: -> { Telnyx::AI::Assistants::CanaryDeploy::Rule::Match::Operator }
106
+
107
+ # @!attribute values
108
+ #
109
+ # @return [Array<String>]
110
+ required :values, Telnyx::Internal::Type::ArrayOf[String]
111
+
112
+ # @!method initialize(attribute:, operator:, values:)
113
+ # A single attribute/operator/values check.
114
+ #
115
+ # A clause matches when the routing context's value for `attribute` satisfies
116
+ # `operator` against any of `values`.
117
+ #
118
+ # @param attribute [String] Attribute name from the routing context
119
+ #
120
+ # @param operator [Symbol, Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match::Operator] Match operator
121
+ #
122
+ # @param values [Array<String>]
123
+
124
+ # Match operator
125
+ #
126
+ # @see Telnyx::Models::AI::Assistants::CanaryDeploy::Rule::Match#operator
127
+ module Operator
128
+ extend Telnyx::Internal::Type::Enum
129
+
130
+ IN = :in
131
+ NOT_IN = :not_in
132
+ STARTS_WITH = :starts_with
133
+
134
+ # @!method self.values
135
+ # @return [Array<Symbol>]
136
+ end
137
+ end
138
+ end
18
139
  end
19
140
  end
20
141
  end
@@ -16,23 +16,147 @@ module Telnyx
16
16
  # @return [Time]
17
17
  required :created_at, Time
18
18
 
19
+ # @!attribute rules
20
+ #
21
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule>]
22
+ required :rules,
23
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule] }
24
+
19
25
  # @!attribute updated_at
20
26
  #
21
27
  # @return [Time]
22
28
  required :updated_at, Time
23
29
 
24
- # @!attribute versions
30
+ # @!method initialize(assistant_id:, created_at:, rules:, updated_at:)
31
+ # Response shape.
25
32
  #
26
- # @return [Array<Telnyx::Models::AI::Assistants::VersionConfig>]
27
- required :versions, -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::VersionConfig] }
28
-
29
- # @!method initialize(assistant_id:, created_at:, updated_at:, versions:)
30
- # Response model for canary deploy operations.
33
+ # Always carries `rules` (canonical).
31
34
  #
32
35
  # @param assistant_id [String]
33
36
  # @param created_at [Time]
37
+ # @param rules [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule>]
34
38
  # @param updated_at [Time]
35
- # @param versions [Array<Telnyx::Models::AI::Assistants::VersionConfig>]
39
+
40
+ class Rule < Telnyx::Internal::Type::BaseModel
41
+ # @!attribute serve
42
+ # What a rule serves when matched.
43
+ #
44
+ # Exactly one of:
45
+ #
46
+ # - `version_id` — serve a specific version
47
+ # - `rollout` — weighted random across versions; weights must sum to less than
48
+ # 100, with the leftover routing to the main version
49
+ #
50
+ # @return [Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve]
51
+ required :serve, -> { Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve }
52
+
53
+ # @!attribute match
54
+ #
55
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match>, nil]
56
+ optional :match,
57
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match] }
58
+
59
+ # @!method initialize(serve:, match: nil)
60
+ # Some parameter documentations has been truncated, see
61
+ # {Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule} for more details.
62
+ #
63
+ # A targeting rule: `match` clauses (AND) gate `serve`.
64
+ #
65
+ # An empty `match` is a catch-all (always fires).
66
+ #
67
+ # @param serve [Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve] What a rule serves when matched.
68
+ #
69
+ # @param match [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match>]
70
+
71
+ # @see Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule#serve
72
+ class Serve < Telnyx::Internal::Type::BaseModel
73
+ # @!attribute rollout
74
+ #
75
+ # @return [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout>, nil]
76
+ optional :rollout,
77
+ -> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout] }
78
+
79
+ # @!attribute version_id
80
+ #
81
+ # @return [String, nil]
82
+ optional :version_id, String
83
+
84
+ # @!method initialize(rollout: nil, version_id: nil)
85
+ # What a rule serves when matched.
86
+ #
87
+ # Exactly one of:
88
+ #
89
+ # - `version_id` — serve a specific version
90
+ # - `rollout` — weighted random across versions; weights must sum to less than
91
+ # 100, with the leftover routing to the main version
92
+ #
93
+ # @param rollout [Array<Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Serve::Rollout>]
94
+ # @param version_id [String]
95
+
96
+ class Rollout < Telnyx::Internal::Type::BaseModel
97
+ # @!attribute version_id
98
+ #
99
+ # @return [String]
100
+ required :version_id, String
101
+
102
+ # @!attribute weight
103
+ #
104
+ # @return [Float]
105
+ required :weight, Float
106
+
107
+ # @!method initialize(version_id:, weight:)
108
+ # One slot in a percentage rollout.
109
+ #
110
+ # @param version_id [String]
111
+ # @param weight [Float]
112
+ end
113
+ end
114
+
115
+ class Match < Telnyx::Internal::Type::BaseModel
116
+ # @!attribute attribute
117
+ # Attribute name from the routing context
118
+ #
119
+ # @return [String]
120
+ required :attribute, String
121
+
122
+ # @!attribute operator
123
+ # Match operator
124
+ #
125
+ # @return [Symbol, Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator]
126
+ required :operator, enum: -> { Telnyx::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator }
127
+
128
+ # @!attribute values
129
+ #
130
+ # @return [Array<String>]
131
+ required :values, Telnyx::Internal::Type::ArrayOf[String]
132
+
133
+ # @!method initialize(attribute:, operator:, values:)
134
+ # A single attribute/operator/values check.
135
+ #
136
+ # A clause matches when the routing context's value for `attribute` satisfies
137
+ # `operator` against any of `values`.
138
+ #
139
+ # @param attribute [String] Attribute name from the routing context
140
+ #
141
+ # @param operator [Symbol, Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match::Operator] Match operator
142
+ #
143
+ # @param values [Array<String>]
144
+
145
+ # Match operator
146
+ #
147
+ # @see Telnyx::Models::AI::Assistants::CanaryDeployResponse::Rule::Match#operator
148
+ module Operator
149
+ extend Telnyx::Internal::Type::Enum
150
+
151
+ IN = :in
152
+ NOT_IN = :not_in
153
+ STARTS_WITH = :starts_with
154
+
155
+ # @!method self.values
156
+ # @return [Array<Symbol>]
157
+ end
158
+ end
159
+ end
36
160
  end
37
161
  end
38
162
  end
@@ -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