telnyx 5.102.1 → 5.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/telnyx/models/ai/assistant_create_params.rb +170 -9
- data/lib/telnyx/models/ai/assistant_tool.rb +14 -14
- data/lib/telnyx/models/ai/assistant_update_params.rb +170 -9
- data/lib/telnyx/models/ai/assistants/canary_deploy.rb +123 -3
- data/lib/telnyx/models/ai/assistants/canary_deploy_response.rb +125 -3
- data/lib/telnyx/models/ai/assistants/scheduled_event_create_params.rb +17 -1
- data/lib/telnyx/models/ai/assistants/scheduled_phone_call_event_response.rb +91 -1
- data/lib/telnyx/models/ai/assistants/update_assistant.rb +171 -9
- data/lib/telnyx/models/ai/inference_embedding.rb +169 -9
- data/lib/telnyx/models/ai/openai_list_models_response.rb +31 -3
- data/lib/telnyx/models/ai/transfer_tool.rb +9 -7
- data/lib/telnyx/models/ai_retrieve_models_response.rb +31 -3
- data/lib/telnyx/models/calls/action_gather_using_ai_params.rb +23 -4
- data/lib/telnyx/models/calls/action_gather_using_speak_params.rb +23 -4
- data/lib/telnyx/models/calls/action_speak_params.rb +23 -4
- data/lib/telnyx/models/calls/action_start_ai_assistant_params.rb +23 -4
- data/lib/telnyx/models/calls/transcription_start_request.rb +167 -5
- data/lib/telnyx/models/conferences/action_speak_params.rb +23 -4
- data/lib/telnyx/models/text_to_speech_generate_params.rb +6 -6
- data/lib/telnyx/models/uac_connection_create_params.rb +255 -9
- data/lib/telnyx/models/uac_connection_create_response.rb +878 -3
- data/lib/telnyx/models/uac_connection_delete_response.rb +878 -3
- data/lib/telnyx/models/uac_connection_list_response.rb +876 -0
- data/lib/telnyx/models/uac_connection_retrieve_response.rb +879 -3
- data/lib/telnyx/models/uac_connection_update_params.rb +255 -9
- data/lib/telnyx/models/uac_connection_update_response.rb +878 -3
- data/lib/telnyx/models.rb +0 -14
- data/lib/telnyx/resources/ai/assistants/canary_deploys.rb +2 -2
- data/lib/telnyx/resources/ai/assistants/scheduled_events.rb +5 -1
- data/lib/telnyx/resources/ai/assistants/versions.rb +3 -3
- data/lib/telnyx/resources/ai/assistants.rb +6 -6
- data/lib/telnyx/resources/calls/actions.rb +5 -5
- data/lib/telnyx/resources/conferences/actions.rb +1 -1
- data/lib/telnyx/resources/uac_connections.rb +8 -8
- data/lib/telnyx/version.rb +1 -1
- data/lib/telnyx.rb +1 -19
- data/rbi/telnyx/models/ai/assistant_create_params.rbi +341 -12
- data/rbi/telnyx/models/ai/assistant_tool.rbi +10 -10
- data/rbi/telnyx/models/ai/assistant_update_params.rbi +341 -12
- data/rbi/telnyx/models/ai/assistants/canary_deploy.rbi +290 -4
- data/rbi/telnyx/models/ai/assistants/canary_deploy_response.rbi +301 -3
- data/rbi/telnyx/models/ai/assistants/scheduled_event_create_params.rbi +22 -0
- data/rbi/telnyx/models/ai/assistants/scheduled_phone_call_event_response.rbi +153 -0
- data/rbi/telnyx/models/ai/assistants/update_assistant.rbi +355 -12
- data/rbi/telnyx/models/ai/inference_embedding.rbi +340 -12
- data/rbi/telnyx/models/ai/openai_list_models_response.rbi +56 -3
- data/rbi/telnyx/models/ai/transfer_tool.rbi +5 -5
- data/rbi/telnyx/models/ai_retrieve_models_response.rbi +51 -3
- data/rbi/telnyx/models/calls/action_gather_using_ai_params.rbi +41 -5
- data/rbi/telnyx/models/calls/action_gather_using_speak_params.rbi +41 -5
- data/rbi/telnyx/models/calls/action_speak_params.rbi +41 -5
- data/rbi/telnyx/models/calls/action_start_ai_assistant_params.rbi +41 -5
- data/rbi/telnyx/models/calls/transcription_start_request.rbi +480 -10
- data/rbi/telnyx/models/conferences/action_speak_params.rbi +41 -5
- data/rbi/telnyx/models/text_to_speech_generate_params.rbi +6 -6
- data/rbi/telnyx/models/uac_connection_create_params.rbi +516 -12
- data/rbi/telnyx/models/uac_connection_create_response.rbi +1756 -4
- data/rbi/telnyx/models/uac_connection_delete_response.rbi +1756 -4
- data/rbi/telnyx/models/uac_connection_list_response.rbi +1727 -0
- data/rbi/telnyx/models/uac_connection_retrieve_response.rbi +1756 -4
- data/rbi/telnyx/models/uac_connection_update_params.rbi +516 -12
- data/rbi/telnyx/models/uac_connection_update_response.rbi +1756 -4
- data/rbi/telnyx/models.rbi +0 -14
- data/rbi/telnyx/resources/ai/assistants/canary_deploys.rbi +4 -2
- data/rbi/telnyx/resources/ai/assistants/scheduled_events.rbi +6 -0
- data/rbi/telnyx/resources/ai/assistants/versions.rbi +9 -3
- data/rbi/telnyx/resources/ai/assistants.rbi +10 -6
- data/rbi/telnyx/resources/calls/actions.rbi +6 -6
- data/rbi/telnyx/resources/conferences/actions.rbi +1 -1
- data/rbi/telnyx/resources/uac_connections.rbi +13 -7
- data/sig/telnyx/models/ai/assistant_create_params.rbs +142 -18
- data/sig/telnyx/models/ai/assistant_tool.rbs +8 -8
- data/sig/telnyx/models/ai/assistant_update_params.rbs +142 -18
- data/sig/telnyx/models/ai/assistants/canary_deploy.rbs +113 -6
- data/sig/telnyx/models/ai/assistants/canary_deploy_response.rbs +109 -4
- data/sig/telnyx/models/ai/assistants/scheduled_event_create_params.rbs +14 -0
- data/sig/telnyx/models/ai/assistants/scheduled_phone_call_event_response.rbs +85 -0
- data/sig/telnyx/models/ai/assistants/update_assistant.rbs +145 -18
- data/sig/telnyx/models/ai/inference_embedding.rbs +142 -18
- data/sig/telnyx/models/ai/openai_list_models_response.rbs +39 -4
- data/sig/telnyx/models/ai/transfer_tool.rbs +4 -4
- data/sig/telnyx/models/ai_retrieve_models_response.rbs +39 -4
- data/sig/telnyx/models/calls/action_gather_using_ai_params.rbs +15 -1
- data/sig/telnyx/models/calls/action_gather_using_speak_params.rbs +15 -1
- data/sig/telnyx/models/calls/action_speak_params.rbs +15 -1
- data/sig/telnyx/models/calls/action_start_ai_assistant_params.rbs +15 -1
- data/sig/telnyx/models/calls/transcription_start_request.rbs +184 -2
- data/sig/telnyx/models/conferences/action_speak_params.rbs +15 -1
- data/sig/telnyx/models/text_to_speech_generate_params.rbs +6 -6
- data/sig/telnyx/models/uac_connection_create_params.rbs +211 -17
- data/sig/telnyx/models/uac_connection_create_response.rbs +731 -5
- data/sig/telnyx/models/uac_connection_delete_response.rbs +731 -5
- data/sig/telnyx/models/uac_connection_list_response.rbs +722 -0
- data/sig/telnyx/models/uac_connection_retrieve_response.rbs +731 -5
- data/sig/telnyx/models/uac_connection_update_params.rbs +211 -17
- data/sig/telnyx/models/uac_connection_update_response.rbs +731 -5
- data/sig/telnyx/models.rbs +0 -14
- data/sig/telnyx/resources/ai/assistants/canary_deploys.rbs +2 -2
- data/sig/telnyx/resources/ai/assistants/scheduled_events.rbs +2 -0
- data/sig/telnyx/resources/ai/assistants/versions.rbs +3 -3
- data/sig/telnyx/resources/ai/assistants.rbs +6 -6
- data/sig/telnyx/resources/uac_connections.rbs +7 -7
- metadata +4 -58
- data/lib/telnyx/models/ai/assistant_integration.rb +0 -38
- data/lib/telnyx/models/ai/assistant_mcp_server.rb +0 -35
- data/lib/telnyx/models/ai/assistants/clause.rb +0 -54
- data/lib/telnyx/models/ai/assistants/rollout_slot.rb +0 -27
- data/lib/telnyx/models/ai/assistants/rule_input.rb +0 -40
- data/lib/telnyx/models/ai/assistants/rule_output.rb +0 -40
- data/lib/telnyx/models/ai/assistants/serve.rb +0 -33
- data/lib/telnyx/models/ai/inference_embedding_interruption_settings.rb +0 -39
- data/lib/telnyx/models/ai/start_speaking_plan.rb +0 -37
- data/lib/telnyx/models/ai/transcription_endpointing_plan.rb +0 -39
- data/lib/telnyx/models/calls/transcription_engine_assemblyai_config.rb +0 -64
- data/lib/telnyx/models/calls/transcription_engine_xai_config.rb +0 -108
- data/lib/telnyx/models/model_metadata.rb +0 -33
- data/lib/telnyx/models/uac_connection.rb +0 -412
- data/lib/telnyx/models/uac_external_settings.rb +0 -101
- data/lib/telnyx/models/uac_inbound.rb +0 -210
- data/lib/telnyx/models/uac_internal_settings.rb +0 -25
- data/lib/telnyx/models/uac_outbound.rb +0 -131
- data/lib/telnyx/models/xai_voice_settings.rb +0 -36
- data/rbi/telnyx/models/ai/assistant_integration.rbi +0 -60
- data/rbi/telnyx/models/ai/assistant_mcp_server.rbi +0 -51
- data/rbi/telnyx/models/ai/assistants/clause.rbi +0 -91
- data/rbi/telnyx/models/ai/assistants/rollout_slot.rbi +0 -36
- data/rbi/telnyx/models/ai/assistants/rule_input.rbi +0 -73
- data/rbi/telnyx/models/ai/assistants/rule_output.rbi +0 -73
- data/rbi/telnyx/models/ai/assistants/serve.rbi +0 -61
- data/rbi/telnyx/models/ai/inference_embedding_interruption_settings.rbi +0 -72
- data/rbi/telnyx/models/ai/start_speaking_plan.rbi +0 -70
- data/rbi/telnyx/models/ai/transcription_endpointing_plan.rbi +0 -71
- data/rbi/telnyx/models/calls/transcription_engine_assemblyai_config.rbi +0 -155
- data/rbi/telnyx/models/calls/transcription_engine_xai_config.rbi +0 -329
- data/rbi/telnyx/models/model_metadata.rbi +0 -44
- data/rbi/telnyx/models/uac_connection.rbi +0 -684
- data/rbi/telnyx/models/uac_external_settings.rbi +0 -146
- data/rbi/telnyx/models/uac_inbound.rbi +0 -410
- data/rbi/telnyx/models/uac_internal_settings.rbi +0 -39
- data/rbi/telnyx/models/uac_outbound.rbi +0 -224
- data/rbi/telnyx/models/xai_voice_settings.rbi +0 -64
- data/sig/telnyx/models/ai/assistant_integration.rbs +0 -26
- data/sig/telnyx/models/ai/assistant_mcp_server.rbs +0 -19
- data/sig/telnyx/models/ai/assistants/clause.rbs +0 -46
- data/sig/telnyx/models/ai/assistants/rollout_slot.rbs +0 -19
- data/sig/telnyx/models/ai/assistants/rule_input.rbs +0 -33
- data/sig/telnyx/models/ai/assistants/rule_output.rbs +0 -33
- data/sig/telnyx/models/ai/assistants/serve.rbs +0 -35
- data/sig/telnyx/models/ai/inference_embedding_interruption_settings.rbs +0 -30
- data/sig/telnyx/models/ai/start_speaking_plan.rbs +0 -33
- data/sig/telnyx/models/ai/transcription_endpointing_plan.rbs +0 -38
- data/sig/telnyx/models/calls/transcription_engine_assemblyai_config.rbs +0 -62
- data/sig/telnyx/models/calls/transcription_engine_xai_config.rbs +0 -130
- data/sig/telnyx/models/model_metadata.rbs +0 -32
- data/sig/telnyx/models/uac_connection.rbs +0 -338
- data/sig/telnyx/models/uac_external_settings.rbs +0 -73
- data/sig/telnyx/models/uac_inbound.rbs +0 -190
- data/sig/telnyx/models/uac_internal_settings.rbs +0 -15
- data/sig/telnyx/models/uac_outbound.rbs +0 -113
- data/sig/telnyx/models/xai_voice_settings.rbs +0 -34
|
@@ -32,6 +32,41 @@ module Telnyx
|
|
|
32
32
|
sig { returns(String) }
|
|
33
33
|
attr_accessor :telnyx_end_user_target
|
|
34
34
|
|
|
35
|
+
sig do
|
|
36
|
+
returns(
|
|
37
|
+
T.nilable(
|
|
38
|
+
T::Array[
|
|
39
|
+
Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt
|
|
40
|
+
]
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
attr_reader :call_attempts
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
call_attempts:
|
|
49
|
+
T::Array[
|
|
50
|
+
Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt::OrHash
|
|
51
|
+
]
|
|
52
|
+
).void
|
|
53
|
+
end
|
|
54
|
+
attr_writer :call_attempts
|
|
55
|
+
|
|
56
|
+
# Duration of the call in seconds
|
|
57
|
+
sig { returns(T.nilable(Integer)) }
|
|
58
|
+
attr_reader :call_duration
|
|
59
|
+
|
|
60
|
+
sig { params(call_duration: Integer).void }
|
|
61
|
+
attr_writer :call_duration
|
|
62
|
+
|
|
63
|
+
# Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
64
|
+
sig { returns(T.nilable(String)) }
|
|
65
|
+
attr_reader :call_status
|
|
66
|
+
|
|
67
|
+
sig { params(call_status: String).void }
|
|
68
|
+
attr_writer :call_status
|
|
69
|
+
|
|
35
70
|
sig { returns(T.nilable(String)) }
|
|
36
71
|
attr_reader :conversation_id
|
|
37
72
|
|
|
@@ -67,6 +102,13 @@ module Telnyx
|
|
|
67
102
|
sig { params(created_at: Time).void }
|
|
68
103
|
attr_writer :created_at
|
|
69
104
|
|
|
105
|
+
# Date time at which call was sent
|
|
106
|
+
sig { returns(T.nilable(Time)) }
|
|
107
|
+
attr_reader :dispatched_at
|
|
108
|
+
|
|
109
|
+
sig { params(dispatched_at: Time).void }
|
|
110
|
+
attr_writer :dispatched_at
|
|
111
|
+
|
|
70
112
|
# A map of dynamic variable names to values. These variables can be referenced in
|
|
71
113
|
# the assistant's instructions and messages using {{variable_name}} syntax.
|
|
72
114
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
@@ -81,6 +123,14 @@ module Telnyx
|
|
|
81
123
|
sig { params(errors: T::Array[String]).void }
|
|
82
124
|
attr_writer :errors
|
|
83
125
|
|
|
126
|
+
# Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
127
|
+
# (caller hung up before the callee answered)
|
|
128
|
+
sig { returns(T.nilable(Integer)) }
|
|
129
|
+
attr_reader :max_retries_client_errors
|
|
130
|
+
|
|
131
|
+
sig { params(max_retries_client_errors: Integer).void }
|
|
132
|
+
attr_writer :max_retries_client_errors
|
|
133
|
+
|
|
84
134
|
sig { returns(T.nilable(Integer)) }
|
|
85
135
|
attr_reader :retry_attempts
|
|
86
136
|
|
|
@@ -93,6 +143,12 @@ module Telnyx
|
|
|
93
143
|
sig { params(retry_count: Integer).void }
|
|
94
144
|
attr_writer :retry_count
|
|
95
145
|
|
|
146
|
+
sig { returns(T.nilable(Integer)) }
|
|
147
|
+
attr_reader :retry_interval_secs
|
|
148
|
+
|
|
149
|
+
sig { params(retry_interval_secs: Integer).void }
|
|
150
|
+
attr_writer :retry_interval_secs
|
|
151
|
+
|
|
96
152
|
sig { returns(T.nilable(String)) }
|
|
97
153
|
attr_reader :scheduled_event_id
|
|
98
154
|
|
|
@@ -119,6 +175,12 @@ module Telnyx
|
|
|
119
175
|
telnyx_conversation_channel:
|
|
120
176
|
Telnyx::AI::Assistants::ConversationChannelType::OrSymbol,
|
|
121
177
|
telnyx_end_user_target: String,
|
|
178
|
+
call_attempts:
|
|
179
|
+
T::Array[
|
|
180
|
+
Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt::OrHash
|
|
181
|
+
],
|
|
182
|
+
call_duration: Integer,
|
|
183
|
+
call_status: String,
|
|
122
184
|
conversation_id: String,
|
|
123
185
|
conversation_metadata:
|
|
124
186
|
T::Hash[
|
|
@@ -126,10 +188,13 @@ module Telnyx
|
|
|
126
188
|
Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::ConversationMetadata::Variants
|
|
127
189
|
],
|
|
128
190
|
created_at: Time,
|
|
191
|
+
dispatched_at: Time,
|
|
129
192
|
dynamic_variables: T::Hash[Symbol, String],
|
|
130
193
|
errors: T::Array[String],
|
|
194
|
+
max_retries_client_errors: Integer,
|
|
131
195
|
retry_attempts: Integer,
|
|
132
196
|
retry_count: Integer,
|
|
197
|
+
retry_interval_secs: Integer,
|
|
133
198
|
scheduled_event_id: String,
|
|
134
199
|
status: Telnyx::AI::Assistants::EventStatus::OrSymbol
|
|
135
200
|
).returns(T.attached_class)
|
|
@@ -140,15 +205,26 @@ module Telnyx
|
|
|
140
205
|
telnyx_agent_target:,
|
|
141
206
|
telnyx_conversation_channel:,
|
|
142
207
|
telnyx_end_user_target:,
|
|
208
|
+
call_attempts: nil,
|
|
209
|
+
# Duration of the call in seconds
|
|
210
|
+
call_duration: nil,
|
|
211
|
+
# Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
212
|
+
call_status: nil,
|
|
143
213
|
conversation_id: nil,
|
|
144
214
|
conversation_metadata: nil,
|
|
145
215
|
created_at: nil,
|
|
216
|
+
# Date time at which call was sent
|
|
217
|
+
dispatched_at: nil,
|
|
146
218
|
# A map of dynamic variable names to values. These variables can be referenced in
|
|
147
219
|
# the assistant's instructions and messages using {{variable_name}} syntax.
|
|
148
220
|
dynamic_variables: nil,
|
|
149
221
|
errors: nil,
|
|
222
|
+
# Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
223
|
+
# (caller hung up before the callee answered)
|
|
224
|
+
max_retries_client_errors: nil,
|
|
150
225
|
retry_attempts: nil,
|
|
151
226
|
retry_count: nil,
|
|
227
|
+
retry_interval_secs: nil,
|
|
152
228
|
scheduled_event_id: nil,
|
|
153
229
|
status: nil
|
|
154
230
|
)
|
|
@@ -163,6 +239,12 @@ module Telnyx
|
|
|
163
239
|
telnyx_conversation_channel:
|
|
164
240
|
Telnyx::AI::Assistants::ConversationChannelType::TaggedSymbol,
|
|
165
241
|
telnyx_end_user_target: String,
|
|
242
|
+
call_attempts:
|
|
243
|
+
T::Array[
|
|
244
|
+
Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt
|
|
245
|
+
],
|
|
246
|
+
call_duration: Integer,
|
|
247
|
+
call_status: String,
|
|
166
248
|
conversation_id: String,
|
|
167
249
|
conversation_metadata:
|
|
168
250
|
T::Hash[
|
|
@@ -170,10 +252,13 @@ module Telnyx
|
|
|
170
252
|
Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::ConversationMetadata::Variants
|
|
171
253
|
],
|
|
172
254
|
created_at: Time,
|
|
255
|
+
dispatched_at: Time,
|
|
173
256
|
dynamic_variables: T::Hash[Symbol, String],
|
|
174
257
|
errors: T::Array[String],
|
|
258
|
+
max_retries_client_errors: Integer,
|
|
175
259
|
retry_attempts: Integer,
|
|
176
260
|
retry_count: Integer,
|
|
261
|
+
retry_interval_secs: Integer,
|
|
177
262
|
scheduled_event_id: String,
|
|
178
263
|
status: Telnyx::AI::Assistants::EventStatus::TaggedSymbol
|
|
179
264
|
}
|
|
@@ -182,6 +267,74 @@ module Telnyx
|
|
|
182
267
|
def to_hash
|
|
183
268
|
end
|
|
184
269
|
|
|
270
|
+
class CallAttempt < Telnyx::Internal::Type::BaseModel
|
|
271
|
+
OrHash =
|
|
272
|
+
T.type_alias do
|
|
273
|
+
T.any(
|
|
274
|
+
Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt,
|
|
275
|
+
Telnyx::Internal::AnyHash
|
|
276
|
+
)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
sig { returns(Integer) }
|
|
280
|
+
attr_accessor :attempt_number
|
|
281
|
+
|
|
282
|
+
sig { returns(Time) }
|
|
283
|
+
attr_accessor :attempted_at
|
|
284
|
+
|
|
285
|
+
# Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
286
|
+
sig { returns(String) }
|
|
287
|
+
attr_accessor :call_status
|
|
288
|
+
|
|
289
|
+
# Duration of the call in seconds
|
|
290
|
+
sig { returns(T.nilable(Integer)) }
|
|
291
|
+
attr_reader :call_duration
|
|
292
|
+
|
|
293
|
+
sig { params(call_duration: Integer).void }
|
|
294
|
+
attr_writer :call_duration
|
|
295
|
+
|
|
296
|
+
sig { returns(T.nilable(String)) }
|
|
297
|
+
attr_reader :telnyx_call_control_id
|
|
298
|
+
|
|
299
|
+
sig { params(telnyx_call_control_id: String).void }
|
|
300
|
+
attr_writer :telnyx_call_control_id
|
|
301
|
+
|
|
302
|
+
# One row in `call_attempts` — captures the terminal outcome of a single dispatch.
|
|
303
|
+
sig do
|
|
304
|
+
params(
|
|
305
|
+
attempt_number: Integer,
|
|
306
|
+
attempted_at: Time,
|
|
307
|
+
call_status: String,
|
|
308
|
+
call_duration: Integer,
|
|
309
|
+
telnyx_call_control_id: String
|
|
310
|
+
).returns(T.attached_class)
|
|
311
|
+
end
|
|
312
|
+
def self.new(
|
|
313
|
+
attempt_number:,
|
|
314
|
+
attempted_at:,
|
|
315
|
+
# Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
316
|
+
call_status:,
|
|
317
|
+
# Duration of the call in seconds
|
|
318
|
+
call_duration: nil,
|
|
319
|
+
telnyx_call_control_id: nil
|
|
320
|
+
)
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
sig do
|
|
324
|
+
override.returns(
|
|
325
|
+
{
|
|
326
|
+
attempt_number: Integer,
|
|
327
|
+
attempted_at: Time,
|
|
328
|
+
call_status: String,
|
|
329
|
+
call_duration: Integer,
|
|
330
|
+
telnyx_call_control_id: String
|
|
331
|
+
}
|
|
332
|
+
)
|
|
333
|
+
end
|
|
334
|
+
def to_hash
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
|
|
185
338
|
module ConversationMetadata
|
|
186
339
|
extend Telnyx::Internal::Type::Union
|
|
187
340
|
|
|
@@ -110,12 +110,21 @@ module Telnyx
|
|
|
110
110
|
# integrations is at `/ai/integrations`; the user's connected integrations are at
|
|
111
111
|
# `/ai/integrations/connections`. Each item references a catalog integration by
|
|
112
112
|
# `integration_id`.
|
|
113
|
-
sig
|
|
113
|
+
sig do
|
|
114
|
+
returns(
|
|
115
|
+
T.nilable(
|
|
116
|
+
T::Array[Telnyx::AI::Assistants::UpdateAssistant::Integration]
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
end
|
|
114
120
|
attr_reader :integrations
|
|
115
121
|
|
|
116
122
|
sig do
|
|
117
123
|
params(
|
|
118
|
-
integrations:
|
|
124
|
+
integrations:
|
|
125
|
+
T::Array[
|
|
126
|
+
Telnyx::AI::Assistants::UpdateAssistant::Integration::OrHash
|
|
127
|
+
]
|
|
119
128
|
).void
|
|
120
129
|
end
|
|
121
130
|
attr_writer :integrations
|
|
@@ -128,7 +137,9 @@ module Telnyx
|
|
|
128
137
|
# `eager_eot_threshold`).
|
|
129
138
|
sig do
|
|
130
139
|
returns(
|
|
131
|
-
T.nilable(
|
|
140
|
+
T.nilable(
|
|
141
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings
|
|
142
|
+
)
|
|
132
143
|
)
|
|
133
144
|
end
|
|
134
145
|
attr_reader :interruption_settings
|
|
@@ -136,7 +147,7 @@ module Telnyx
|
|
|
136
147
|
sig do
|
|
137
148
|
params(
|
|
138
149
|
interruption_settings:
|
|
139
|
-
Telnyx::AI::
|
|
150
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::OrHash
|
|
140
151
|
).void
|
|
141
152
|
end
|
|
142
153
|
attr_writer :interruption_settings
|
|
@@ -155,12 +166,21 @@ module Telnyx
|
|
|
155
166
|
|
|
156
167
|
# MCP servers attached to the assistant. Create MCP servers with
|
|
157
168
|
# `/ai/mcp_servers`, then reference them by `id` here.
|
|
158
|
-
sig
|
|
169
|
+
sig do
|
|
170
|
+
returns(
|
|
171
|
+
T.nilable(
|
|
172
|
+
T::Array[Telnyx::AI::Assistants::UpdateAssistant::McpServer]
|
|
173
|
+
)
|
|
174
|
+
)
|
|
175
|
+
end
|
|
159
176
|
attr_reader :mcp_servers
|
|
160
177
|
|
|
161
178
|
sig do
|
|
162
179
|
params(
|
|
163
|
-
mcp_servers:
|
|
180
|
+
mcp_servers:
|
|
181
|
+
T::Array[
|
|
182
|
+
Telnyx::AI::Assistants::UpdateAssistant::McpServer::OrHash
|
|
183
|
+
]
|
|
164
184
|
).void
|
|
165
185
|
end
|
|
166
186
|
attr_writer :mcp_servers
|
|
@@ -343,11 +363,17 @@ module Telnyx
|
|
|
343
363
|
greeting: String,
|
|
344
364
|
insight_settings: Telnyx::AI::InsightSettings::OrHash,
|
|
345
365
|
instructions: String,
|
|
346
|
-
integrations:
|
|
366
|
+
integrations:
|
|
367
|
+
T::Array[
|
|
368
|
+
Telnyx::AI::Assistants::UpdateAssistant::Integration::OrHash
|
|
369
|
+
],
|
|
347
370
|
interruption_settings:
|
|
348
|
-
Telnyx::AI::
|
|
371
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::OrHash,
|
|
349
372
|
llm_api_key_ref: String,
|
|
350
|
-
mcp_servers:
|
|
373
|
+
mcp_servers:
|
|
374
|
+
T::Array[
|
|
375
|
+
Telnyx::AI::Assistants::UpdateAssistant::McpServer::OrHash
|
|
376
|
+
],
|
|
351
377
|
messaging_settings: Telnyx::AI::MessagingSettings::OrHash,
|
|
352
378
|
model: String,
|
|
353
379
|
name: String,
|
|
@@ -484,11 +510,15 @@ module Telnyx
|
|
|
484
510
|
greeting: String,
|
|
485
511
|
insight_settings: Telnyx::AI::InsightSettings,
|
|
486
512
|
instructions: String,
|
|
487
|
-
integrations:
|
|
513
|
+
integrations:
|
|
514
|
+
T::Array[
|
|
515
|
+
Telnyx::AI::Assistants::UpdateAssistant::Integration
|
|
516
|
+
],
|
|
488
517
|
interruption_settings:
|
|
489
|
-
Telnyx::AI::
|
|
518
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings,
|
|
490
519
|
llm_api_key_ref: String,
|
|
491
|
-
mcp_servers:
|
|
520
|
+
mcp_servers:
|
|
521
|
+
T::Array[Telnyx::AI::Assistants::UpdateAssistant::McpServer],
|
|
492
522
|
messaging_settings: Telnyx::AI::MessagingSettings,
|
|
493
523
|
model: String,
|
|
494
524
|
name: String,
|
|
@@ -523,6 +553,319 @@ module Telnyx
|
|
|
523
553
|
end
|
|
524
554
|
def to_hash
|
|
525
555
|
end
|
|
556
|
+
|
|
557
|
+
class Integration < Telnyx::Internal::Type::BaseModel
|
|
558
|
+
OrHash =
|
|
559
|
+
T.type_alias do
|
|
560
|
+
T.any(
|
|
561
|
+
Telnyx::AI::Assistants::UpdateAssistant::Integration,
|
|
562
|
+
Telnyx::Internal::AnyHash
|
|
563
|
+
)
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
# Catalog integration ID to attach. This is the `id` from the integrations catalog
|
|
567
|
+
# at `/ai/integrations` (the same value also appears as `integration_id` on
|
|
568
|
+
# entries returned by `/ai/integrations/connections`). It is **not** the
|
|
569
|
+
# connection-level `id` from `/ai/integrations/connections`.
|
|
570
|
+
sig { returns(String) }
|
|
571
|
+
attr_accessor :integration_id
|
|
572
|
+
|
|
573
|
+
# Optional per-assistant allowlist of integration tool names. When omitted or
|
|
574
|
+
# empty, all tools allowed by the connected integration are available to the
|
|
575
|
+
# assistant.
|
|
576
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
577
|
+
attr_reader :allowed_list
|
|
578
|
+
|
|
579
|
+
sig { params(allowed_list: T::Array[String]).void }
|
|
580
|
+
attr_writer :allowed_list
|
|
581
|
+
|
|
582
|
+
# Reference to a connected integration attached to an assistant. Discover
|
|
583
|
+
# available integrations with `/ai/integrations` and connected integrations with
|
|
584
|
+
# `/ai/integrations/connections`.
|
|
585
|
+
sig do
|
|
586
|
+
params(
|
|
587
|
+
integration_id: String,
|
|
588
|
+
allowed_list: T::Array[String]
|
|
589
|
+
).returns(T.attached_class)
|
|
590
|
+
end
|
|
591
|
+
def self.new(
|
|
592
|
+
# Catalog integration ID to attach. This is the `id` from the integrations catalog
|
|
593
|
+
# at `/ai/integrations` (the same value also appears as `integration_id` on
|
|
594
|
+
# entries returned by `/ai/integrations/connections`). It is **not** the
|
|
595
|
+
# connection-level `id` from `/ai/integrations/connections`.
|
|
596
|
+
integration_id:,
|
|
597
|
+
# Optional per-assistant allowlist of integration tool names. When omitted or
|
|
598
|
+
# empty, all tools allowed by the connected integration are available to the
|
|
599
|
+
# assistant.
|
|
600
|
+
allowed_list: nil
|
|
601
|
+
)
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
sig do
|
|
605
|
+
override.returns(
|
|
606
|
+
{ integration_id: String, allowed_list: T::Array[String] }
|
|
607
|
+
)
|
|
608
|
+
end
|
|
609
|
+
def to_hash
|
|
610
|
+
end
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
class InterruptionSettings < Telnyx::Internal::Type::BaseModel
|
|
614
|
+
OrHash =
|
|
615
|
+
T.type_alias do
|
|
616
|
+
T.any(
|
|
617
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings,
|
|
618
|
+
Telnyx::Internal::AnyHash
|
|
619
|
+
)
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
# Whether users can interrupt the assistant while it is speaking.
|
|
623
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
624
|
+
attr_reader :enable
|
|
625
|
+
|
|
626
|
+
sig { params(enable: T::Boolean).void }
|
|
627
|
+
attr_writer :enable
|
|
628
|
+
|
|
629
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
630
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
631
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
632
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
633
|
+
sig do
|
|
634
|
+
returns(
|
|
635
|
+
T.nilable(
|
|
636
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan
|
|
637
|
+
)
|
|
638
|
+
)
|
|
639
|
+
end
|
|
640
|
+
attr_reader :start_speaking_plan
|
|
641
|
+
|
|
642
|
+
sig do
|
|
643
|
+
params(
|
|
644
|
+
start_speaking_plan:
|
|
645
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan::OrHash
|
|
646
|
+
).void
|
|
647
|
+
end
|
|
648
|
+
attr_writer :start_speaking_plan
|
|
649
|
+
|
|
650
|
+
# Settings for interruptions and how the assistant decides the user has finished
|
|
651
|
+
# speaking. These timings are most relevant when using non turn-taking
|
|
652
|
+
# transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
|
|
653
|
+
# behavior is controlled by the transcription end-of-turn settings under
|
|
654
|
+
# `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
|
|
655
|
+
# `eager_eot_threshold`).
|
|
656
|
+
sig do
|
|
657
|
+
params(
|
|
658
|
+
enable: T::Boolean,
|
|
659
|
+
start_speaking_plan:
|
|
660
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan::OrHash
|
|
661
|
+
).returns(T.attached_class)
|
|
662
|
+
end
|
|
663
|
+
def self.new(
|
|
664
|
+
# Whether users can interrupt the assistant while it is speaking.
|
|
665
|
+
enable: nil,
|
|
666
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
667
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
668
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
669
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
670
|
+
start_speaking_plan: nil
|
|
671
|
+
)
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
sig do
|
|
675
|
+
override.returns(
|
|
676
|
+
{
|
|
677
|
+
enable: T::Boolean,
|
|
678
|
+
start_speaking_plan:
|
|
679
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan
|
|
680
|
+
}
|
|
681
|
+
)
|
|
682
|
+
end
|
|
683
|
+
def to_hash
|
|
684
|
+
end
|
|
685
|
+
|
|
686
|
+
class StartSpeakingPlan < Telnyx::Internal::Type::BaseModel
|
|
687
|
+
OrHash =
|
|
688
|
+
T.type_alias do
|
|
689
|
+
T.any(
|
|
690
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan,
|
|
691
|
+
Telnyx::Internal::AnyHash
|
|
692
|
+
)
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
696
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
697
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
698
|
+
# `eager_eot_threshold`.
|
|
699
|
+
sig do
|
|
700
|
+
returns(
|
|
701
|
+
T.nilable(
|
|
702
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan
|
|
703
|
+
)
|
|
704
|
+
)
|
|
705
|
+
end
|
|
706
|
+
attr_reader :transcription_endpointing_plan
|
|
707
|
+
|
|
708
|
+
sig do
|
|
709
|
+
params(
|
|
710
|
+
transcription_endpointing_plan:
|
|
711
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan::OrHash
|
|
712
|
+
).void
|
|
713
|
+
end
|
|
714
|
+
attr_writer :transcription_endpointing_plan
|
|
715
|
+
|
|
716
|
+
# Minimum seconds to wait before the assistant starts speaking.
|
|
717
|
+
sig { returns(T.nilable(Float)) }
|
|
718
|
+
attr_reader :wait_seconds
|
|
719
|
+
|
|
720
|
+
sig { params(wait_seconds: Float).void }
|
|
721
|
+
attr_writer :wait_seconds
|
|
722
|
+
|
|
723
|
+
# Controls when the assistant starts speaking after the user stops. These
|
|
724
|
+
# thresholds primarily apply to non turn-taking transcription models. For
|
|
725
|
+
# turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
|
|
726
|
+
# transcription end-of-turn settings under `transcription.settings` instead.
|
|
727
|
+
sig do
|
|
728
|
+
params(
|
|
729
|
+
transcription_endpointing_plan:
|
|
730
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan::OrHash,
|
|
731
|
+
wait_seconds: Float
|
|
732
|
+
).returns(T.attached_class)
|
|
733
|
+
end
|
|
734
|
+
def self.new(
|
|
735
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
736
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
737
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
738
|
+
# `eager_eot_threshold`.
|
|
739
|
+
transcription_endpointing_plan: nil,
|
|
740
|
+
# Minimum seconds to wait before the assistant starts speaking.
|
|
741
|
+
wait_seconds: nil
|
|
742
|
+
)
|
|
743
|
+
end
|
|
744
|
+
|
|
745
|
+
sig do
|
|
746
|
+
override.returns(
|
|
747
|
+
{
|
|
748
|
+
transcription_endpointing_plan:
|
|
749
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan,
|
|
750
|
+
wait_seconds: Float
|
|
751
|
+
}
|
|
752
|
+
)
|
|
753
|
+
end
|
|
754
|
+
def to_hash
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
class TranscriptionEndpointingPlan < Telnyx::Internal::Type::BaseModel
|
|
758
|
+
OrHash =
|
|
759
|
+
T.type_alias do
|
|
760
|
+
T.any(
|
|
761
|
+
Telnyx::AI::Assistants::UpdateAssistant::InterruptionSettings::StartSpeakingPlan::TranscriptionEndpointingPlan,
|
|
762
|
+
Telnyx::Internal::AnyHash
|
|
763
|
+
)
|
|
764
|
+
end
|
|
765
|
+
|
|
766
|
+
# Seconds to wait after the transcript ends without punctuation.
|
|
767
|
+
sig { returns(T.nilable(Float)) }
|
|
768
|
+
attr_reader :on_no_punctuation_seconds
|
|
769
|
+
|
|
770
|
+
sig { params(on_no_punctuation_seconds: Float).void }
|
|
771
|
+
attr_writer :on_no_punctuation_seconds
|
|
772
|
+
|
|
773
|
+
# Seconds to wait after the transcript ends with a number.
|
|
774
|
+
sig { returns(T.nilable(Float)) }
|
|
775
|
+
attr_reader :on_number_seconds
|
|
776
|
+
|
|
777
|
+
sig { params(on_number_seconds: Float).void }
|
|
778
|
+
attr_writer :on_number_seconds
|
|
779
|
+
|
|
780
|
+
# Seconds to wait after the transcript ends with punctuation.
|
|
781
|
+
sig { returns(T.nilable(Float)) }
|
|
782
|
+
attr_reader :on_punctuation_seconds
|
|
783
|
+
|
|
784
|
+
sig { params(on_punctuation_seconds: Float).void }
|
|
785
|
+
attr_writer :on_punctuation_seconds
|
|
786
|
+
|
|
787
|
+
# Endpointing thresholds used to decide when the user has finished speaking.
|
|
788
|
+
# Applies to non turn-taking transcription models. For `deepgram/flux`, use
|
|
789
|
+
# `transcription.settings.eot_threshold` / `eot_timeout_ms` /
|
|
790
|
+
# `eager_eot_threshold`.
|
|
791
|
+
sig do
|
|
792
|
+
params(
|
|
793
|
+
on_no_punctuation_seconds: Float,
|
|
794
|
+
on_number_seconds: Float,
|
|
795
|
+
on_punctuation_seconds: Float
|
|
796
|
+
).returns(T.attached_class)
|
|
797
|
+
end
|
|
798
|
+
def self.new(
|
|
799
|
+
# Seconds to wait after the transcript ends without punctuation.
|
|
800
|
+
on_no_punctuation_seconds: nil,
|
|
801
|
+
# Seconds to wait after the transcript ends with a number.
|
|
802
|
+
on_number_seconds: nil,
|
|
803
|
+
# Seconds to wait after the transcript ends with punctuation.
|
|
804
|
+
on_punctuation_seconds: nil
|
|
805
|
+
)
|
|
806
|
+
end
|
|
807
|
+
|
|
808
|
+
sig do
|
|
809
|
+
override.returns(
|
|
810
|
+
{
|
|
811
|
+
on_no_punctuation_seconds: Float,
|
|
812
|
+
on_number_seconds: Float,
|
|
813
|
+
on_punctuation_seconds: Float
|
|
814
|
+
}
|
|
815
|
+
)
|
|
816
|
+
end
|
|
817
|
+
def to_hash
|
|
818
|
+
end
|
|
819
|
+
end
|
|
820
|
+
end
|
|
821
|
+
end
|
|
822
|
+
|
|
823
|
+
class McpServer < Telnyx::Internal::Type::BaseModel
|
|
824
|
+
OrHash =
|
|
825
|
+
T.type_alias do
|
|
826
|
+
T.any(
|
|
827
|
+
Telnyx::AI::Assistants::UpdateAssistant::McpServer,
|
|
828
|
+
Telnyx::Internal::AnyHash
|
|
829
|
+
)
|
|
830
|
+
end
|
|
831
|
+
|
|
832
|
+
# ID of the MCP server to attach. This must be the `id` of an MCP server returned
|
|
833
|
+
# by the `/ai/mcp_servers` endpoints.
|
|
834
|
+
sig { returns(String) }
|
|
835
|
+
attr_accessor :id
|
|
836
|
+
|
|
837
|
+
# Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
|
|
838
|
+
# uses the MCP server's configured `allowed_tools`.
|
|
839
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
840
|
+
attr_reader :allowed_tools
|
|
841
|
+
|
|
842
|
+
sig { params(allowed_tools: T::Array[String]).void }
|
|
843
|
+
attr_writer :allowed_tools
|
|
844
|
+
|
|
845
|
+
# Reference to an MCP server attached to an assistant. Create and manage MCP
|
|
846
|
+
# servers with the `/ai/mcp_servers` endpoints, then attach them to assistants by
|
|
847
|
+
# ID.
|
|
848
|
+
sig do
|
|
849
|
+
params(id: String, allowed_tools: T::Array[String]).returns(
|
|
850
|
+
T.attached_class
|
|
851
|
+
)
|
|
852
|
+
end
|
|
853
|
+
def self.new(
|
|
854
|
+
# ID of the MCP server to attach. This must be the `id` of an MCP server returned
|
|
855
|
+
# by the `/ai/mcp_servers` endpoints.
|
|
856
|
+
id:,
|
|
857
|
+
# Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
|
|
858
|
+
# uses the MCP server's configured `allowed_tools`.
|
|
859
|
+
allowed_tools: nil
|
|
860
|
+
)
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
sig do
|
|
864
|
+
override.returns({ id: String, allowed_tools: T::Array[String] })
|
|
865
|
+
end
|
|
866
|
+
def to_hash
|
|
867
|
+
end
|
|
868
|
+
end
|
|
526
869
|
end
|
|
527
870
|
end
|
|
528
871
|
end
|