zavudev 0.18.0 → 0.20.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 +37 -0
- data/README.md +1 -1
- data/lib/zavudev/models/channel.rb +1 -5
- data/lib/zavudev/models/function_create_params.rb +36 -4
- data/lib/zavudev/models/function_create_response.rb +4 -2
- data/lib/zavudev/models/function_deploy_params.rb +31 -3
- data/lib/zavudev/models/function_deploy_response.rb +20 -3
- data/lib/zavudev/models/function_get_deployment_response.rb +20 -3
- data/lib/zavudev/models/function_retrieve_response.rb +4 -2
- data/lib/zavudev/models/function_update_params.rb +41 -3
- data/lib/zavudev/models/function_update_response.rb +4 -2
- data/lib/zavudev/models/invitation.rb +101 -9
- data/lib/zavudev/models/invitation_create_params.rb +34 -13
- data/lib/zavudev/models/invitation_list_params.rb +14 -0
- data/lib/zavudev/models/message.rb +28 -6
- data/lib/zavudev/models/message_send_params.rb +2 -5
- data/lib/zavudev/models/message_type.rb +16 -0
- data/lib/zavudev/models/phone_number_pricing.rb +7 -2
- data/lib/zavudev/models/phone_number_search_available_params.rb +13 -1
- data/lib/zavudev/models/sender.rb +12 -1
- data/lib/zavudev/models/sender_create_params.rb +72 -4
- data/lib/zavudev/models/sender_update_params.rb +65 -1
- data/lib/zavudev/models/sender_webhook.rb +47 -1
- data/lib/zavudev/models/senders/agent/agent_tool.rb +19 -1
- data/lib/zavudev/models/senders/agent/tool_create_params.rb +7 -2
- data/lib/zavudev/models/senders/agent/tool_test_response.rb +90 -5
- data/lib/zavudev/models/senders/agent.rb +198 -1
- data/lib/zavudev/models/senders/agent_create_params.rb +188 -1
- data/lib/zavudev/models/senders/agent_execution.rb +26 -1
- data/lib/zavudev/models/senders/agent_update_params.rb +188 -1
- data/lib/zavudev/models/template.rb +1 -0
- data/lib/zavudev/models/template_create_params.rb +19 -9
- data/lib/zavudev/models/webhook_event.rb +51 -19
- data/lib/zavudev/resources/broadcasts.rb +20 -4
- data/lib/zavudev/resources/functions.rb +35 -10
- data/lib/zavudev/resources/invitations.rb +18 -12
- data/lib/zavudev/resources/messages.rb +24 -4
- data/lib/zavudev/resources/number_10dlc/brands.rb +5 -1
- data/lib/zavudev/resources/number_10dlc/campaigns.rb +6 -1
- data/lib/zavudev/resources/phone_numbers.rb +12 -3
- data/lib/zavudev/resources/senders/agent/executions.rb +5 -0
- data/lib/zavudev/resources/senders/agent/tools.rb +14 -2
- data/lib/zavudev/resources/senders/agent.rb +18 -2
- data/lib/zavudev/resources/senders.rb +15 -3
- data/lib/zavudev/version.rb +1 -1
- data/rbi/zavudev/models/channel.rbi +1 -5
- data/rbi/zavudev/models/function_create_params.rbi +50 -2
- data/rbi/zavudev/models/function_create_response.rbi +6 -2
- data/rbi/zavudev/models/function_deploy_params.rbi +42 -2
- data/rbi/zavudev/models/function_deploy_response.rbi +20 -0
- data/rbi/zavudev/models/function_get_deployment_response.rbi +20 -0
- data/rbi/zavudev/models/function_retrieve_response.rbi +6 -2
- data/rbi/zavudev/models/function_update_params.rbi +57 -2
- data/rbi/zavudev/models/function_update_response.rbi +6 -2
- data/rbi/zavudev/models/invitation.rbi +162 -13
- data/rbi/zavudev/models/invitation_create_params.rbi +51 -18
- data/rbi/zavudev/models/invitation_list_params.rbi +17 -0
- data/rbi/zavudev/models/message.rbi +47 -8
- data/rbi/zavudev/models/message_send_params.rbi +4 -10
- data/rbi/zavudev/models/message_type.rbi +18 -0
- data/rbi/zavudev/models/phone_number_pricing.rbi +6 -2
- data/rbi/zavudev/models/phone_number_search_available_params.rbi +13 -0
- data/rbi/zavudev/models/sender.rbi +17 -0
- data/rbi/zavudev/models/sender_create_params.rbi +136 -4
- data/rbi/zavudev/models/sender_update_params.rbi +124 -0
- data/rbi/zavudev/models/sender_webhook.rbi +69 -0
- data/rbi/zavudev/models/senders/agent/agent_tool.rbi +26 -3
- data/rbi/zavudev/models/senders/agent/tool_create_params.rbi +6 -2
- data/rbi/zavudev/models/senders/agent/tool_test_response.rbi +130 -5
- data/rbi/zavudev/models/senders/agent.rbi +320 -3
- data/rbi/zavudev/models/senders/agent_create_params.rbi +304 -0
- data/rbi/zavudev/models/senders/agent_execution.rbi +31 -3
- data/rbi/zavudev/models/senders/agent_update_params.rbi +304 -0
- data/rbi/zavudev/models/template.rbi +5 -0
- data/rbi/zavudev/models/template_create_params.rbi +27 -6
- data/rbi/zavudev/models/webhook_event.rbi +55 -20
- data/rbi/zavudev/resources/broadcasts.rbi +20 -4
- data/rbi/zavudev/resources/functions.rbi +62 -6
- data/rbi/zavudev/resources/invitations.rbi +36 -16
- data/rbi/zavudev/resources/messages.rbi +27 -10
- data/rbi/zavudev/resources/number_10dlc/brands.rbi +5 -1
- data/rbi/zavudev/resources/number_10dlc/campaigns.rbi +6 -1
- data/rbi/zavudev/resources/phone_numbers.rbi +10 -2
- data/rbi/zavudev/resources/senders/agent/executions.rbi +5 -0
- data/rbi/zavudev/resources/senders/agent/tools.rbi +13 -2
- data/rbi/zavudev/resources/senders/agent.rbi +16 -0
- data/rbi/zavudev/resources/senders.rbi +56 -2
- data/sig/zavudev/models/channel.rbs +0 -2
- data/sig/zavudev/models/function_create_params.rbs +14 -0
- data/sig/zavudev/models/function_deploy_params.rbs +14 -0
- data/sig/zavudev/models/function_deploy_response.rbs +5 -0
- data/sig/zavudev/models/function_get_deployment_response.rbs +5 -0
- data/sig/zavudev/models/function_update_params.rbs +21 -0
- data/sig/zavudev/models/invitation.rbs +58 -3
- data/sig/zavudev/models/invitation_create_params.rbs +2 -2
- data/sig/zavudev/models/invitation_list_params.rbs +3 -1
- data/sig/zavudev/models/message.rbs +7 -0
- data/sig/zavudev/models/message_type.rbs +4 -0
- data/sig/zavudev/models/phone_number_search_available_params.rbs +7 -0
- data/sig/zavudev/models/sender.rbs +7 -0
- data/sig/zavudev/models/sender_create_params.rbs +35 -0
- data/sig/zavudev/models/sender_update_params.rbs +35 -0
- data/sig/zavudev/models/sender_webhook.rbs +17 -0
- data/sig/zavudev/models/senders/agent/agent_tool.rbs +10 -3
- data/sig/zavudev/models/senders/agent/tool_test_response.rbs +68 -4
- data/sig/zavudev/models/senders/agent.rbs +161 -3
- data/sig/zavudev/models/senders/agent_create_params.rbs +152 -1
- data/sig/zavudev/models/senders/agent_execution.rbs +13 -3
- data/sig/zavudev/models/senders/agent_update_params.rbs +152 -1
- data/sig/zavudev/models/template.rbs +2 -1
- data/sig/zavudev/models/template_create_params.rbs +9 -6
- data/sig/zavudev/models/webhook_event.rbs +10 -2
- data/sig/zavudev/resources/functions.rbs +7 -0
- data/sig/zavudev/resources/phone_numbers.rbs +1 -0
- data/sig/zavudev/resources/senders/agent.rbs +2 -0
- data/sig/zavudev/resources/senders.rbs +6 -0
- metadata +2 -2
|
@@ -74,6 +74,17 @@ module Zavudev
|
|
|
74
74
|
sig { params(trigger_on_message_types: T::Array[String]).void }
|
|
75
75
|
attr_writer :trigger_on_message_types
|
|
76
76
|
|
|
77
|
+
# Voice Agent configuration. Enable this to let the agent answer and place phone
|
|
78
|
+
# calls with Zavu's managed voice pipeline. Requires the Voice Agents feature to
|
|
79
|
+
# be enabled for your team.
|
|
80
|
+
sig { returns(T.nilable(Zavudev::Senders::AgentCreateParams::Voice)) }
|
|
81
|
+
attr_reader :voice
|
|
82
|
+
|
|
83
|
+
sig do
|
|
84
|
+
params(voice: Zavudev::Senders::AgentCreateParams::Voice::OrHash).void
|
|
85
|
+
end
|
|
86
|
+
attr_writer :voice
|
|
87
|
+
|
|
77
88
|
sig do
|
|
78
89
|
params(
|
|
79
90
|
sender_id: String,
|
|
@@ -88,6 +99,7 @@ module Zavudev
|
|
|
88
99
|
temperature: Float,
|
|
89
100
|
trigger_on_channels: T::Array[String],
|
|
90
101
|
trigger_on_message_types: T::Array[String],
|
|
102
|
+
voice: Zavudev::Senders::AgentCreateParams::Voice::OrHash,
|
|
91
103
|
request_options: Zavudev::RequestOptions::OrHash
|
|
92
104
|
).returns(T.attached_class)
|
|
93
105
|
end
|
|
@@ -106,6 +118,10 @@ module Zavudev
|
|
|
106
118
|
temperature: nil,
|
|
107
119
|
trigger_on_channels: nil,
|
|
108
120
|
trigger_on_message_types: nil,
|
|
121
|
+
# Voice Agent configuration. Enable this to let the agent answer and place phone
|
|
122
|
+
# calls with Zavu's managed voice pipeline. Requires the Voice Agents feature to
|
|
123
|
+
# be enabled for your team.
|
|
124
|
+
voice: nil,
|
|
109
125
|
request_options: {}
|
|
110
126
|
)
|
|
111
127
|
end
|
|
@@ -125,12 +141,300 @@ module Zavudev
|
|
|
125
141
|
temperature: Float,
|
|
126
142
|
trigger_on_channels: T::Array[String],
|
|
127
143
|
trigger_on_message_types: T::Array[String],
|
|
144
|
+
voice: Zavudev::Senders::AgentCreateParams::Voice,
|
|
128
145
|
request_options: Zavudev::RequestOptions
|
|
129
146
|
}
|
|
130
147
|
)
|
|
131
148
|
end
|
|
132
149
|
def to_hash
|
|
133
150
|
end
|
|
151
|
+
|
|
152
|
+
class Voice < Zavudev::Internal::Type::BaseModel
|
|
153
|
+
OrHash =
|
|
154
|
+
T.type_alias do
|
|
155
|
+
T.any(
|
|
156
|
+
Zavudev::Senders::AgentCreateParams::Voice,
|
|
157
|
+
Zavudev::Internal::AnyHash
|
|
158
|
+
)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Whether the agent handles voice calls. When false, the sender's number is not
|
|
162
|
+
# answered by the voice agent and outbound calls are rejected.
|
|
163
|
+
sig { returns(T::Boolean) }
|
|
164
|
+
attr_accessor :enabled
|
|
165
|
+
|
|
166
|
+
# Opening line the agent speaks when the call connects. If omitted, the agent
|
|
167
|
+
# waits for the caller to speak first.
|
|
168
|
+
sig { returns(T.nilable(String)) }
|
|
169
|
+
attr_reader :greeting
|
|
170
|
+
|
|
171
|
+
sig { params(greeting: String).void }
|
|
172
|
+
attr_writer :greeting
|
|
173
|
+
|
|
174
|
+
# Greeting per language, keyed by language code. Used when the caller's language
|
|
175
|
+
# differs from the one `greeting` is written in.
|
|
176
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
177
|
+
attr_reader :greetings
|
|
178
|
+
|
|
179
|
+
sig { params(greetings: T::Hash[Symbol, String]).void }
|
|
180
|
+
attr_writer :greetings
|
|
181
|
+
|
|
182
|
+
# Whether the caller can interrupt the agent while it is speaking (barge-in). When
|
|
183
|
+
# true, the agent stops talking as soon as the caller starts.
|
|
184
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
185
|
+
attr_reader :interruptible
|
|
186
|
+
|
|
187
|
+
sig { params(interruptible: T::Boolean).void }
|
|
188
|
+
attr_writer :interruptible
|
|
189
|
+
|
|
190
|
+
# BCP-47 language code used for both speech recognition and speech synthesis (e.g.
|
|
191
|
+
# `en`, `es`, `pt-BR`). Auto-detected from the recipient when omitted.
|
|
192
|
+
sig { returns(T.nilable(String)) }
|
|
193
|
+
attr_reader :language
|
|
194
|
+
|
|
195
|
+
sig { params(language: String).void }
|
|
196
|
+
attr_writer :language
|
|
197
|
+
|
|
198
|
+
# Hard limit on call length in minutes. The call ends automatically when reached.
|
|
199
|
+
sig { returns(T.nilable(Integer)) }
|
|
200
|
+
attr_reader :max_call_duration_minutes
|
|
201
|
+
|
|
202
|
+
sig { params(max_call_duration_minutes: Integer).void }
|
|
203
|
+
attr_writer :max_call_duration_minutes
|
|
204
|
+
|
|
205
|
+
# How long the agent waits during silence before ending the call.
|
|
206
|
+
sig { returns(T.nilable(Integer)) }
|
|
207
|
+
attr_reader :max_idle_seconds
|
|
208
|
+
|
|
209
|
+
sig { params(max_idle_seconds: Integer).void }
|
|
210
|
+
attr_writer :max_idle_seconds
|
|
211
|
+
|
|
212
|
+
# Model that runs the conversation, co-located in the voice network for lowest
|
|
213
|
+
# latency. Independent of the model used for text messaging. Derived from the
|
|
214
|
+
# agent's text model when omitted.
|
|
215
|
+
sig { returns(T.nilable(String)) }
|
|
216
|
+
attr_reader :model
|
|
217
|
+
|
|
218
|
+
sig { params(model: String).void }
|
|
219
|
+
attr_writer :model
|
|
220
|
+
|
|
221
|
+
# Whether the call audio is recorded.
|
|
222
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
223
|
+
attr_reader :record_calls
|
|
224
|
+
|
|
225
|
+
sig { params(record_calls: T::Boolean).void }
|
|
226
|
+
attr_writer :record_calls
|
|
227
|
+
|
|
228
|
+
# Speech-recognition model. Uses the default when omitted.
|
|
229
|
+
sig { returns(T.nilable(String)) }
|
|
230
|
+
attr_reader :stt_model
|
|
231
|
+
|
|
232
|
+
sig { params(stt_model: String).void }
|
|
233
|
+
attr_writer :stt_model
|
|
234
|
+
|
|
235
|
+
# Speech-recognition provider. Uses the default when omitted.
|
|
236
|
+
sig { returns(T.nilable(String)) }
|
|
237
|
+
attr_reader :stt_provider
|
|
238
|
+
|
|
239
|
+
sig { params(stt_provider: String).void }
|
|
240
|
+
attr_writer :stt_provider
|
|
241
|
+
|
|
242
|
+
# E.164 phone number the agent can transfer the call to. When set, the agent is
|
|
243
|
+
# given a transfer tool it can use to hand the call to a human.
|
|
244
|
+
sig { returns(T.nilable(String)) }
|
|
245
|
+
attr_reader :transfer_phone_number
|
|
246
|
+
|
|
247
|
+
sig { params(transfer_phone_number: String).void }
|
|
248
|
+
attr_writer :transfer_phone_number
|
|
249
|
+
|
|
250
|
+
# Speech-synthesis provider. Uses the default when omitted.
|
|
251
|
+
sig { returns(T.nilable(String)) }
|
|
252
|
+
attr_reader :tts_provider
|
|
253
|
+
|
|
254
|
+
sig { params(tts_provider: String).void }
|
|
255
|
+
attr_writer :tts_provider
|
|
256
|
+
|
|
257
|
+
# Identifier of the synthesized voice that speaks. Choose from the voices
|
|
258
|
+
# available in the dashboard. Uses a neutral default when omitted.
|
|
259
|
+
sig { returns(T.nilable(String)) }
|
|
260
|
+
attr_reader :tts_voice_id
|
|
261
|
+
|
|
262
|
+
sig { params(tts_voice_id: String).void }
|
|
263
|
+
attr_writer :tts_voice_id
|
|
264
|
+
|
|
265
|
+
# What the agent does when an answering machine or voicemail is detected on an
|
|
266
|
+
# outbound call.
|
|
267
|
+
sig do
|
|
268
|
+
returns(
|
|
269
|
+
T.nilable(
|
|
270
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction::OrSymbol
|
|
271
|
+
)
|
|
272
|
+
)
|
|
273
|
+
end
|
|
274
|
+
attr_reader :voicemail_action
|
|
275
|
+
|
|
276
|
+
sig do
|
|
277
|
+
params(
|
|
278
|
+
voicemail_action:
|
|
279
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction::OrSymbol
|
|
280
|
+
).void
|
|
281
|
+
end
|
|
282
|
+
attr_writer :voicemail_action
|
|
283
|
+
|
|
284
|
+
# Message spoken when `voicemailAction` is `leave_message`. Falls back to
|
|
285
|
+
# `greeting` when omitted.
|
|
286
|
+
sig { returns(T.nilable(String)) }
|
|
287
|
+
attr_reader :voicemail_message
|
|
288
|
+
|
|
289
|
+
sig { params(voicemail_message: String).void }
|
|
290
|
+
attr_writer :voicemail_message
|
|
291
|
+
|
|
292
|
+
# Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
|
|
293
|
+
# ignored by the others.
|
|
294
|
+
sig { returns(T.nilable(Float)) }
|
|
295
|
+
attr_reader :voice_speed
|
|
296
|
+
|
|
297
|
+
sig { params(voice_speed: Float).void }
|
|
298
|
+
attr_writer :voice_speed
|
|
299
|
+
|
|
300
|
+
# Voice Agent configuration. Enable this to let the agent answer and place phone
|
|
301
|
+
# calls with Zavu's managed voice pipeline. Requires the Voice Agents feature to
|
|
302
|
+
# be enabled for your team.
|
|
303
|
+
sig do
|
|
304
|
+
params(
|
|
305
|
+
enabled: T::Boolean,
|
|
306
|
+
greeting: String,
|
|
307
|
+
greetings: T::Hash[Symbol, String],
|
|
308
|
+
interruptible: T::Boolean,
|
|
309
|
+
language: String,
|
|
310
|
+
max_call_duration_minutes: Integer,
|
|
311
|
+
max_idle_seconds: Integer,
|
|
312
|
+
model: String,
|
|
313
|
+
record_calls: T::Boolean,
|
|
314
|
+
stt_model: String,
|
|
315
|
+
stt_provider: String,
|
|
316
|
+
transfer_phone_number: String,
|
|
317
|
+
tts_provider: String,
|
|
318
|
+
tts_voice_id: String,
|
|
319
|
+
voicemail_action:
|
|
320
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction::OrSymbol,
|
|
321
|
+
voicemail_message: String,
|
|
322
|
+
voice_speed: Float
|
|
323
|
+
).returns(T.attached_class)
|
|
324
|
+
end
|
|
325
|
+
def self.new(
|
|
326
|
+
# Whether the agent handles voice calls. When false, the sender's number is not
|
|
327
|
+
# answered by the voice agent and outbound calls are rejected.
|
|
328
|
+
enabled:,
|
|
329
|
+
# Opening line the agent speaks when the call connects. If omitted, the agent
|
|
330
|
+
# waits for the caller to speak first.
|
|
331
|
+
greeting: nil,
|
|
332
|
+
# Greeting per language, keyed by language code. Used when the caller's language
|
|
333
|
+
# differs from the one `greeting` is written in.
|
|
334
|
+
greetings: nil,
|
|
335
|
+
# Whether the caller can interrupt the agent while it is speaking (barge-in). When
|
|
336
|
+
# true, the agent stops talking as soon as the caller starts.
|
|
337
|
+
interruptible: nil,
|
|
338
|
+
# BCP-47 language code used for both speech recognition and speech synthesis (e.g.
|
|
339
|
+
# `en`, `es`, `pt-BR`). Auto-detected from the recipient when omitted.
|
|
340
|
+
language: nil,
|
|
341
|
+
# Hard limit on call length in minutes. The call ends automatically when reached.
|
|
342
|
+
max_call_duration_minutes: nil,
|
|
343
|
+
# How long the agent waits during silence before ending the call.
|
|
344
|
+
max_idle_seconds: nil,
|
|
345
|
+
# Model that runs the conversation, co-located in the voice network for lowest
|
|
346
|
+
# latency. Independent of the model used for text messaging. Derived from the
|
|
347
|
+
# agent's text model when omitted.
|
|
348
|
+
model: nil,
|
|
349
|
+
# Whether the call audio is recorded.
|
|
350
|
+
record_calls: nil,
|
|
351
|
+
# Speech-recognition model. Uses the default when omitted.
|
|
352
|
+
stt_model: nil,
|
|
353
|
+
# Speech-recognition provider. Uses the default when omitted.
|
|
354
|
+
stt_provider: nil,
|
|
355
|
+
# E.164 phone number the agent can transfer the call to. When set, the agent is
|
|
356
|
+
# given a transfer tool it can use to hand the call to a human.
|
|
357
|
+
transfer_phone_number: nil,
|
|
358
|
+
# Speech-synthesis provider. Uses the default when omitted.
|
|
359
|
+
tts_provider: nil,
|
|
360
|
+
# Identifier of the synthesized voice that speaks. Choose from the voices
|
|
361
|
+
# available in the dashboard. Uses a neutral default when omitted.
|
|
362
|
+
tts_voice_id: nil,
|
|
363
|
+
# What the agent does when an answering machine or voicemail is detected on an
|
|
364
|
+
# outbound call.
|
|
365
|
+
voicemail_action: nil,
|
|
366
|
+
# Message spoken when `voicemailAction` is `leave_message`. Falls back to
|
|
367
|
+
# `greeting` when omitted.
|
|
368
|
+
voicemail_message: nil,
|
|
369
|
+
# Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
|
|
370
|
+
# ignored by the others.
|
|
371
|
+
voice_speed: nil
|
|
372
|
+
)
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
sig do
|
|
376
|
+
override.returns(
|
|
377
|
+
{
|
|
378
|
+
enabled: T::Boolean,
|
|
379
|
+
greeting: String,
|
|
380
|
+
greetings: T::Hash[Symbol, String],
|
|
381
|
+
interruptible: T::Boolean,
|
|
382
|
+
language: String,
|
|
383
|
+
max_call_duration_minutes: Integer,
|
|
384
|
+
max_idle_seconds: Integer,
|
|
385
|
+
model: String,
|
|
386
|
+
record_calls: T::Boolean,
|
|
387
|
+
stt_model: String,
|
|
388
|
+
stt_provider: String,
|
|
389
|
+
transfer_phone_number: String,
|
|
390
|
+
tts_provider: String,
|
|
391
|
+
tts_voice_id: String,
|
|
392
|
+
voicemail_action:
|
|
393
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction::OrSymbol,
|
|
394
|
+
voicemail_message: String,
|
|
395
|
+
voice_speed: Float
|
|
396
|
+
}
|
|
397
|
+
)
|
|
398
|
+
end
|
|
399
|
+
def to_hash
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# What the agent does when an answering machine or voicemail is detected on an
|
|
403
|
+
# outbound call.
|
|
404
|
+
module VoicemailAction
|
|
405
|
+
extend Zavudev::Internal::Type::Enum
|
|
406
|
+
|
|
407
|
+
TaggedSymbol =
|
|
408
|
+
T.type_alias do
|
|
409
|
+
T.all(
|
|
410
|
+
Symbol,
|
|
411
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction
|
|
412
|
+
)
|
|
413
|
+
end
|
|
414
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
415
|
+
|
|
416
|
+
HANGUP =
|
|
417
|
+
T.let(
|
|
418
|
+
:hangup,
|
|
419
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction::TaggedSymbol
|
|
420
|
+
)
|
|
421
|
+
LEAVE_MESSAGE =
|
|
422
|
+
T.let(
|
|
423
|
+
:leave_message,
|
|
424
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction::TaggedSymbol
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
sig do
|
|
428
|
+
override.returns(
|
|
429
|
+
T::Array[
|
|
430
|
+
Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction::TaggedSymbol
|
|
431
|
+
]
|
|
432
|
+
)
|
|
433
|
+
end
|
|
434
|
+
def self.values
|
|
435
|
+
end
|
|
436
|
+
end
|
|
437
|
+
end
|
|
134
438
|
end
|
|
135
439
|
end
|
|
136
440
|
end
|
|
@@ -44,12 +44,26 @@ module Zavudev
|
|
|
44
44
|
sig { params(inbound_message_id: String).void }
|
|
45
45
|
attr_writer :inbound_message_id
|
|
46
46
|
|
|
47
|
+
# Knowledge-base chunks retrieved for this answer. Zero on an agent that has
|
|
48
|
+
# documents attached means the reply was not grounded in them, which is otherwise
|
|
49
|
+
# indistinguishable from a correct answer in this record. Absent on executions
|
|
50
|
+
# recorded before this field existed, which is not the same as zero.
|
|
51
|
+
sig { returns(T.nilable(Integer)) }
|
|
52
|
+
attr_accessor :knowledge_chunks_used
|
|
53
|
+
|
|
47
54
|
sig { returns(T.nilable(String)) }
|
|
48
55
|
attr_accessor :response_message_id
|
|
49
56
|
|
|
50
57
|
sig { returns(T.nilable(String)) }
|
|
51
58
|
attr_accessor :response_text
|
|
52
59
|
|
|
60
|
+
# Tools the agent called while producing this reply. Zero on an agent that has
|
|
61
|
+
# tools configured means it answered without calling any — the case where a reply
|
|
62
|
+
# says it will look something up and nothing ever reaches your endpoint. Absent on
|
|
63
|
+
# executions recorded before this field existed, which is not the same as zero.
|
|
64
|
+
sig { returns(T.nilable(Integer)) }
|
|
65
|
+
attr_accessor :tool_calls
|
|
66
|
+
|
|
53
67
|
sig do
|
|
54
68
|
params(
|
|
55
69
|
id: String,
|
|
@@ -62,8 +76,10 @@ module Zavudev
|
|
|
62
76
|
status: Zavudev::Senders::AgentExecutionStatus::OrSymbol,
|
|
63
77
|
error_message: T.nilable(String),
|
|
64
78
|
inbound_message_id: String,
|
|
79
|
+
knowledge_chunks_used: T.nilable(Integer),
|
|
65
80
|
response_message_id: T.nilable(String),
|
|
66
|
-
response_text: T.nilable(String)
|
|
81
|
+
response_text: T.nilable(String),
|
|
82
|
+
tool_calls: T.nilable(Integer)
|
|
67
83
|
).returns(T.attached_class)
|
|
68
84
|
end
|
|
69
85
|
def self.new(
|
|
@@ -79,8 +95,18 @@ module Zavudev
|
|
|
79
95
|
status:,
|
|
80
96
|
error_message: nil,
|
|
81
97
|
inbound_message_id: nil,
|
|
98
|
+
# Knowledge-base chunks retrieved for this answer. Zero on an agent that has
|
|
99
|
+
# documents attached means the reply was not grounded in them, which is otherwise
|
|
100
|
+
# indistinguishable from a correct answer in this record. Absent on executions
|
|
101
|
+
# recorded before this field existed, which is not the same as zero.
|
|
102
|
+
knowledge_chunks_used: nil,
|
|
82
103
|
response_message_id: nil,
|
|
83
|
-
response_text: nil
|
|
104
|
+
response_text: nil,
|
|
105
|
+
# Tools the agent called while producing this reply. Zero on an agent that has
|
|
106
|
+
# tools configured means it answered without calling any — the case where a reply
|
|
107
|
+
# says it will look something up and nothing ever reaches your endpoint. Absent on
|
|
108
|
+
# executions recorded before this field existed, which is not the same as zero.
|
|
109
|
+
tool_calls: nil
|
|
84
110
|
)
|
|
85
111
|
end
|
|
86
112
|
|
|
@@ -97,8 +123,10 @@ module Zavudev
|
|
|
97
123
|
status: Zavudev::Senders::AgentExecutionStatus::TaggedSymbol,
|
|
98
124
|
error_message: T.nilable(String),
|
|
99
125
|
inbound_message_id: String,
|
|
126
|
+
knowledge_chunks_used: T.nilable(Integer),
|
|
100
127
|
response_message_id: T.nilable(String),
|
|
101
|
-
response_text: T.nilable(String)
|
|
128
|
+
response_text: T.nilable(String),
|
|
129
|
+
tool_calls: T.nilable(Integer)
|
|
102
130
|
}
|
|
103
131
|
)
|
|
104
132
|
end
|