telnyx 5.102.0 → 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 +29 -0
- data/README.md +1 -1
- 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/calls/transcription_config.rb +71 -10
- data/lib/telnyx/resources/ai/assistants/scheduled_events.rb +5 -1
- data/lib/telnyx/version.rb +1 -1
- 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/calls/transcription_config.rbi +173 -16
- data/rbi/telnyx/resources/ai/assistants/scheduled_events.rbi +6 -0
- 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/calls/transcription_config.rbs +56 -5
- data/sig/telnyx/resources/ai/assistants/scheduled_events.rbs +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 227cffe8a91ada4d396e150181ae2abe4bc8f1aeb7366b0824fe8abf6d70243f
|
|
4
|
+
data.tar.gz: 699b34aae78eb87cd7cac27c25e1e7e87042efe7de03aa89d70a95665bedfb8b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9a64eae98a8fb407c8b48ef325a786de24fa3e2fd4bded2247ebd81354e04a99afa172703acf1f676ab6b673af22d0bf28d320c137c8fc752226dedf5e1e02c
|
|
7
|
+
data.tar.gz: 7c91d76c00085e73b62087d093856bc7a0bbe09d1f3a16432c09a051907df14267c3e488afa568e8839754eafd8ec64318cf259c79a32b2e6c5c46a9ff6c2be0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.103.0 (2026-05-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v5.102.1...v5.103.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.102.1...v5.103.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Add Speechmatics provider to standalone STT spec ([ca94503](https://github.com/team-telnyx/telnyx-ruby/commit/ca945036fb52cf72d6cbcdf3a683b77e56aacdf3))
|
|
10
|
+
* Ai-assistant: update scheduled events api ([5567900](https://github.com/team-telnyx/telnyx-ruby/commit/5567900fe1aed9caa1d74188807ef9ec3e15459c))
|
|
11
|
+
* **api:** manual updates ([0261568](https://github.com/team-telnyx/telnyx-ruby/commit/02615682257dfa6d243127d9e1eae6938268a8eb))
|
|
12
|
+
* **api:** manual updates ([044e221](https://github.com/team-telnyx/telnyx-ruby/commit/044e22120a5676d514af5442d913064fc5fa9789))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Reverts
|
|
16
|
+
|
|
17
|
+
* restore stainless.yml from before 9853597 ([89c9cfd](https://github.com/team-telnyx/telnyx-ruby/commit/89c9cfdd1ea3879f32247bf59822e38eb870b9cd))
|
|
18
|
+
|
|
19
|
+
## 5.102.1 (2026-05-07)
|
|
20
|
+
|
|
21
|
+
Full Changelog: [v5.102.0...v5.102.1](https://github.com/team-telnyx/telnyx-ruby/compare/v5.102.0...v5.102.1)
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* revert stainless.yml changes from ad4f13c ([2d5c581](https://github.com/team-telnyx/telnyx-ruby/commit/2d5c581e38bf1f25f71cf97221ba07f36f0fee47))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Documentation
|
|
29
|
+
|
|
30
|
+
* update gather_using_ai transcription models ([d0c29ae](https://github.com/team-telnyx/telnyx-ruby/commit/d0c29ae46b2976f37a57c42d93526adbbd7bbf0f))
|
|
31
|
+
|
|
3
32
|
## 5.102.0 (2026-05-07)
|
|
4
33
|
|
|
5
34
|
Full Changelog: [v5.101.0...v5.102.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.101.0...v5.102.0)
|
data/README.md
CHANGED
|
@@ -52,13 +52,25 @@ module Telnyx
|
|
|
52
52
|
# @return [Hash{Symbol=>String}, nil]
|
|
53
53
|
optional :dynamic_variables, Telnyx::Internal::Type::HashOf[String]
|
|
54
54
|
|
|
55
|
+
# @!attribute max_retries_client_errors
|
|
56
|
+
# Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
57
|
+
# (caller hung up before the callee answered)
|
|
58
|
+
#
|
|
59
|
+
# @return [Integer, nil]
|
|
60
|
+
optional :max_retries_client_errors, Integer
|
|
61
|
+
|
|
62
|
+
# @!attribute retry_interval_secs
|
|
63
|
+
#
|
|
64
|
+
# @return [Integer, nil]
|
|
65
|
+
optional :retry_interval_secs, Integer
|
|
66
|
+
|
|
55
67
|
# @!attribute text
|
|
56
68
|
# Required for sms scheduled events. The text to be sent to the end user.
|
|
57
69
|
#
|
|
58
70
|
# @return [String, nil]
|
|
59
71
|
optional :text, String
|
|
60
72
|
|
|
61
|
-
# @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_metadata: nil, dynamic_variables: nil, text: nil, request_options: {})
|
|
73
|
+
# @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_metadata: nil, dynamic_variables: nil, max_retries_client_errors: nil, retry_interval_secs: nil, text: nil, request_options: {})
|
|
62
74
|
# Some parameter documentations has been truncated, see
|
|
63
75
|
# {Telnyx::Models::AI::Assistants::ScheduledEventCreateParams} for more details.
|
|
64
76
|
#
|
|
@@ -76,6 +88,10 @@ module Telnyx
|
|
|
76
88
|
#
|
|
77
89
|
# @param dynamic_variables [Hash{Symbol=>String}] A map of dynamic variable names to values. These variables can be referenced in
|
|
78
90
|
#
|
|
91
|
+
# @param max_retries_client_errors [Integer] Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
92
|
+
#
|
|
93
|
+
# @param retry_interval_secs [Integer]
|
|
94
|
+
#
|
|
79
95
|
# @param text [String] Required for sms scheduled events. The text to be sent to the end user.
|
|
80
96
|
#
|
|
81
97
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -30,6 +30,24 @@ module Telnyx
|
|
|
30
30
|
# @return [String]
|
|
31
31
|
required :telnyx_end_user_target, String
|
|
32
32
|
|
|
33
|
+
# @!attribute call_attempts
|
|
34
|
+
#
|
|
35
|
+
# @return [Array<Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt>, nil]
|
|
36
|
+
optional :call_attempts,
|
|
37
|
+
-> { Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt] }
|
|
38
|
+
|
|
39
|
+
# @!attribute call_duration
|
|
40
|
+
# Duration of the call in seconds
|
|
41
|
+
#
|
|
42
|
+
# @return [Integer, nil]
|
|
43
|
+
optional :call_duration, Integer
|
|
44
|
+
|
|
45
|
+
# @!attribute call_status
|
|
46
|
+
# Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
47
|
+
#
|
|
48
|
+
# @return [String, nil]
|
|
49
|
+
optional :call_status, String
|
|
50
|
+
|
|
33
51
|
# @!attribute conversation_id
|
|
34
52
|
#
|
|
35
53
|
# @return [String, nil]
|
|
@@ -46,6 +64,12 @@ module Telnyx
|
|
|
46
64
|
# @return [Time, nil]
|
|
47
65
|
optional :created_at, Time
|
|
48
66
|
|
|
67
|
+
# @!attribute dispatched_at
|
|
68
|
+
# Date time at which call was sent
|
|
69
|
+
#
|
|
70
|
+
# @return [Time, nil]
|
|
71
|
+
optional :dispatched_at, Time
|
|
72
|
+
|
|
49
73
|
# @!attribute dynamic_variables
|
|
50
74
|
# A map of dynamic variable names to values. These variables can be referenced in
|
|
51
75
|
# the assistant's instructions and messages using {{variable_name}} syntax.
|
|
@@ -58,6 +82,13 @@ module Telnyx
|
|
|
58
82
|
# @return [Array<String>, nil]
|
|
59
83
|
optional :errors, Telnyx::Internal::Type::ArrayOf[String]
|
|
60
84
|
|
|
85
|
+
# @!attribute max_retries_client_errors
|
|
86
|
+
# Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
87
|
+
# (caller hung up before the callee answered)
|
|
88
|
+
#
|
|
89
|
+
# @return [Integer, nil]
|
|
90
|
+
optional :max_retries_client_errors, Integer
|
|
91
|
+
|
|
61
92
|
# @!attribute retry_attempts
|
|
62
93
|
#
|
|
63
94
|
# @return [Integer, nil]
|
|
@@ -68,6 +99,11 @@ module Telnyx
|
|
|
68
99
|
# @return [Integer, nil]
|
|
69
100
|
optional :retry_count, Integer
|
|
70
101
|
|
|
102
|
+
# @!attribute retry_interval_secs
|
|
103
|
+
#
|
|
104
|
+
# @return [Integer, nil]
|
|
105
|
+
optional :retry_interval_secs, Integer
|
|
106
|
+
|
|
71
107
|
# @!attribute scheduled_event_id
|
|
72
108
|
#
|
|
73
109
|
# @return [String, nil]
|
|
@@ -78,7 +114,7 @@ module Telnyx
|
|
|
78
114
|
# @return [Symbol, Telnyx::Models::AI::Assistants::EventStatus, nil]
|
|
79
115
|
optional :status, enum: -> { Telnyx::AI::Assistants::EventStatus }
|
|
80
116
|
|
|
81
|
-
# @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_id: nil, conversation_metadata: nil, created_at: nil, dynamic_variables: nil, errors: nil, retry_attempts: nil, retry_count: nil, scheduled_event_id: nil, status: nil)
|
|
117
|
+
# @!method initialize(assistant_id:, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, call_attempts: nil, call_duration: nil, call_status: nil, conversation_id: nil, conversation_metadata: nil, created_at: nil, dispatched_at: nil, dynamic_variables: nil, errors: nil, max_retries_client_errors: nil, retry_attempts: nil, retry_count: nil, retry_interval_secs: nil, scheduled_event_id: nil, status: nil)
|
|
82
118
|
# Some parameter documentations has been truncated, see
|
|
83
119
|
# {Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse} for more
|
|
84
120
|
# details.
|
|
@@ -93,24 +129,78 @@ module Telnyx
|
|
|
93
129
|
#
|
|
94
130
|
# @param telnyx_end_user_target [String]
|
|
95
131
|
#
|
|
132
|
+
# @param call_attempts [Array<Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt>]
|
|
133
|
+
#
|
|
134
|
+
# @param call_duration [Integer] Duration of the call in seconds
|
|
135
|
+
#
|
|
136
|
+
# @param call_status [String] Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
137
|
+
#
|
|
96
138
|
# @param conversation_id [String]
|
|
97
139
|
#
|
|
98
140
|
# @param conversation_metadata [Hash{Symbol=>String, Integer, Boolean}]
|
|
99
141
|
#
|
|
100
142
|
# @param created_at [Time]
|
|
101
143
|
#
|
|
144
|
+
# @param dispatched_at [Time] Date time at which call was sent
|
|
145
|
+
#
|
|
102
146
|
# @param dynamic_variables [Hash{Symbol=>String}] A map of dynamic variable names to values. These variables can be referenced in
|
|
103
147
|
#
|
|
104
148
|
# @param errors [Array<String>]
|
|
105
149
|
#
|
|
150
|
+
# @param max_retries_client_errors [Integer] Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
151
|
+
#
|
|
106
152
|
# @param retry_attempts [Integer]
|
|
107
153
|
#
|
|
108
154
|
# @param retry_count [Integer]
|
|
109
155
|
#
|
|
156
|
+
# @param retry_interval_secs [Integer]
|
|
157
|
+
#
|
|
110
158
|
# @param scheduled_event_id [String]
|
|
111
159
|
#
|
|
112
160
|
# @param status [Symbol, Telnyx::Models::AI::Assistants::EventStatus]
|
|
113
161
|
|
|
162
|
+
class CallAttempt < Telnyx::Internal::Type::BaseModel
|
|
163
|
+
# @!attribute attempt_number
|
|
164
|
+
#
|
|
165
|
+
# @return [Integer]
|
|
166
|
+
required :attempt_number, Integer
|
|
167
|
+
|
|
168
|
+
# @!attribute attempted_at
|
|
169
|
+
#
|
|
170
|
+
# @return [Time]
|
|
171
|
+
required :attempted_at, Time
|
|
172
|
+
|
|
173
|
+
# @!attribute call_status
|
|
174
|
+
# Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
175
|
+
#
|
|
176
|
+
# @return [String]
|
|
177
|
+
required :call_status, String
|
|
178
|
+
|
|
179
|
+
# @!attribute call_duration
|
|
180
|
+
# Duration of the call in seconds
|
|
181
|
+
#
|
|
182
|
+
# @return [Integer, nil]
|
|
183
|
+
optional :call_duration, Integer
|
|
184
|
+
|
|
185
|
+
# @!attribute telnyx_call_control_id
|
|
186
|
+
#
|
|
187
|
+
# @return [String, nil]
|
|
188
|
+
optional :telnyx_call_control_id, String
|
|
189
|
+
|
|
190
|
+
# @!method initialize(attempt_number:, attempted_at:, call_status:, call_duration: nil, telnyx_call_control_id: nil)
|
|
191
|
+
# One row in `call_attempts` — captures the terminal outcome of a single dispatch.
|
|
192
|
+
#
|
|
193
|
+
# @param attempt_number [Integer]
|
|
194
|
+
#
|
|
195
|
+
# @param attempted_at [Time]
|
|
196
|
+
#
|
|
197
|
+
# @param call_status [String] Values: busy, canceled, no-answer, ringing, completed, failed, in-progress
|
|
198
|
+
#
|
|
199
|
+
# @param call_duration [Integer] Duration of the call in seconds
|
|
200
|
+
#
|
|
201
|
+
# @param telnyx_call_control_id [String]
|
|
202
|
+
end
|
|
203
|
+
|
|
114
204
|
module ConversationMetadata
|
|
115
205
|
extend Telnyx::Internal::Type::Union
|
|
116
206
|
|
|
@@ -4,19 +4,39 @@ module Telnyx
|
|
|
4
4
|
module Models
|
|
5
5
|
module Calls
|
|
6
6
|
class TranscriptionConfig < Telnyx::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute language
|
|
8
|
+
# The language of the audio to be transcribed. If not set, or if set to `auto`,
|
|
9
|
+
# supported models will automatically detect the language. Supported and
|
|
10
|
+
# meaningful values depend on the selected transcription `model`. For
|
|
11
|
+
# `deepgram/flux`, supported values are: `auto` (Telnyx language detection
|
|
12
|
+
# controls the language hint), `multi` (no language hint), and language-specific
|
|
13
|
+
# hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`.
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :language, String
|
|
17
|
+
|
|
7
18
|
# @!attribute model
|
|
8
|
-
# The speech to text model to be used by the voice assistant.
|
|
19
|
+
# The speech to text model to be used by the voice assistant. Supported models
|
|
20
|
+
# include:
|
|
9
21
|
#
|
|
10
|
-
# - `
|
|
11
|
-
# - `
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
22
|
+
# - `deepgram/flux` (or `flux`) for live streaming turn-taking.
|
|
23
|
+
# - `deepgram/nova-3` and `deepgram/nova-2` for live streaming transcription.
|
|
24
|
+
# - `speechmatics/standard` and `speechmatics/enhanced` for live streaming
|
|
25
|
+
# transcription.
|
|
26
|
+
# - `assemblyai/universal-streaming` for live streaming transcription.
|
|
27
|
+
# - `xai/grok-stt` for live streaming transcription.
|
|
28
|
+
# - `azure/fast` and `azure/realtime`; Azure models require `region`, and
|
|
29
|
+
# unsupported regions require `api_key_ref`.
|
|
30
|
+
# - `google/latest_long` for non-streaming multilingual transcription.
|
|
31
|
+
# - `distil-whisper/distil-large-v2` for lower-latency English-only non-streaming
|
|
32
|
+
# transcription.
|
|
33
|
+
# - `openai/whisper-large-v3-turbo` for multilingual non-streaming transcription
|
|
34
|
+
# with automatic language detection.
|
|
15
35
|
#
|
|
16
|
-
# @return [
|
|
17
|
-
optional :model,
|
|
36
|
+
# @return [Symbol, Telnyx::Models::Calls::TranscriptionConfig::Model, nil]
|
|
37
|
+
optional :model, enum: -> { Telnyx::Calls::TranscriptionConfig::Model }
|
|
18
38
|
|
|
19
|
-
# @!method initialize(model: nil)
|
|
39
|
+
# @!method initialize(language: nil, model: nil)
|
|
20
40
|
# Some parameter documentations has been truncated, see
|
|
21
41
|
# {Telnyx::Models::Calls::TranscriptionConfig} for more details.
|
|
22
42
|
#
|
|
@@ -25,7 +45,48 @@ module Telnyx
|
|
|
25
45
|
# using a model with native audio support (e.g. `fixie-ai/ultravox-v0_4`) will
|
|
26
46
|
# ignore this field.
|
|
27
47
|
#
|
|
28
|
-
# @param
|
|
48
|
+
# @param language [String] The language of the audio to be transcribed. If not set, or if set to `auto`, su
|
|
49
|
+
#
|
|
50
|
+
# @param model [Symbol, Telnyx::Models::Calls::TranscriptionConfig::Model] The speech to text model to be used by the voice assistant. Supported models inc
|
|
51
|
+
|
|
52
|
+
# The speech to text model to be used by the voice assistant. Supported models
|
|
53
|
+
# include:
|
|
54
|
+
#
|
|
55
|
+
# - `deepgram/flux` (or `flux`) for live streaming turn-taking.
|
|
56
|
+
# - `deepgram/nova-3` and `deepgram/nova-2` for live streaming transcription.
|
|
57
|
+
# - `speechmatics/standard` and `speechmatics/enhanced` for live streaming
|
|
58
|
+
# transcription.
|
|
59
|
+
# - `assemblyai/universal-streaming` for live streaming transcription.
|
|
60
|
+
# - `xai/grok-stt` for live streaming transcription.
|
|
61
|
+
# - `azure/fast` and `azure/realtime`; Azure models require `region`, and
|
|
62
|
+
# unsupported regions require `api_key_ref`.
|
|
63
|
+
# - `google/latest_long` for non-streaming multilingual transcription.
|
|
64
|
+
# - `distil-whisper/distil-large-v2` for lower-latency English-only non-streaming
|
|
65
|
+
# transcription.
|
|
66
|
+
# - `openai/whisper-large-v3-turbo` for multilingual non-streaming transcription
|
|
67
|
+
# with automatic language detection.
|
|
68
|
+
#
|
|
69
|
+
# @see Telnyx::Models::Calls::TranscriptionConfig#model
|
|
70
|
+
module Model
|
|
71
|
+
extend Telnyx::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
DEEPGRAM_FLUX = :"deepgram/flux"
|
|
74
|
+
FLUX = :flux
|
|
75
|
+
DEEPGRAM_NOVA_3 = :"deepgram/nova-3"
|
|
76
|
+
DEEPGRAM_NOVA_2 = :"deepgram/nova-2"
|
|
77
|
+
SPEECHMATICS_STANDARD = :"speechmatics/standard"
|
|
78
|
+
SPEECHMATICS_ENHANCED = :"speechmatics/enhanced"
|
|
79
|
+
ASSEMBLYAI_UNIVERSAL_STREAMING = :"assemblyai/universal-streaming"
|
|
80
|
+
XAI_GROK_STT = :"xai/grok-stt"
|
|
81
|
+
AZURE_FAST = :"azure/fast"
|
|
82
|
+
AZURE_REALTIME = :"azure/realtime"
|
|
83
|
+
GOOGLE_LATEST_LONG = :"google/latest_long"
|
|
84
|
+
DISTIL_WHISPER_DISTIL_LARGE_V2 = :"distil-whisper/distil-large-v2"
|
|
85
|
+
OPENAI_WHISPER_LARGE_V3_TURBO = :"openai/whisper-large-v3-turbo"
|
|
86
|
+
|
|
87
|
+
# @!method self.values
|
|
88
|
+
# @return [Array<Symbol>]
|
|
89
|
+
end
|
|
29
90
|
end
|
|
30
91
|
end
|
|
31
92
|
end
|
|
@@ -11,7 +11,7 @@ module Telnyx
|
|
|
11
11
|
#
|
|
12
12
|
# Create a scheduled event for an assistant
|
|
13
13
|
#
|
|
14
|
-
# @overload create(assistant_id, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_metadata: nil, dynamic_variables: nil, text: nil, request_options: {})
|
|
14
|
+
# @overload create(assistant_id, scheduled_at_fixed_datetime:, telnyx_agent_target:, telnyx_conversation_channel:, telnyx_end_user_target:, conversation_metadata: nil, dynamic_variables: nil, max_retries_client_errors: nil, retry_interval_secs: nil, text: nil, request_options: {})
|
|
15
15
|
#
|
|
16
16
|
# @param assistant_id [String]
|
|
17
17
|
#
|
|
@@ -27,6 +27,10 @@ module Telnyx
|
|
|
27
27
|
#
|
|
28
28
|
# @param dynamic_variables [Hash{Symbol=>String}] A map of dynamic variable names to values. These variables can be referenced in
|
|
29
29
|
#
|
|
30
|
+
# @param max_retries_client_errors [Integer] Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
31
|
+
#
|
|
32
|
+
# @param retry_interval_secs [Integer]
|
|
33
|
+
#
|
|
30
34
|
# @param text [String] Required for sms scheduled events. The text to be sent to the end user.
|
|
31
35
|
#
|
|
32
36
|
# @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/telnyx/version.rb
CHANGED
|
@@ -69,6 +69,20 @@ module Telnyx
|
|
|
69
69
|
sig { params(dynamic_variables: T::Hash[Symbol, String]).void }
|
|
70
70
|
attr_writer :dynamic_variables
|
|
71
71
|
|
|
72
|
+
# Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
73
|
+
# (caller hung up before the callee answered)
|
|
74
|
+
sig { returns(T.nilable(Integer)) }
|
|
75
|
+
attr_reader :max_retries_client_errors
|
|
76
|
+
|
|
77
|
+
sig { params(max_retries_client_errors: Integer).void }
|
|
78
|
+
attr_writer :max_retries_client_errors
|
|
79
|
+
|
|
80
|
+
sig { returns(T.nilable(Integer)) }
|
|
81
|
+
attr_reader :retry_interval_secs
|
|
82
|
+
|
|
83
|
+
sig { params(retry_interval_secs: Integer).void }
|
|
84
|
+
attr_writer :retry_interval_secs
|
|
85
|
+
|
|
72
86
|
# Required for sms scheduled events. The text to be sent to the end user.
|
|
73
87
|
sig { returns(T.nilable(String)) }
|
|
74
88
|
attr_reader :text
|
|
@@ -90,6 +104,8 @@ module Telnyx
|
|
|
90
104
|
Telnyx::AI::Assistants::ScheduledEventCreateParams::ConversationMetadata::Variants
|
|
91
105
|
],
|
|
92
106
|
dynamic_variables: T::Hash[Symbol, String],
|
|
107
|
+
max_retries_client_errors: Integer,
|
|
108
|
+
retry_interval_secs: Integer,
|
|
93
109
|
text: String,
|
|
94
110
|
request_options: Telnyx::RequestOptions::OrHash
|
|
95
111
|
).returns(T.attached_class)
|
|
@@ -109,6 +125,10 @@ module Telnyx
|
|
|
109
125
|
# A map of dynamic variable names to values. These variables can be referenced in
|
|
110
126
|
# the assistant's instructions and messages using {{variable_name}} syntax.
|
|
111
127
|
dynamic_variables: nil,
|
|
128
|
+
# Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
129
|
+
# (caller hung up before the callee answered)
|
|
130
|
+
max_retries_client_errors: nil,
|
|
131
|
+
retry_interval_secs: nil,
|
|
112
132
|
# Required for sms scheduled events. The text to be sent to the end user.
|
|
113
133
|
text: nil,
|
|
114
134
|
request_options: {}
|
|
@@ -130,6 +150,8 @@ module Telnyx
|
|
|
130
150
|
Telnyx::AI::Assistants::ScheduledEventCreateParams::ConversationMetadata::Variants
|
|
131
151
|
],
|
|
132
152
|
dynamic_variables: T::Hash[Symbol, String],
|
|
153
|
+
max_retries_client_errors: Integer,
|
|
154
|
+
retry_interval_secs: Integer,
|
|
133
155
|
text: String,
|
|
134
156
|
request_options: Telnyx::RequestOptions
|
|
135
157
|
}
|
|
@@ -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
|
|
|
@@ -9,39 +9,196 @@ module Telnyx
|
|
|
9
9
|
T.any(Telnyx::Calls::TranscriptionConfig, Telnyx::Internal::AnyHash)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
# The
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
# `language` field.
|
|
12
|
+
# The language of the audio to be transcribed. If not set, or if set to `auto`,
|
|
13
|
+
# supported models will automatically detect the language. Supported and
|
|
14
|
+
# meaningful values depend on the selected transcription `model`. For
|
|
15
|
+
# `deepgram/flux`, supported values are: `auto` (Telnyx language detection
|
|
16
|
+
# controls the language hint), `multi` (no language hint), and language-specific
|
|
17
|
+
# hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`.
|
|
19
18
|
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :language
|
|
20
|
+
|
|
21
|
+
sig { params(language: String).void }
|
|
22
|
+
attr_writer :language
|
|
23
|
+
|
|
24
|
+
# The speech to text model to be used by the voice assistant. Supported models
|
|
25
|
+
# include:
|
|
26
|
+
#
|
|
27
|
+
# - `deepgram/flux` (or `flux`) for live streaming turn-taking.
|
|
28
|
+
# - `deepgram/nova-3` and `deepgram/nova-2` for live streaming transcription.
|
|
29
|
+
# - `speechmatics/standard` and `speechmatics/enhanced` for live streaming
|
|
30
|
+
# transcription.
|
|
31
|
+
# - `assemblyai/universal-streaming` for live streaming transcription.
|
|
32
|
+
# - `xai/grok-stt` for live streaming transcription.
|
|
33
|
+
# - `azure/fast` and `azure/realtime`; Azure models require `region`, and
|
|
34
|
+
# unsupported regions require `api_key_ref`.
|
|
35
|
+
# - `google/latest_long` for non-streaming multilingual transcription.
|
|
36
|
+
# - `distil-whisper/distil-large-v2` for lower-latency English-only non-streaming
|
|
37
|
+
# transcription.
|
|
38
|
+
# - `openai/whisper-large-v3-turbo` for multilingual non-streaming transcription
|
|
39
|
+
# with automatic language detection.
|
|
40
|
+
sig do
|
|
41
|
+
returns(
|
|
42
|
+
T.nilable(Telnyx::Calls::TranscriptionConfig::Model::OrSymbol)
|
|
43
|
+
)
|
|
44
|
+
end
|
|
20
45
|
attr_reader :model
|
|
21
46
|
|
|
22
|
-
sig
|
|
47
|
+
sig do
|
|
48
|
+
params(
|
|
49
|
+
model: Telnyx::Calls::TranscriptionConfig::Model::OrSymbol
|
|
50
|
+
).void
|
|
51
|
+
end
|
|
23
52
|
attr_writer :model
|
|
24
53
|
|
|
25
54
|
# The settings associated with speech to text for the voice assistant. This is
|
|
26
55
|
# only relevant if the assistant uses a text-to-text language model. Any assistant
|
|
27
56
|
# using a model with native audio support (e.g. `fixie-ai/ultravox-v0_4`) will
|
|
28
57
|
# ignore this field.
|
|
29
|
-
sig
|
|
58
|
+
sig do
|
|
59
|
+
params(
|
|
60
|
+
language: String,
|
|
61
|
+
model: Telnyx::Calls::TranscriptionConfig::Model::OrSymbol
|
|
62
|
+
).returns(T.attached_class)
|
|
63
|
+
end
|
|
30
64
|
def self.new(
|
|
31
|
-
# The
|
|
65
|
+
# The language of the audio to be transcribed. If not set, or if set to `auto`,
|
|
66
|
+
# supported models will automatically detect the language. Supported and
|
|
67
|
+
# meaningful values depend on the selected transcription `model`. For
|
|
68
|
+
# `deepgram/flux`, supported values are: `auto` (Telnyx language detection
|
|
69
|
+
# controls the language hint), `multi` (no language hint), and language-specific
|
|
70
|
+
# hints `en`, `es`, `fr`, `de`, `hi`, `ru`, `pt`, `ja`, `it`, and `nl`.
|
|
71
|
+
language: nil,
|
|
72
|
+
# The speech to text model to be used by the voice assistant. Supported models
|
|
73
|
+
# include:
|
|
32
74
|
#
|
|
33
|
-
# - `
|
|
34
|
-
# - `
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
75
|
+
# - `deepgram/flux` (or `flux`) for live streaming turn-taking.
|
|
76
|
+
# - `deepgram/nova-3` and `deepgram/nova-2` for live streaming transcription.
|
|
77
|
+
# - `speechmatics/standard` and `speechmatics/enhanced` for live streaming
|
|
78
|
+
# transcription.
|
|
79
|
+
# - `assemblyai/universal-streaming` for live streaming transcription.
|
|
80
|
+
# - `xai/grok-stt` for live streaming transcription.
|
|
81
|
+
# - `azure/fast` and `azure/realtime`; Azure models require `region`, and
|
|
82
|
+
# unsupported regions require `api_key_ref`.
|
|
83
|
+
# - `google/latest_long` for non-streaming multilingual transcription.
|
|
84
|
+
# - `distil-whisper/distil-large-v2` for lower-latency English-only non-streaming
|
|
85
|
+
# transcription.
|
|
86
|
+
# - `openai/whisper-large-v3-turbo` for multilingual non-streaming transcription
|
|
87
|
+
# with automatic language detection.
|
|
38
88
|
model: nil
|
|
39
89
|
)
|
|
40
90
|
end
|
|
41
91
|
|
|
42
|
-
sig
|
|
92
|
+
sig do
|
|
93
|
+
override.returns(
|
|
94
|
+
{
|
|
95
|
+
language: String,
|
|
96
|
+
model: Telnyx::Calls::TranscriptionConfig::Model::OrSymbol
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
end
|
|
43
100
|
def to_hash
|
|
44
101
|
end
|
|
102
|
+
|
|
103
|
+
# The speech to text model to be used by the voice assistant. Supported models
|
|
104
|
+
# include:
|
|
105
|
+
#
|
|
106
|
+
# - `deepgram/flux` (or `flux`) for live streaming turn-taking.
|
|
107
|
+
# - `deepgram/nova-3` and `deepgram/nova-2` for live streaming transcription.
|
|
108
|
+
# - `speechmatics/standard` and `speechmatics/enhanced` for live streaming
|
|
109
|
+
# transcription.
|
|
110
|
+
# - `assemblyai/universal-streaming` for live streaming transcription.
|
|
111
|
+
# - `xai/grok-stt` for live streaming transcription.
|
|
112
|
+
# - `azure/fast` and `azure/realtime`; Azure models require `region`, and
|
|
113
|
+
# unsupported regions require `api_key_ref`.
|
|
114
|
+
# - `google/latest_long` for non-streaming multilingual transcription.
|
|
115
|
+
# - `distil-whisper/distil-large-v2` for lower-latency English-only non-streaming
|
|
116
|
+
# transcription.
|
|
117
|
+
# - `openai/whisper-large-v3-turbo` for multilingual non-streaming transcription
|
|
118
|
+
# with automatic language detection.
|
|
119
|
+
module Model
|
|
120
|
+
extend Telnyx::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
TaggedSymbol =
|
|
123
|
+
T.type_alias do
|
|
124
|
+
T.all(Symbol, Telnyx::Calls::TranscriptionConfig::Model)
|
|
125
|
+
end
|
|
126
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
127
|
+
|
|
128
|
+
DEEPGRAM_FLUX =
|
|
129
|
+
T.let(
|
|
130
|
+
:"deepgram/flux",
|
|
131
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
132
|
+
)
|
|
133
|
+
FLUX =
|
|
134
|
+
T.let(
|
|
135
|
+
:flux,
|
|
136
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
137
|
+
)
|
|
138
|
+
DEEPGRAM_NOVA_3 =
|
|
139
|
+
T.let(
|
|
140
|
+
:"deepgram/nova-3",
|
|
141
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
142
|
+
)
|
|
143
|
+
DEEPGRAM_NOVA_2 =
|
|
144
|
+
T.let(
|
|
145
|
+
:"deepgram/nova-2",
|
|
146
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
147
|
+
)
|
|
148
|
+
SPEECHMATICS_STANDARD =
|
|
149
|
+
T.let(
|
|
150
|
+
:"speechmatics/standard",
|
|
151
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
152
|
+
)
|
|
153
|
+
SPEECHMATICS_ENHANCED =
|
|
154
|
+
T.let(
|
|
155
|
+
:"speechmatics/enhanced",
|
|
156
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
157
|
+
)
|
|
158
|
+
ASSEMBLYAI_UNIVERSAL_STREAMING =
|
|
159
|
+
T.let(
|
|
160
|
+
:"assemblyai/universal-streaming",
|
|
161
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
162
|
+
)
|
|
163
|
+
XAI_GROK_STT =
|
|
164
|
+
T.let(
|
|
165
|
+
:"xai/grok-stt",
|
|
166
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
167
|
+
)
|
|
168
|
+
AZURE_FAST =
|
|
169
|
+
T.let(
|
|
170
|
+
:"azure/fast",
|
|
171
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
172
|
+
)
|
|
173
|
+
AZURE_REALTIME =
|
|
174
|
+
T.let(
|
|
175
|
+
:"azure/realtime",
|
|
176
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
177
|
+
)
|
|
178
|
+
GOOGLE_LATEST_LONG =
|
|
179
|
+
T.let(
|
|
180
|
+
:"google/latest_long",
|
|
181
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
182
|
+
)
|
|
183
|
+
DISTIL_WHISPER_DISTIL_LARGE_V2 =
|
|
184
|
+
T.let(
|
|
185
|
+
:"distil-whisper/distil-large-v2",
|
|
186
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
187
|
+
)
|
|
188
|
+
OPENAI_WHISPER_LARGE_V3_TURBO =
|
|
189
|
+
T.let(
|
|
190
|
+
:"openai/whisper-large-v3-turbo",
|
|
191
|
+
Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
sig do
|
|
195
|
+
override.returns(
|
|
196
|
+
T::Array[Telnyx::Calls::TranscriptionConfig::Model::TaggedSymbol]
|
|
197
|
+
)
|
|
198
|
+
end
|
|
199
|
+
def self.values
|
|
200
|
+
end
|
|
201
|
+
end
|
|
45
202
|
end
|
|
46
203
|
end
|
|
47
204
|
end
|
|
@@ -21,6 +21,8 @@ module Telnyx
|
|
|
21
21
|
Telnyx::AI::Assistants::ScheduledEventCreateParams::ConversationMetadata::Variants
|
|
22
22
|
],
|
|
23
23
|
dynamic_variables: T::Hash[Symbol, String],
|
|
24
|
+
max_retries_client_errors: Integer,
|
|
25
|
+
retry_interval_secs: Integer,
|
|
24
26
|
text: String,
|
|
25
27
|
request_options: Telnyx::RequestOptions::OrHash
|
|
26
28
|
).returns(Telnyx::AI::Assistants::ScheduledEventResponse::Variants)
|
|
@@ -40,6 +42,10 @@ module Telnyx
|
|
|
40
42
|
# A map of dynamic variable names to values. These variables can be referenced in
|
|
41
43
|
# the assistant's instructions and messages using {{variable_name}} syntax.
|
|
42
44
|
dynamic_variables: nil,
|
|
45
|
+
# Configure number of retries on client errors: busy, no-answer, failed, canceled
|
|
46
|
+
# (caller hung up before the callee answered)
|
|
47
|
+
max_retries_client_errors: nil,
|
|
48
|
+
retry_interval_secs: nil,
|
|
43
49
|
# Required for sms scheduled events. The text to be sent to the end user.
|
|
44
50
|
text: nil,
|
|
45
51
|
request_options: {}
|
|
@@ -11,6 +11,8 @@ module Telnyx
|
|
|
11
11
|
telnyx_end_user_target: String,
|
|
12
12
|
conversation_metadata: ::Hash[Symbol, Telnyx::Models::AI::Assistants::ScheduledEventCreateParams::conversation_metadata],
|
|
13
13
|
dynamic_variables: ::Hash[Symbol, String],
|
|
14
|
+
max_retries_client_errors: Integer,
|
|
15
|
+
retry_interval_secs: Integer,
|
|
14
16
|
text: String
|
|
15
17
|
}
|
|
16
18
|
& Telnyx::Internal::Type::request_parameters
|
|
@@ -41,6 +43,14 @@ module Telnyx
|
|
|
41
43
|
::Hash[Symbol, String]
|
|
42
44
|
) -> ::Hash[Symbol, String]
|
|
43
45
|
|
|
46
|
+
attr_reader max_retries_client_errors: Integer?
|
|
47
|
+
|
|
48
|
+
def max_retries_client_errors=: (Integer) -> Integer
|
|
49
|
+
|
|
50
|
+
attr_reader retry_interval_secs: Integer?
|
|
51
|
+
|
|
52
|
+
def retry_interval_secs=: (Integer) -> Integer
|
|
53
|
+
|
|
44
54
|
attr_reader text: String?
|
|
45
55
|
|
|
46
56
|
def text=: (String) -> String
|
|
@@ -53,6 +63,8 @@ module Telnyx
|
|
|
53
63
|
telnyx_end_user_target: String,
|
|
54
64
|
?conversation_metadata: ::Hash[Symbol, Telnyx::Models::AI::Assistants::ScheduledEventCreateParams::conversation_metadata],
|
|
55
65
|
?dynamic_variables: ::Hash[Symbol, String],
|
|
66
|
+
?max_retries_client_errors: Integer,
|
|
67
|
+
?retry_interval_secs: Integer,
|
|
56
68
|
?text: String,
|
|
57
69
|
?request_options: Telnyx::request_opts
|
|
58
70
|
) -> void
|
|
@@ -65,6 +77,8 @@ module Telnyx
|
|
|
65
77
|
telnyx_end_user_target: String,
|
|
66
78
|
conversation_metadata: ::Hash[Symbol, Telnyx::Models::AI::Assistants::ScheduledEventCreateParams::conversation_metadata],
|
|
67
79
|
dynamic_variables: ::Hash[Symbol, String],
|
|
80
|
+
max_retries_client_errors: Integer,
|
|
81
|
+
retry_interval_secs: Integer,
|
|
68
82
|
text: String,
|
|
69
83
|
request_options: Telnyx::RequestOptions
|
|
70
84
|
}
|
|
@@ -9,13 +9,19 @@ module Telnyx
|
|
|
9
9
|
telnyx_agent_target: String,
|
|
10
10
|
telnyx_conversation_channel: Telnyx::Models::AI::Assistants::conversation_channel_type,
|
|
11
11
|
telnyx_end_user_target: String,
|
|
12
|
+
call_attempts: ::Array[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt],
|
|
13
|
+
call_duration: Integer,
|
|
14
|
+
call_status: String,
|
|
12
15
|
conversation_id: String,
|
|
13
16
|
conversation_metadata: ::Hash[Symbol, Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse::conversation_metadata],
|
|
14
17
|
created_at: Time,
|
|
18
|
+
dispatched_at: Time,
|
|
15
19
|
dynamic_variables: ::Hash[Symbol, String],
|
|
16
20
|
errors: ::Array[String],
|
|
21
|
+
max_retries_client_errors: Integer,
|
|
17
22
|
retry_attempts: Integer,
|
|
18
23
|
retry_count: Integer,
|
|
24
|
+
retry_interval_secs: Integer,
|
|
19
25
|
scheduled_event_id: String,
|
|
20
26
|
status: Telnyx::Models::AI::Assistants::event_status
|
|
21
27
|
}
|
|
@@ -31,6 +37,20 @@ module Telnyx
|
|
|
31
37
|
|
|
32
38
|
attr_accessor telnyx_end_user_target: String
|
|
33
39
|
|
|
40
|
+
attr_reader call_attempts: ::Array[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt]?
|
|
41
|
+
|
|
42
|
+
def call_attempts=: (
|
|
43
|
+
::Array[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt]
|
|
44
|
+
) -> ::Array[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt]
|
|
45
|
+
|
|
46
|
+
attr_reader call_duration: Integer?
|
|
47
|
+
|
|
48
|
+
def call_duration=: (Integer) -> Integer
|
|
49
|
+
|
|
50
|
+
attr_reader call_status: String?
|
|
51
|
+
|
|
52
|
+
def call_status=: (String) -> String
|
|
53
|
+
|
|
34
54
|
attr_reader conversation_id: String?
|
|
35
55
|
|
|
36
56
|
def conversation_id=: (String) -> String
|
|
@@ -45,6 +65,10 @@ module Telnyx
|
|
|
45
65
|
|
|
46
66
|
def created_at=: (Time) -> Time
|
|
47
67
|
|
|
68
|
+
attr_reader dispatched_at: Time?
|
|
69
|
+
|
|
70
|
+
def dispatched_at=: (Time) -> Time
|
|
71
|
+
|
|
48
72
|
attr_reader dynamic_variables: ::Hash[Symbol, String]?
|
|
49
73
|
|
|
50
74
|
def dynamic_variables=: (
|
|
@@ -55,6 +79,10 @@ module Telnyx
|
|
|
55
79
|
|
|
56
80
|
def errors=: (::Array[String]) -> ::Array[String]
|
|
57
81
|
|
|
82
|
+
attr_reader max_retries_client_errors: Integer?
|
|
83
|
+
|
|
84
|
+
def max_retries_client_errors=: (Integer) -> Integer
|
|
85
|
+
|
|
58
86
|
attr_reader retry_attempts: Integer?
|
|
59
87
|
|
|
60
88
|
def retry_attempts=: (Integer) -> Integer
|
|
@@ -63,6 +91,10 @@ module Telnyx
|
|
|
63
91
|
|
|
64
92
|
def retry_count=: (Integer) -> Integer
|
|
65
93
|
|
|
94
|
+
attr_reader retry_interval_secs: Integer?
|
|
95
|
+
|
|
96
|
+
def retry_interval_secs=: (Integer) -> Integer
|
|
97
|
+
|
|
66
98
|
attr_reader scheduled_event_id: String?
|
|
67
99
|
|
|
68
100
|
def scheduled_event_id=: (String) -> String
|
|
@@ -79,13 +111,19 @@ module Telnyx
|
|
|
79
111
|
telnyx_agent_target: String,
|
|
80
112
|
telnyx_conversation_channel: Telnyx::Models::AI::Assistants::conversation_channel_type,
|
|
81
113
|
telnyx_end_user_target: String,
|
|
114
|
+
?call_attempts: ::Array[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt],
|
|
115
|
+
?call_duration: Integer,
|
|
116
|
+
?call_status: String,
|
|
82
117
|
?conversation_id: String,
|
|
83
118
|
?conversation_metadata: ::Hash[Symbol, Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse::conversation_metadata],
|
|
84
119
|
?created_at: Time,
|
|
120
|
+
?dispatched_at: Time,
|
|
85
121
|
?dynamic_variables: ::Hash[Symbol, String],
|
|
86
122
|
?errors: ::Array[String],
|
|
123
|
+
?max_retries_client_errors: Integer,
|
|
87
124
|
?retry_attempts: Integer,
|
|
88
125
|
?retry_count: Integer,
|
|
126
|
+
?retry_interval_secs: Integer,
|
|
89
127
|
?scheduled_event_id: String,
|
|
90
128
|
?status: Telnyx::Models::AI::Assistants::event_status
|
|
91
129
|
) -> void
|
|
@@ -96,17 +134,64 @@ module Telnyx
|
|
|
96
134
|
telnyx_agent_target: String,
|
|
97
135
|
telnyx_conversation_channel: Telnyx::Models::AI::Assistants::conversation_channel_type,
|
|
98
136
|
telnyx_end_user_target: String,
|
|
137
|
+
call_attempts: ::Array[Telnyx::AI::Assistants::ScheduledPhoneCallEventResponse::CallAttempt],
|
|
138
|
+
call_duration: Integer,
|
|
139
|
+
call_status: String,
|
|
99
140
|
conversation_id: String,
|
|
100
141
|
conversation_metadata: ::Hash[Symbol, Telnyx::Models::AI::Assistants::ScheduledPhoneCallEventResponse::conversation_metadata],
|
|
101
142
|
created_at: Time,
|
|
143
|
+
dispatched_at: Time,
|
|
102
144
|
dynamic_variables: ::Hash[Symbol, String],
|
|
103
145
|
errors: ::Array[String],
|
|
146
|
+
max_retries_client_errors: Integer,
|
|
104
147
|
retry_attempts: Integer,
|
|
105
148
|
retry_count: Integer,
|
|
149
|
+
retry_interval_secs: Integer,
|
|
106
150
|
scheduled_event_id: String,
|
|
107
151
|
status: Telnyx::Models::AI::Assistants::event_status
|
|
108
152
|
}
|
|
109
153
|
|
|
154
|
+
type call_attempt =
|
|
155
|
+
{
|
|
156
|
+
attempt_number: Integer,
|
|
157
|
+
attempted_at: Time,
|
|
158
|
+
call_status: String,
|
|
159
|
+
call_duration: Integer,
|
|
160
|
+
telnyx_call_control_id: String
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
class CallAttempt < Telnyx::Internal::Type::BaseModel
|
|
164
|
+
attr_accessor attempt_number: Integer
|
|
165
|
+
|
|
166
|
+
attr_accessor attempted_at: Time
|
|
167
|
+
|
|
168
|
+
attr_accessor call_status: String
|
|
169
|
+
|
|
170
|
+
attr_reader call_duration: Integer?
|
|
171
|
+
|
|
172
|
+
def call_duration=: (Integer) -> Integer
|
|
173
|
+
|
|
174
|
+
attr_reader telnyx_call_control_id: String?
|
|
175
|
+
|
|
176
|
+
def telnyx_call_control_id=: (String) -> String
|
|
177
|
+
|
|
178
|
+
def initialize: (
|
|
179
|
+
attempt_number: Integer,
|
|
180
|
+
attempted_at: Time,
|
|
181
|
+
call_status: String,
|
|
182
|
+
?call_duration: Integer,
|
|
183
|
+
?telnyx_call_control_id: String
|
|
184
|
+
) -> void
|
|
185
|
+
|
|
186
|
+
def to_hash: -> {
|
|
187
|
+
attempt_number: Integer,
|
|
188
|
+
attempted_at: Time,
|
|
189
|
+
call_status: String,
|
|
190
|
+
call_duration: Integer,
|
|
191
|
+
telnyx_call_control_id: String
|
|
192
|
+
}
|
|
193
|
+
end
|
|
194
|
+
|
|
110
195
|
type conversation_metadata = String | Integer | bool
|
|
111
196
|
|
|
112
197
|
module ConversationMetadata
|
|
@@ -1,16 +1,67 @@
|
|
|
1
1
|
module Telnyx
|
|
2
2
|
module Models
|
|
3
3
|
module Calls
|
|
4
|
-
type transcription_config =
|
|
4
|
+
type transcription_config =
|
|
5
|
+
{
|
|
6
|
+
language: String,
|
|
7
|
+
model: Telnyx::Models::Calls::TranscriptionConfig::model
|
|
8
|
+
}
|
|
5
9
|
|
|
6
10
|
class TranscriptionConfig < Telnyx::Internal::Type::BaseModel
|
|
7
|
-
attr_reader
|
|
11
|
+
attr_reader language: String?
|
|
8
12
|
|
|
9
|
-
def
|
|
13
|
+
def language=: (String) -> String
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
attr_reader model: Telnyx::Models::Calls::TranscriptionConfig::model?
|
|
12
16
|
|
|
13
|
-
def
|
|
17
|
+
def model=: (
|
|
18
|
+
Telnyx::Models::Calls::TranscriptionConfig::model
|
|
19
|
+
) -> Telnyx::Models::Calls::TranscriptionConfig::model
|
|
20
|
+
|
|
21
|
+
def initialize: (
|
|
22
|
+
?language: String,
|
|
23
|
+
?model: Telnyx::Models::Calls::TranscriptionConfig::model
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
language: String,
|
|
28
|
+
model: Telnyx::Models::Calls::TranscriptionConfig::model
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type model =
|
|
32
|
+
:"deepgram/flux"
|
|
33
|
+
| :flux
|
|
34
|
+
| :"deepgram/nova-3"
|
|
35
|
+
| :"deepgram/nova-2"
|
|
36
|
+
| :"speechmatics/standard"
|
|
37
|
+
| :"speechmatics/enhanced"
|
|
38
|
+
| :"assemblyai/universal-streaming"
|
|
39
|
+
| :"xai/grok-stt"
|
|
40
|
+
| :"azure/fast"
|
|
41
|
+
| :"azure/realtime"
|
|
42
|
+
| :"google/latest_long"
|
|
43
|
+
| :"distil-whisper/distil-large-v2"
|
|
44
|
+
| :"openai/whisper-large-v3-turbo"
|
|
45
|
+
|
|
46
|
+
module Model
|
|
47
|
+
extend Telnyx::Internal::Type::Enum
|
|
48
|
+
|
|
49
|
+
DEEPGRAM_FLUX: :"deepgram/flux"
|
|
50
|
+
FLUX: :flux
|
|
51
|
+
DEEPGRAM_NOVA_3: :"deepgram/nova-3"
|
|
52
|
+
DEEPGRAM_NOVA_2: :"deepgram/nova-2"
|
|
53
|
+
SPEECHMATICS_STANDARD: :"speechmatics/standard"
|
|
54
|
+
SPEECHMATICS_ENHANCED: :"speechmatics/enhanced"
|
|
55
|
+
ASSEMBLYAI_UNIVERSAL_STREAMING: :"assemblyai/universal-streaming"
|
|
56
|
+
XAI_GROK_STT: :"xai/grok-stt"
|
|
57
|
+
AZURE_FAST: :"azure/fast"
|
|
58
|
+
AZURE_REALTIME: :"azure/realtime"
|
|
59
|
+
GOOGLE_LATEST_LONG: :"google/latest_long"
|
|
60
|
+
DISTIL_WHISPER_DISTIL_LARGE_V2: :"distil-whisper/distil-large-v2"
|
|
61
|
+
OPENAI_WHISPER_LARGE_V3_TURBO: :"openai/whisper-large-v3-turbo"
|
|
62
|
+
|
|
63
|
+
def self?.values: -> ::Array[Telnyx::Models::Calls::TranscriptionConfig::model]
|
|
64
|
+
end
|
|
14
65
|
end
|
|
15
66
|
end
|
|
16
67
|
end
|
|
@@ -11,6 +11,8 @@ module Telnyx
|
|
|
11
11
|
telnyx_end_user_target: String,
|
|
12
12
|
?conversation_metadata: ::Hash[Symbol, Telnyx::Models::AI::Assistants::ScheduledEventCreateParams::conversation_metadata],
|
|
13
13
|
?dynamic_variables: ::Hash[Symbol, String],
|
|
14
|
+
?max_retries_client_errors: Integer,
|
|
15
|
+
?retry_interval_secs: Integer,
|
|
14
16
|
?text: String,
|
|
15
17
|
?request_options: Telnyx::request_opts
|
|
16
18
|
) -> Telnyx::Models::AI::Assistants::scheduled_event_response
|