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
|
@@ -41,12 +41,17 @@ module Zavudev
|
|
|
41
41
|
optional :enabled, Zavudev::Internal::Type::Boolean
|
|
42
42
|
|
|
43
43
|
# @!attribute webhook_secret
|
|
44
|
-
#
|
|
44
|
+
# Signing secret for the webhook. Optional: Zavu generates one when omitted and
|
|
45
|
+
# returns it on this response only. Supply your own if you already have a secret
|
|
46
|
+
# you want reused.
|
|
45
47
|
#
|
|
46
48
|
# @return [String, nil]
|
|
47
49
|
optional :webhook_secret, String, api_name: :webhookSecret
|
|
48
50
|
|
|
49
51
|
# @!method initialize(sender_id:, description:, name:, parameters:, webhook_url:, enabled: nil, webhook_secret: nil, request_options: {})
|
|
52
|
+
# Some parameter documentations has been truncated, see
|
|
53
|
+
# {Zavudev::Models::Senders::Agent::ToolCreateParams} for more details.
|
|
54
|
+
#
|
|
50
55
|
# @param sender_id [String]
|
|
51
56
|
#
|
|
52
57
|
# @param description [String]
|
|
@@ -59,7 +64,7 @@ module Zavudev
|
|
|
59
64
|
#
|
|
60
65
|
# @param enabled [Boolean]
|
|
61
66
|
#
|
|
62
|
-
# @param webhook_secret [String]
|
|
67
|
+
# @param webhook_secret [String] Signing secret for the webhook. Optional: Zavu generates one when omitted and re
|
|
63
68
|
#
|
|
64
69
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
|
|
65
70
|
end
|
|
@@ -6,13 +6,98 @@ module Zavudev
|
|
|
6
6
|
module Agent
|
|
7
7
|
# @see Zavudev::Resources::Senders::Agent::Tools#test_
|
|
8
8
|
class ToolTestResponse < Zavudev::Internal::Type::BaseModel
|
|
9
|
-
# @!attribute
|
|
9
|
+
# @!attribute run
|
|
10
|
+
# One run of a tool triggered from the test endpoint. Recorded so a test is
|
|
11
|
+
# verifiable after the fact rather than only visible in the response.
|
|
10
12
|
#
|
|
11
|
-
# @return [
|
|
12
|
-
required :
|
|
13
|
+
# @return [Zavudev::Models::Senders::Agent::ToolTestResponse::Run]
|
|
14
|
+
required :run, -> { Zavudev::Models::Senders::Agent::ToolTestResponse::Run }
|
|
13
15
|
|
|
14
|
-
# @!method initialize(
|
|
15
|
-
#
|
|
16
|
+
# @!method initialize(run:)
|
|
17
|
+
# Some parameter documentations has been truncated, see
|
|
18
|
+
# {Zavudev::Models::Senders::Agent::ToolTestResponse} for more details.
|
|
19
|
+
#
|
|
20
|
+
# @param run [Zavudev::Models::Senders::Agent::ToolTestResponse::Run] One run of a tool triggered from the test endpoint. Recorded so a test is verifi
|
|
21
|
+
|
|
22
|
+
# @see Zavudev::Models::Senders::Agent::ToolTestResponse#run
|
|
23
|
+
class Run < Zavudev::Internal::Type::BaseModel
|
|
24
|
+
# @!attribute id
|
|
25
|
+
#
|
|
26
|
+
# @return [String]
|
|
27
|
+
required :id, String
|
|
28
|
+
|
|
29
|
+
# @!attribute created_at
|
|
30
|
+
#
|
|
31
|
+
# @return [Time]
|
|
32
|
+
required :created_at, Time, api_name: :createdAt
|
|
33
|
+
|
|
34
|
+
# @!attribute duration_ms
|
|
35
|
+
#
|
|
36
|
+
# @return [Integer]
|
|
37
|
+
required :duration_ms, Integer, api_name: :durationMs
|
|
38
|
+
|
|
39
|
+
# @!attribute success
|
|
40
|
+
# Whether the tool returned without error. A tool that answered with a non-2xx
|
|
41
|
+
# status is a failed run, not an error of this endpoint.
|
|
42
|
+
#
|
|
43
|
+
# @return [Boolean]
|
|
44
|
+
required :success, Zavudev::Internal::Type::Boolean
|
|
45
|
+
|
|
46
|
+
# @!attribute tool_id
|
|
47
|
+
#
|
|
48
|
+
# @return [String]
|
|
49
|
+
required :tool_id, String, api_name: :toolId
|
|
50
|
+
|
|
51
|
+
# @!attribute error
|
|
52
|
+
# Why the run failed, when it did.
|
|
53
|
+
#
|
|
54
|
+
# @return [String, nil]
|
|
55
|
+
optional :error, String, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!attribute params
|
|
58
|
+
# The parameters the tool was called with.
|
|
59
|
+
#
|
|
60
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
61
|
+
optional :params, Zavudev::Internal::Type::HashOf[Zavudev::Internal::Type::Unknown]
|
|
62
|
+
|
|
63
|
+
# @!attribute response
|
|
64
|
+
# The tool's response body, truncated.
|
|
65
|
+
#
|
|
66
|
+
# @return [String, nil]
|
|
67
|
+
optional :response, String, nil?: true
|
|
68
|
+
|
|
69
|
+
# @!attribute status_code
|
|
70
|
+
# HTTP status the tool's webhook returned. Absent for tools that do not go over
|
|
71
|
+
# HTTP.
|
|
72
|
+
#
|
|
73
|
+
# @return [Integer, nil]
|
|
74
|
+
optional :status_code, Integer, api_name: :statusCode, nil?: true
|
|
75
|
+
|
|
76
|
+
# @!method initialize(id:, created_at:, duration_ms:, success:, tool_id:, error: nil, params: nil, response: nil, status_code: nil)
|
|
77
|
+
# Some parameter documentations has been truncated, see
|
|
78
|
+
# {Zavudev::Models::Senders::Agent::ToolTestResponse::Run} for more details.
|
|
79
|
+
#
|
|
80
|
+
# One run of a tool triggered from the test endpoint. Recorded so a test is
|
|
81
|
+
# verifiable after the fact rather than only visible in the response.
|
|
82
|
+
#
|
|
83
|
+
# @param id [String]
|
|
84
|
+
#
|
|
85
|
+
# @param created_at [Time]
|
|
86
|
+
#
|
|
87
|
+
# @param duration_ms [Integer]
|
|
88
|
+
#
|
|
89
|
+
# @param success [Boolean] Whether the tool returned without error. A tool that answered with a non-2xx sta
|
|
90
|
+
#
|
|
91
|
+
# @param tool_id [String]
|
|
92
|
+
#
|
|
93
|
+
# @param error [String, nil] Why the run failed, when it did.
|
|
94
|
+
#
|
|
95
|
+
# @param params [Hash{Symbol=>Object}] The parameters the tool was called with.
|
|
96
|
+
#
|
|
97
|
+
# @param response [String, nil] The tool's response body, truncated.
|
|
98
|
+
#
|
|
99
|
+
# @param status_code [Integer, nil] HTTP status the tool's webhook returned. Absent for tools that do not go over HT
|
|
100
|
+
end
|
|
16
101
|
end
|
|
17
102
|
end
|
|
18
103
|
end
|
|
@@ -73,6 +73,13 @@ module Zavudev
|
|
|
73
73
|
# @return [Integer, nil]
|
|
74
74
|
optional :max_tokens, Integer, api_name: :maxTokens, nil?: true
|
|
75
75
|
|
|
76
|
+
# @!attribute sender_ids
|
|
77
|
+
# Senders this agent answers on. An agent can serve several; `senderId` remains
|
|
78
|
+
# the primary one, for compatibility.
|
|
79
|
+
#
|
|
80
|
+
# @return [Array<String>, nil]
|
|
81
|
+
optional :sender_ids, Zavudev::Internal::Type::ArrayOf[String], api_name: :senderIds
|
|
82
|
+
|
|
76
83
|
# @!attribute stats
|
|
77
84
|
#
|
|
78
85
|
# @return [Zavudev::Models::Senders::SendersAgent::Stats, nil]
|
|
@@ -98,7 +105,18 @@ module Zavudev
|
|
|
98
105
|
Zavudev::Internal::Type::ArrayOf[String],
|
|
99
106
|
api_name: :triggerOnMessageTypes
|
|
100
107
|
|
|
101
|
-
# @!
|
|
108
|
+
# @!attribute voice
|
|
109
|
+
# Voice Agent configuration. When present and enabled, the agent can answer
|
|
110
|
+
# inbound phone calls and place outbound calls with Zavu's managed voice pipeline.
|
|
111
|
+
# Requires the Voice Agents feature to be enabled for your team.
|
|
112
|
+
#
|
|
113
|
+
# @return [Zavudev::Models::Senders::SendersAgent::Voice, nil]
|
|
114
|
+
optional :voice, -> { Zavudev::Senders::SendersAgent::Voice }
|
|
115
|
+
|
|
116
|
+
# @!method initialize(id:, created_at:, enabled:, model:, name:, provider:, sender_id:, system_prompt:, updated_at:, context_window_messages: nil, include_contact_metadata: nil, max_tokens: nil, sender_ids: nil, stats: nil, temperature: nil, trigger_on_channels: nil, trigger_on_message_types: nil, voice: nil)
|
|
117
|
+
# Some parameter documentations has been truncated, see
|
|
118
|
+
# {Zavudev::Models::Senders::SendersAgent} for more details.
|
|
119
|
+
#
|
|
102
120
|
# AI Agent configuration for a sender.
|
|
103
121
|
#
|
|
104
122
|
# @param id [String]
|
|
@@ -125,6 +143,8 @@ module Zavudev
|
|
|
125
143
|
#
|
|
126
144
|
# @param max_tokens [Integer, nil] Maximum tokens for LLM response.
|
|
127
145
|
#
|
|
146
|
+
# @param sender_ids [Array<String>] Senders this agent answers on. An agent can serve several; `senderId` remains th
|
|
147
|
+
#
|
|
128
148
|
# @param stats [Zavudev::Models::Senders::SendersAgent::Stats]
|
|
129
149
|
#
|
|
130
150
|
# @param temperature [Float, nil] LLM temperature (0-2).
|
|
@@ -132,6 +152,8 @@ module Zavudev
|
|
|
132
152
|
# @param trigger_on_channels [Array<String>] Channels that trigger the agent.
|
|
133
153
|
#
|
|
134
154
|
# @param trigger_on_message_types [Array<String>] Message types that trigger the agent.
|
|
155
|
+
#
|
|
156
|
+
# @param voice [Zavudev::Models::Senders::SendersAgent::Voice] Voice Agent configuration. When present and enabled, the agent can answer inboun
|
|
135
157
|
|
|
136
158
|
# @see Zavudev::Models::Senders::SendersAgent#stats
|
|
137
159
|
class Stats < Zavudev::Internal::Type::BaseModel
|
|
@@ -158,6 +180,181 @@ module Zavudev
|
|
|
158
180
|
#
|
|
159
181
|
# @param total_tokens_used [Integer]
|
|
160
182
|
end
|
|
183
|
+
|
|
184
|
+
# @see Zavudev::Models::Senders::SendersAgent#voice
|
|
185
|
+
class Voice < Zavudev::Internal::Type::BaseModel
|
|
186
|
+
# @!attribute enabled
|
|
187
|
+
# Whether the agent handles voice calls. When false, the sender's number is not
|
|
188
|
+
# answered by the voice agent and outbound calls are rejected.
|
|
189
|
+
#
|
|
190
|
+
# @return [Boolean]
|
|
191
|
+
required :enabled, Zavudev::Internal::Type::Boolean
|
|
192
|
+
|
|
193
|
+
# @!attribute greeting
|
|
194
|
+
# Opening line the agent speaks when the call connects. If omitted, the agent
|
|
195
|
+
# waits for the caller to speak first.
|
|
196
|
+
#
|
|
197
|
+
# @return [String, nil]
|
|
198
|
+
optional :greeting, String
|
|
199
|
+
|
|
200
|
+
# @!attribute greetings
|
|
201
|
+
# Greeting per language, keyed by language code. Used when the caller's language
|
|
202
|
+
# differs from the one `greeting` is written in.
|
|
203
|
+
#
|
|
204
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
205
|
+
optional :greetings, Zavudev::Internal::Type::HashOf[String]
|
|
206
|
+
|
|
207
|
+
# @!attribute interruptible
|
|
208
|
+
# Whether the caller can interrupt the agent while it is speaking (barge-in). When
|
|
209
|
+
# true, the agent stops talking as soon as the caller starts.
|
|
210
|
+
#
|
|
211
|
+
# @return [Boolean, nil]
|
|
212
|
+
optional :interruptible, Zavudev::Internal::Type::Boolean
|
|
213
|
+
|
|
214
|
+
# @!attribute language
|
|
215
|
+
# BCP-47 language code used for both speech recognition and speech synthesis (e.g.
|
|
216
|
+
# `en`, `es`, `pt-BR`). Auto-detected from the recipient when omitted.
|
|
217
|
+
#
|
|
218
|
+
# @return [String, nil]
|
|
219
|
+
optional :language, String
|
|
220
|
+
|
|
221
|
+
# @!attribute max_call_duration_minutes
|
|
222
|
+
# Hard limit on call length in minutes. The call ends automatically when reached.
|
|
223
|
+
#
|
|
224
|
+
# @return [Integer, nil]
|
|
225
|
+
optional :max_call_duration_minutes, Integer, api_name: :maxCallDurationMinutes
|
|
226
|
+
|
|
227
|
+
# @!attribute max_idle_seconds
|
|
228
|
+
# How long the agent waits during silence before ending the call.
|
|
229
|
+
#
|
|
230
|
+
# @return [Integer, nil]
|
|
231
|
+
optional :max_idle_seconds, Integer, api_name: :maxIdleSeconds
|
|
232
|
+
|
|
233
|
+
# @!attribute model
|
|
234
|
+
# Model that runs the conversation, co-located in the voice network for lowest
|
|
235
|
+
# latency. Independent of the model used for text messaging. Derived from the
|
|
236
|
+
# agent's text model when omitted.
|
|
237
|
+
#
|
|
238
|
+
# @return [String, nil]
|
|
239
|
+
optional :model, String
|
|
240
|
+
|
|
241
|
+
# @!attribute record_calls
|
|
242
|
+
# Whether the call audio is recorded.
|
|
243
|
+
#
|
|
244
|
+
# @return [Boolean, nil]
|
|
245
|
+
optional :record_calls, Zavudev::Internal::Type::Boolean, api_name: :recordCalls
|
|
246
|
+
|
|
247
|
+
# @!attribute stt_model
|
|
248
|
+
# Speech-recognition model. Uses the default when omitted.
|
|
249
|
+
#
|
|
250
|
+
# @return [String, nil]
|
|
251
|
+
optional :stt_model, String, api_name: :sttModel
|
|
252
|
+
|
|
253
|
+
# @!attribute stt_provider
|
|
254
|
+
# Speech-recognition provider. Uses the default when omitted.
|
|
255
|
+
#
|
|
256
|
+
# @return [String, nil]
|
|
257
|
+
optional :stt_provider, String, api_name: :sttProvider
|
|
258
|
+
|
|
259
|
+
# @!attribute transfer_phone_number
|
|
260
|
+
# E.164 phone number the agent can transfer the call to. When set, the agent is
|
|
261
|
+
# given a transfer tool it can use to hand the call to a human.
|
|
262
|
+
#
|
|
263
|
+
# @return [String, nil]
|
|
264
|
+
optional :transfer_phone_number, String, api_name: :transferPhoneNumber
|
|
265
|
+
|
|
266
|
+
# @!attribute tts_provider
|
|
267
|
+
# Speech-synthesis provider. Uses the default when omitted.
|
|
268
|
+
#
|
|
269
|
+
# @return [String, nil]
|
|
270
|
+
optional :tts_provider, String, api_name: :ttsProvider
|
|
271
|
+
|
|
272
|
+
# @!attribute tts_voice_id
|
|
273
|
+
# Identifier of the synthesized voice that speaks. Choose from the voices
|
|
274
|
+
# available in the dashboard. Uses a neutral default when omitted.
|
|
275
|
+
#
|
|
276
|
+
# @return [String, nil]
|
|
277
|
+
optional :tts_voice_id, String, api_name: :ttsVoiceId
|
|
278
|
+
|
|
279
|
+
# @!attribute voicemail_action
|
|
280
|
+
# What the agent does when an answering machine or voicemail is detected on an
|
|
281
|
+
# outbound call.
|
|
282
|
+
#
|
|
283
|
+
# @return [Symbol, Zavudev::Models::Senders::SendersAgent::Voice::VoicemailAction, nil]
|
|
284
|
+
optional :voicemail_action,
|
|
285
|
+
enum: -> { Zavudev::Senders::SendersAgent::Voice::VoicemailAction },
|
|
286
|
+
api_name: :voicemailAction
|
|
287
|
+
|
|
288
|
+
# @!attribute voicemail_message
|
|
289
|
+
# Message spoken when `voicemailAction` is `leave_message`. Falls back to
|
|
290
|
+
# `greeting` when omitted.
|
|
291
|
+
#
|
|
292
|
+
# @return [String, nil]
|
|
293
|
+
optional :voicemail_message, String, api_name: :voicemailMessage
|
|
294
|
+
|
|
295
|
+
# @!attribute voice_speed
|
|
296
|
+
# Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
|
|
297
|
+
# ignored by the others.
|
|
298
|
+
#
|
|
299
|
+
# @return [Float, nil]
|
|
300
|
+
optional :voice_speed, Float, api_name: :voiceSpeed
|
|
301
|
+
|
|
302
|
+
# @!method initialize(enabled:, greeting: nil, greetings: nil, interruptible: nil, language: nil, max_call_duration_minutes: nil, max_idle_seconds: nil, model: nil, record_calls: nil, stt_model: nil, stt_provider: nil, transfer_phone_number: nil, tts_provider: nil, tts_voice_id: nil, voicemail_action: nil, voicemail_message: nil, voice_speed: nil)
|
|
303
|
+
# Some parameter documentations has been truncated, see
|
|
304
|
+
# {Zavudev::Models::Senders::SendersAgent::Voice} for more details.
|
|
305
|
+
#
|
|
306
|
+
# Voice Agent configuration. When present and enabled, the agent can answer
|
|
307
|
+
# inbound phone calls and place outbound calls with Zavu's managed voice pipeline.
|
|
308
|
+
# Requires the Voice Agents feature to be enabled for your team.
|
|
309
|
+
#
|
|
310
|
+
# @param enabled [Boolean] Whether the agent handles voice calls. When false, the sender's number is not an
|
|
311
|
+
#
|
|
312
|
+
# @param greeting [String] Opening line the agent speaks when the call connects. If omitted, the agent wait
|
|
313
|
+
#
|
|
314
|
+
# @param greetings [Hash{Symbol=>String}] Greeting per language, keyed by language code. Used when the caller's language d
|
|
315
|
+
#
|
|
316
|
+
# @param interruptible [Boolean] Whether the caller can interrupt the agent while it is speaking (barge-in). When
|
|
317
|
+
#
|
|
318
|
+
# @param language [String] BCP-47 language code used for both speech recognition and speech synthesis (e.g.
|
|
319
|
+
#
|
|
320
|
+
# @param max_call_duration_minutes [Integer] Hard limit on call length in minutes. The call ends automatically when reached.
|
|
321
|
+
#
|
|
322
|
+
# @param max_idle_seconds [Integer] How long the agent waits during silence before ending the call.
|
|
323
|
+
#
|
|
324
|
+
# @param model [String] Model that runs the conversation, co-located in the voice network for lowest lat
|
|
325
|
+
#
|
|
326
|
+
# @param record_calls [Boolean] Whether the call audio is recorded.
|
|
327
|
+
#
|
|
328
|
+
# @param stt_model [String] Speech-recognition model. Uses the default when omitted.
|
|
329
|
+
#
|
|
330
|
+
# @param stt_provider [String] Speech-recognition provider. Uses the default when omitted.
|
|
331
|
+
#
|
|
332
|
+
# @param transfer_phone_number [String] E.164 phone number the agent can transfer the call to. When set, the agent is gi
|
|
333
|
+
#
|
|
334
|
+
# @param tts_provider [String] Speech-synthesis provider. Uses the default when omitted.
|
|
335
|
+
#
|
|
336
|
+
# @param tts_voice_id [String] Identifier of the synthesized voice that speaks. Choose from the voices availabl
|
|
337
|
+
#
|
|
338
|
+
# @param voicemail_action [Symbol, Zavudev::Models::Senders::SendersAgent::Voice::VoicemailAction] What the agent does when an answering machine or voicemail is detected on an out
|
|
339
|
+
#
|
|
340
|
+
# @param voicemail_message [String] Message spoken when `voicemailAction` is `leave_message`. Falls back to `greetin
|
|
341
|
+
#
|
|
342
|
+
# @param voice_speed [Float] Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
|
|
343
|
+
|
|
344
|
+
# What the agent does when an answering machine or voicemail is detected on an
|
|
345
|
+
# outbound call.
|
|
346
|
+
#
|
|
347
|
+
# @see Zavudev::Models::Senders::SendersAgent::Voice#voicemail_action
|
|
348
|
+
module VoicemailAction
|
|
349
|
+
extend Zavudev::Internal::Type::Enum
|
|
350
|
+
|
|
351
|
+
HANGUP = :hangup
|
|
352
|
+
LEAVE_MESSAGE = :leave_message
|
|
353
|
+
|
|
354
|
+
# @!method self.values
|
|
355
|
+
# @return [Array<Symbol>]
|
|
356
|
+
end
|
|
357
|
+
end
|
|
161
358
|
end
|
|
162
359
|
end
|
|
163
360
|
end
|
|
@@ -74,7 +74,18 @@ module Zavudev
|
|
|
74
74
|
Zavudev::Internal::Type::ArrayOf[String],
|
|
75
75
|
api_name: :triggerOnMessageTypes
|
|
76
76
|
|
|
77
|
-
# @!
|
|
77
|
+
# @!attribute voice
|
|
78
|
+
# Voice Agent configuration. Enable this to let the agent answer and place phone
|
|
79
|
+
# calls with Zavu's managed voice pipeline. Requires the Voice Agents feature to
|
|
80
|
+
# be enabled for your team.
|
|
81
|
+
#
|
|
82
|
+
# @return [Zavudev::Models::Senders::AgentCreateParams::Voice, nil]
|
|
83
|
+
optional :voice, -> { Zavudev::Senders::AgentCreateParams::Voice }
|
|
84
|
+
|
|
85
|
+
# @!method initialize(sender_id:, model:, name:, provider:, system_prompt:, api_key: nil, context_window_messages: nil, include_contact_metadata: nil, max_tokens: nil, temperature: nil, trigger_on_channels: nil, trigger_on_message_types: nil, voice: nil, request_options: {})
|
|
86
|
+
# Some parameter documentations has been truncated, see
|
|
87
|
+
# {Zavudev::Models::Senders::AgentCreateParams} for more details.
|
|
88
|
+
#
|
|
78
89
|
# @param sender_id [String]
|
|
79
90
|
#
|
|
80
91
|
# @param model [String]
|
|
@@ -99,7 +110,183 @@ module Zavudev
|
|
|
99
110
|
#
|
|
100
111
|
# @param trigger_on_message_types [Array<String>]
|
|
101
112
|
#
|
|
113
|
+
# @param voice [Zavudev::Models::Senders::AgentCreateParams::Voice] Voice Agent configuration. Enable this to let the agent answer and place phone c
|
|
114
|
+
#
|
|
102
115
|
# @param request_options [Zavudev::RequestOptions, Hash{Symbol=>Object}]
|
|
116
|
+
|
|
117
|
+
class Voice < Zavudev::Internal::Type::BaseModel
|
|
118
|
+
# @!attribute enabled
|
|
119
|
+
# Whether the agent handles voice calls. When false, the sender's number is not
|
|
120
|
+
# answered by the voice agent and outbound calls are rejected.
|
|
121
|
+
#
|
|
122
|
+
# @return [Boolean]
|
|
123
|
+
required :enabled, Zavudev::Internal::Type::Boolean
|
|
124
|
+
|
|
125
|
+
# @!attribute greeting
|
|
126
|
+
# Opening line the agent speaks when the call connects. If omitted, the agent
|
|
127
|
+
# waits for the caller to speak first.
|
|
128
|
+
#
|
|
129
|
+
# @return [String, nil]
|
|
130
|
+
optional :greeting, String
|
|
131
|
+
|
|
132
|
+
# @!attribute greetings
|
|
133
|
+
# Greeting per language, keyed by language code. Used when the caller's language
|
|
134
|
+
# differs from the one `greeting` is written in.
|
|
135
|
+
#
|
|
136
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
137
|
+
optional :greetings, Zavudev::Internal::Type::HashOf[String]
|
|
138
|
+
|
|
139
|
+
# @!attribute interruptible
|
|
140
|
+
# Whether the caller can interrupt the agent while it is speaking (barge-in). When
|
|
141
|
+
# true, the agent stops talking as soon as the caller starts.
|
|
142
|
+
#
|
|
143
|
+
# @return [Boolean, nil]
|
|
144
|
+
optional :interruptible, Zavudev::Internal::Type::Boolean
|
|
145
|
+
|
|
146
|
+
# @!attribute language
|
|
147
|
+
# BCP-47 language code used for both speech recognition and speech synthesis (e.g.
|
|
148
|
+
# `en`, `es`, `pt-BR`). Auto-detected from the recipient when omitted.
|
|
149
|
+
#
|
|
150
|
+
# @return [String, nil]
|
|
151
|
+
optional :language, String
|
|
152
|
+
|
|
153
|
+
# @!attribute max_call_duration_minutes
|
|
154
|
+
# Hard limit on call length in minutes. The call ends automatically when reached.
|
|
155
|
+
#
|
|
156
|
+
# @return [Integer, nil]
|
|
157
|
+
optional :max_call_duration_minutes, Integer, api_name: :maxCallDurationMinutes
|
|
158
|
+
|
|
159
|
+
# @!attribute max_idle_seconds
|
|
160
|
+
# How long the agent waits during silence before ending the call.
|
|
161
|
+
#
|
|
162
|
+
# @return [Integer, nil]
|
|
163
|
+
optional :max_idle_seconds, Integer, api_name: :maxIdleSeconds
|
|
164
|
+
|
|
165
|
+
# @!attribute model
|
|
166
|
+
# Model that runs the conversation, co-located in the voice network for lowest
|
|
167
|
+
# latency. Independent of the model used for text messaging. Derived from the
|
|
168
|
+
# agent's text model when omitted.
|
|
169
|
+
#
|
|
170
|
+
# @return [String, nil]
|
|
171
|
+
optional :model, String
|
|
172
|
+
|
|
173
|
+
# @!attribute record_calls
|
|
174
|
+
# Whether the call audio is recorded.
|
|
175
|
+
#
|
|
176
|
+
# @return [Boolean, nil]
|
|
177
|
+
optional :record_calls, Zavudev::Internal::Type::Boolean, api_name: :recordCalls
|
|
178
|
+
|
|
179
|
+
# @!attribute stt_model
|
|
180
|
+
# Speech-recognition model. Uses the default when omitted.
|
|
181
|
+
#
|
|
182
|
+
# @return [String, nil]
|
|
183
|
+
optional :stt_model, String, api_name: :sttModel
|
|
184
|
+
|
|
185
|
+
# @!attribute stt_provider
|
|
186
|
+
# Speech-recognition provider. Uses the default when omitted.
|
|
187
|
+
#
|
|
188
|
+
# @return [String, nil]
|
|
189
|
+
optional :stt_provider, String, api_name: :sttProvider
|
|
190
|
+
|
|
191
|
+
# @!attribute transfer_phone_number
|
|
192
|
+
# E.164 phone number the agent can transfer the call to. When set, the agent is
|
|
193
|
+
# given a transfer tool it can use to hand the call to a human.
|
|
194
|
+
#
|
|
195
|
+
# @return [String, nil]
|
|
196
|
+
optional :transfer_phone_number, String, api_name: :transferPhoneNumber
|
|
197
|
+
|
|
198
|
+
# @!attribute tts_provider
|
|
199
|
+
# Speech-synthesis provider. Uses the default when omitted.
|
|
200
|
+
#
|
|
201
|
+
# @return [String, nil]
|
|
202
|
+
optional :tts_provider, String, api_name: :ttsProvider
|
|
203
|
+
|
|
204
|
+
# @!attribute tts_voice_id
|
|
205
|
+
# Identifier of the synthesized voice that speaks. Choose from the voices
|
|
206
|
+
# available in the dashboard. Uses a neutral default when omitted.
|
|
207
|
+
#
|
|
208
|
+
# @return [String, nil]
|
|
209
|
+
optional :tts_voice_id, String, api_name: :ttsVoiceId
|
|
210
|
+
|
|
211
|
+
# @!attribute voicemail_action
|
|
212
|
+
# What the agent does when an answering machine or voicemail is detected on an
|
|
213
|
+
# outbound call.
|
|
214
|
+
#
|
|
215
|
+
# @return [Symbol, Zavudev::Models::Senders::AgentCreateParams::Voice::VoicemailAction, nil]
|
|
216
|
+
optional :voicemail_action,
|
|
217
|
+
enum: -> { Zavudev::Senders::AgentCreateParams::Voice::VoicemailAction },
|
|
218
|
+
api_name: :voicemailAction
|
|
219
|
+
|
|
220
|
+
# @!attribute voicemail_message
|
|
221
|
+
# Message spoken when `voicemailAction` is `leave_message`. Falls back to
|
|
222
|
+
# `greeting` when omitted.
|
|
223
|
+
#
|
|
224
|
+
# @return [String, nil]
|
|
225
|
+
optional :voicemail_message, String, api_name: :voicemailMessage
|
|
226
|
+
|
|
227
|
+
# @!attribute voice_speed
|
|
228
|
+
# Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
|
|
229
|
+
# ignored by the others.
|
|
230
|
+
#
|
|
231
|
+
# @return [Float, nil]
|
|
232
|
+
optional :voice_speed, Float, api_name: :voiceSpeed
|
|
233
|
+
|
|
234
|
+
# @!method initialize(enabled:, greeting: nil, greetings: nil, interruptible: nil, language: nil, max_call_duration_minutes: nil, max_idle_seconds: nil, model: nil, record_calls: nil, stt_model: nil, stt_provider: nil, transfer_phone_number: nil, tts_provider: nil, tts_voice_id: nil, voicemail_action: nil, voicemail_message: nil, voice_speed: nil)
|
|
235
|
+
# Some parameter documentations has been truncated, see
|
|
236
|
+
# {Zavudev::Models::Senders::AgentCreateParams::Voice} for more details.
|
|
237
|
+
#
|
|
238
|
+
# Voice Agent configuration. Enable this to let the agent answer and place phone
|
|
239
|
+
# calls with Zavu's managed voice pipeline. Requires the Voice Agents feature to
|
|
240
|
+
# be enabled for your team.
|
|
241
|
+
#
|
|
242
|
+
# @param enabled [Boolean] Whether the agent handles voice calls. When false, the sender's number is not an
|
|
243
|
+
#
|
|
244
|
+
# @param greeting [String] Opening line the agent speaks when the call connects. If omitted, the agent wait
|
|
245
|
+
#
|
|
246
|
+
# @param greetings [Hash{Symbol=>String}] Greeting per language, keyed by language code. Used when the caller's language d
|
|
247
|
+
#
|
|
248
|
+
# @param interruptible [Boolean] Whether the caller can interrupt the agent while it is speaking (barge-in). When
|
|
249
|
+
#
|
|
250
|
+
# @param language [String] BCP-47 language code used for both speech recognition and speech synthesis (e.g.
|
|
251
|
+
#
|
|
252
|
+
# @param max_call_duration_minutes [Integer] Hard limit on call length in minutes. The call ends automatically when reached.
|
|
253
|
+
#
|
|
254
|
+
# @param max_idle_seconds [Integer] How long the agent waits during silence before ending the call.
|
|
255
|
+
#
|
|
256
|
+
# @param model [String] Model that runs the conversation, co-located in the voice network for lowest lat
|
|
257
|
+
#
|
|
258
|
+
# @param record_calls [Boolean] Whether the call audio is recorded.
|
|
259
|
+
#
|
|
260
|
+
# @param stt_model [String] Speech-recognition model. Uses the default when omitted.
|
|
261
|
+
#
|
|
262
|
+
# @param stt_provider [String] Speech-recognition provider. Uses the default when omitted.
|
|
263
|
+
#
|
|
264
|
+
# @param transfer_phone_number [String] E.164 phone number the agent can transfer the call to. When set, the agent is gi
|
|
265
|
+
#
|
|
266
|
+
# @param tts_provider [String] Speech-synthesis provider. Uses the default when omitted.
|
|
267
|
+
#
|
|
268
|
+
# @param tts_voice_id [String] Identifier of the synthesized voice that speaks. Choose from the voices availabl
|
|
269
|
+
#
|
|
270
|
+
# @param voicemail_action [Symbol, Zavudev::Models::Senders::AgentCreateParams::Voice::VoicemailAction] What the agent does when an answering machine or voicemail is detected on an out
|
|
271
|
+
#
|
|
272
|
+
# @param voicemail_message [String] Message spoken when `voicemailAction` is `leave_message`. Falls back to `greetin
|
|
273
|
+
#
|
|
274
|
+
# @param voice_speed [Float] Speech rate. 1.0 is natural. Only honoured by voices that support rate control;
|
|
275
|
+
|
|
276
|
+
# What the agent does when an answering machine or voicemail is detected on an
|
|
277
|
+
# outbound call.
|
|
278
|
+
#
|
|
279
|
+
# @see Zavudev::Models::Senders::AgentCreateParams::Voice#voicemail_action
|
|
280
|
+
module VoicemailAction
|
|
281
|
+
extend Zavudev::Internal::Type::Enum
|
|
282
|
+
|
|
283
|
+
HANGUP = :hangup
|
|
284
|
+
LEAVE_MESSAGE = :leave_message
|
|
285
|
+
|
|
286
|
+
# @!method self.values
|
|
287
|
+
# @return [Array<Symbol>]
|
|
288
|
+
end
|
|
289
|
+
end
|
|
103
290
|
end
|
|
104
291
|
end
|
|
105
292
|
end
|
|
@@ -56,6 +56,15 @@ module Zavudev
|
|
|
56
56
|
# @return [String, nil]
|
|
57
57
|
optional :inbound_message_id, String, api_name: :inboundMessageId
|
|
58
58
|
|
|
59
|
+
# @!attribute knowledge_chunks_used
|
|
60
|
+
# Knowledge-base chunks retrieved for this answer. Zero on an agent that has
|
|
61
|
+
# documents attached means the reply was not grounded in them, which is otherwise
|
|
62
|
+
# indistinguishable from a correct answer in this record. Absent on executions
|
|
63
|
+
# recorded before this field existed, which is not the same as zero.
|
|
64
|
+
#
|
|
65
|
+
# @return [Integer, nil]
|
|
66
|
+
optional :knowledge_chunks_used, Integer, api_name: :knowledgeChunksUsed, nil?: true
|
|
67
|
+
|
|
59
68
|
# @!attribute response_message_id
|
|
60
69
|
#
|
|
61
70
|
# @return [String, nil]
|
|
@@ -66,7 +75,19 @@ module Zavudev
|
|
|
66
75
|
# @return [String, nil]
|
|
67
76
|
optional :response_text, String, api_name: :responseText, nil?: true
|
|
68
77
|
|
|
69
|
-
# @!
|
|
78
|
+
# @!attribute tool_calls
|
|
79
|
+
# Tools the agent called while producing this reply. Zero on an agent that has
|
|
80
|
+
# tools configured means it answered without calling any — the case where a reply
|
|
81
|
+
# says it will look something up and nothing ever reaches your endpoint. Absent on
|
|
82
|
+
# executions recorded before this field existed, which is not the same as zero.
|
|
83
|
+
#
|
|
84
|
+
# @return [Integer, nil]
|
|
85
|
+
optional :tool_calls, Integer, api_name: :toolCalls, nil?: true
|
|
86
|
+
|
|
87
|
+
# @!method initialize(id:, agent_id:, cost:, created_at:, input_tokens:, latency_ms:, output_tokens:, status:, error_message: nil, inbound_message_id: nil, knowledge_chunks_used: nil, response_message_id: nil, response_text: nil, tool_calls: nil)
|
|
88
|
+
# Some parameter documentations has been truncated, see
|
|
89
|
+
# {Zavudev::Models::Senders::AgentExecution} for more details.
|
|
90
|
+
#
|
|
70
91
|
# @param id [String]
|
|
71
92
|
#
|
|
72
93
|
# @param agent_id [String]
|
|
@@ -87,9 +108,13 @@ module Zavudev
|
|
|
87
108
|
#
|
|
88
109
|
# @param inbound_message_id [String]
|
|
89
110
|
#
|
|
111
|
+
# @param knowledge_chunks_used [Integer, nil] Knowledge-base chunks retrieved for this answer. Zero on an agent that has docum
|
|
112
|
+
#
|
|
90
113
|
# @param response_message_id [String, nil]
|
|
91
114
|
#
|
|
92
115
|
# @param response_text [String, nil]
|
|
116
|
+
#
|
|
117
|
+
# @param tool_calls [Integer, nil] Tools the agent called while producing this reply. Zero on an agent that has too
|
|
93
118
|
end
|
|
94
119
|
end
|
|
95
120
|
end
|