revox 0.1.0 → 0.2.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 +71 -0
- data/README.md +39 -14
- data/lib/revox/client.rb +15 -1
- data/lib/revox/internal/transport/base_client.rb +5 -0
- data/lib/revox/internal/util.rb +22 -7
- data/lib/revox/models/assistant_create_params.rb +1038 -13
- data/lib/revox/models/assistant_create_response.rb +1071 -11
- data/lib/revox/models/assistant_list_response.rb +1070 -11
- data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
- data/lib/revox/models/assistant_update_params.rb +1038 -13
- data/lib/revox/models/assistant_update_response.rb +1097 -12
- data/lib/revox/models/call_create_params.rb +1065 -13
- data/lib/revox/models/call_create_response.rb +1813 -101
- data/lib/revox/models/call_retrieve_response.rb +1815 -101
- data/lib/revox/models/campaign_create_params.rb +67 -2
- data/lib/revox/models/campaign_create_response.rb +1314 -59
- data/lib/revox/models/campaign_get_rows_params.rb +1 -46
- data/lib/revox/models/campaign_get_rows_response.rb +1837 -129
- data/lib/revox/models/campaign_list_response.rb +1312 -59
- data/lib/revox/models/campaign_retrieve_response.rb +1312 -56
- data/lib/revox/models/users/me_retrieve_response.rb +13 -1
- data/lib/revox/models/users/me_update_response.rb +13 -1
- data/lib/revox/models/voice_list_response.rb +55 -1
- data/lib/revox/models/voice_preview_params.rb +49 -1
- data/lib/revox/models.rb +0 -2
- data/lib/revox/resources/assistants.rb +116 -8
- data/lib/revox/resources/call.rb +0 -29
- data/lib/revox/resources/campaigns.rb +12 -17
- data/lib/revox/resources/voices.rb +16 -10
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +0 -2
- data/rbi/revox/internal/util.rbi +8 -0
- data/rbi/revox/models/assistant_create_params.rbi +2138 -103
- data/rbi/revox/models/assistant_create_response.rbi +2454 -199
- data/rbi/revox/models/assistant_list_response.rbi +2448 -195
- data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
- data/rbi/revox/models/assistant_update_params.rbi +2138 -103
- data/rbi/revox/models/assistant_update_response.rbi +2504 -198
- data/rbi/revox/models/call_create_params.rbi +2382 -225
- data/rbi/revox/models/call_create_response.rbi +4104 -384
- data/rbi/revox/models/call_retrieve_response.rbi +4104 -382
- data/rbi/revox/models/campaign_create_params.rbi +136 -0
- data/rbi/revox/models/campaign_create_response.rbi +2911 -231
- data/rbi/revox/models/campaign_get_rows_params.rbi +2 -82
- data/rbi/revox/models/campaign_get_rows_response.rbi +4135 -410
- data/rbi/revox/models/campaign_list_response.rbi +2904 -230
- data/rbi/revox/models/campaign_retrieve_response.rbi +2911 -231
- data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
- data/rbi/revox/models/users/me_update_response.rbi +13 -3
- data/rbi/revox/models/voice_list_response.rbi +105 -3
- data/rbi/revox/models/voice_preview_params.rbi +69 -0
- data/rbi/revox/models.rbi +0 -2
- data/rbi/revox/resources/assistants.rbi +284 -8
- data/rbi/revox/resources/call.rbi +0 -21
- data/rbi/revox/resources/campaigns.rbi +12 -19
- data/rbi/revox/resources/voices.rbi +17 -9
- data/sig/revox/internal/util.rbs +4 -0
- data/sig/revox/models/assistant_create_params.rbs +844 -11
- data/sig/revox/models/assistant_create_response.rbs +860 -3
- data/sig/revox/models/assistant_list_response.rbs +860 -3
- data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
- data/sig/revox/models/assistant_update_params.rbs +844 -11
- data/sig/revox/models/assistant_update_response.rbs +886 -6
- data/sig/revox/models/call_create_params.rbs +847 -13
- data/sig/revox/models/call_create_response.rbs +1514 -34
- data/sig/revox/models/call_retrieve_response.rbs +1514 -34
- data/sig/revox/models/campaign_create_params.rbs +54 -0
- data/sig/revox/models/campaign_create_response.rbs +1034 -6
- data/sig/revox/models/campaign_get_rows_params.rbs +2 -64
- data/sig/revox/models/campaign_get_rows_response.rbs +1522 -54
- data/sig/revox/models/campaign_list_response.rbs +1034 -6
- data/sig/revox/models/campaign_retrieve_response.rbs +1034 -6
- data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
- data/sig/revox/models/users/me_update_response.rbs +8 -3
- data/sig/revox/models/voice_list_response.rbs +45 -3
- data/sig/revox/models/voice_preview_params.rbs +42 -1
- data/sig/revox/models.rbs +0 -2
- data/sig/revox/resources/assistants.rbs +56 -2
- data/sig/revox/resources/call.rbs +0 -7
- data/sig/revox/resources/campaigns.rbs +2 -5
- data/sig/revox/resources/voices.rbs +4 -0
- metadata +2 -8
- data/lib/revox/models/call_list_params.rb +0 -52
- data/lib/revox/models/call_list_response.rb +0 -259
- data/rbi/revox/models/call_list_params.rbi +0 -94
- data/rbi/revox/models/call_list_response.rbi +0 -563
- data/sig/revox/models/call_list_params.rbs +0 -63
- data/sig/revox/models/call_list_response.rbs +0 -226
|
@@ -18,8 +18,26 @@ module Revox
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :prompt
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
#
|
|
21
|
+
# Which call outcomes trigger the after-call SMS. When empty or null, no
|
|
22
|
+
# after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
|
|
23
|
+
# when outcome is null.
|
|
24
|
+
sig do
|
|
25
|
+
returns(
|
|
26
|
+
T.nilable(
|
|
27
|
+
T::Array[
|
|
28
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::OrSymbol
|
|
29
|
+
]
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
attr_accessor :after_call_sms_outcomes
|
|
34
|
+
|
|
35
|
+
# Prompt / instructions for the after-call SMS. Supports {{variable}}
|
|
36
|
+
# placeholders. When null, no after-call SMS is sent.
|
|
37
|
+
sig { returns(T.nilable(String)) }
|
|
38
|
+
attr_accessor :after_call_sms_prompt
|
|
39
|
+
|
|
40
|
+
# Ambient background sound to play during the call. null/omitted disables it.
|
|
23
41
|
sig do
|
|
24
42
|
returns(
|
|
25
43
|
T.nilable(Revox::AssistantCreateParams::BackgroundSound::OrSymbol)
|
|
@@ -27,11 +45,20 @@ module Revox
|
|
|
27
45
|
end
|
|
28
46
|
attr_accessor :background_sound
|
|
29
47
|
|
|
48
|
+
# Volume of the ambient background sound (0 = silent, 1 = max).
|
|
49
|
+
sig { returns(T.nilable(Float)) }
|
|
50
|
+
attr_reader :background_sound_volume
|
|
51
|
+
|
|
52
|
+
sig { params(background_sound_volume: Float).void }
|
|
53
|
+
attr_writer :background_sound_volume
|
|
54
|
+
|
|
30
55
|
sig { returns(T.nilable(Revox::AssistantCreateParams::Calendly)) }
|
|
31
56
|
attr_reader :calendly
|
|
32
57
|
|
|
33
58
|
sig do
|
|
34
|
-
params(
|
|
59
|
+
params(
|
|
60
|
+
calendly: T.nilable(Revox::AssistantCreateParams::Calendly::OrHash)
|
|
61
|
+
).void
|
|
35
62
|
end
|
|
36
63
|
attr_writer :calendly
|
|
37
64
|
|
|
@@ -48,6 +75,56 @@ module Revox
|
|
|
48
75
|
end
|
|
49
76
|
attr_writer :call_retry_config
|
|
50
77
|
|
|
78
|
+
# Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
|
|
79
|
+
# Set null to unlink it.
|
|
80
|
+
sig { returns(T.nilable(String)) }
|
|
81
|
+
attr_accessor :cartesia_dictionary_pronunciation_id
|
|
82
|
+
|
|
83
|
+
# Custom API tools the assistant can call during conversations. Each tool defines
|
|
84
|
+
# an HTTP endpoint with variable substitution.
|
|
85
|
+
sig do
|
|
86
|
+
returns(T.nilable(T::Array[Revox::AssistantCreateParams::CustomTool]))
|
|
87
|
+
end
|
|
88
|
+
attr_accessor :custom_tools
|
|
89
|
+
|
|
90
|
+
# Email address(es) to receive notifications when a call ends with a matching
|
|
91
|
+
# outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
|
|
92
|
+
# bob@y.com").
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :email_notification_address
|
|
95
|
+
|
|
96
|
+
# The language used for the notification email content. One of "en" or "fr".
|
|
97
|
+
# Defaults to "en".
|
|
98
|
+
sig do
|
|
99
|
+
returns(
|
|
100
|
+
T.nilable(
|
|
101
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
attr_reader :email_notification_language
|
|
106
|
+
|
|
107
|
+
sig do
|
|
108
|
+
params(
|
|
109
|
+
email_notification_language:
|
|
110
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol
|
|
111
|
+
).void
|
|
112
|
+
end
|
|
113
|
+
attr_writer :email_notification_language
|
|
114
|
+
|
|
115
|
+
# Which call outcomes trigger an email notification. E.g. ["interested",
|
|
116
|
+
# "completed", "none"]. Use "none" when outcome is null.
|
|
117
|
+
sig do
|
|
118
|
+
returns(
|
|
119
|
+
T.nilable(
|
|
120
|
+
T::Array[
|
|
121
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::OrSymbol
|
|
122
|
+
]
|
|
123
|
+
)
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
attr_accessor :email_notification_outcomes
|
|
127
|
+
|
|
51
128
|
# Optional message to say when the agent decides to end the call.
|
|
52
129
|
sig { returns(T.nilable(String)) }
|
|
53
130
|
attr_reader :end_of_call_sentence
|
|
@@ -102,6 +179,21 @@ module Revox
|
|
|
102
179
|
end
|
|
103
180
|
attr_writer :first_sentence_mode
|
|
104
181
|
|
|
182
|
+
# Override the default outbound phone number for calls placed with this assistant.
|
|
183
|
+
# Must be a phone number owned by the organization in E.164 format (e.g.
|
|
184
|
+
# +1234567890). When null, the organization's default phone number is used.
|
|
185
|
+
sig { returns(T.nilable(String)) }
|
|
186
|
+
attr_accessor :from_phone_number
|
|
187
|
+
|
|
188
|
+
# When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
|
|
189
|
+
# trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
|
|
190
|
+
sig do
|
|
191
|
+
returns(
|
|
192
|
+
T.nilable(Revox::AssistantCreateParams::HumanTransferMode::OrSymbol)
|
|
193
|
+
)
|
|
194
|
+
end
|
|
195
|
+
attr_accessor :human_transfer_mode
|
|
196
|
+
|
|
105
197
|
# Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
|
|
106
198
|
# skip turns to navigate phone menus.
|
|
107
199
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -115,7 +207,9 @@ module Revox
|
|
|
115
207
|
T.nilable(
|
|
116
208
|
T.any(
|
|
117
209
|
Revox::AssistantCreateParams::LlmModel::UnionMember0,
|
|
118
|
-
Revox::AssistantCreateParams::LlmModel::UnionMember1
|
|
210
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember1,
|
|
211
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember2,
|
|
212
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3
|
|
119
213
|
)
|
|
120
214
|
)
|
|
121
215
|
)
|
|
@@ -127,12 +221,19 @@ module Revox
|
|
|
127
221
|
llm_model:
|
|
128
222
|
T.any(
|
|
129
223
|
Revox::AssistantCreateParams::LlmModel::UnionMember0::OrHash,
|
|
130
|
-
Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash
|
|
224
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash,
|
|
225
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember2::OrHash,
|
|
226
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::OrHash
|
|
131
227
|
)
|
|
132
228
|
).void
|
|
133
229
|
end
|
|
134
230
|
attr_writer :llm_model
|
|
135
231
|
|
|
232
|
+
# Public URL of the brand logo shown on the assistant's demo page. Upload a new
|
|
233
|
+
# logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
|
|
234
|
+
sig { returns(T.nilable(String)) }
|
|
235
|
+
attr_accessor :logo_url
|
|
236
|
+
|
|
136
237
|
# The maximum duration of the call in seconds. This is the maximum time the call
|
|
137
238
|
# will be allowed to run.
|
|
138
239
|
sig { returns(T.nilable(Float)) }
|
|
@@ -141,6 +242,63 @@ module Revox
|
|
|
141
242
|
sig { params(max_call_duration_secs: Float).void }
|
|
142
243
|
attr_writer :max_call_duration_secs
|
|
143
244
|
|
|
245
|
+
# Optional message the agent will say, without being interruptible, when the call
|
|
246
|
+
# reaches its max duration. Kept short so it fits inside the farewell buffer. If
|
|
247
|
+
# not set, the call ends silently.
|
|
248
|
+
sig { returns(T.nilable(String)) }
|
|
249
|
+
attr_accessor :max_duration_end_message
|
|
250
|
+
|
|
251
|
+
# Canvas position of this assistant's node in its multi-step flow editor.
|
|
252
|
+
sig { returns(T.nilable(Revox::AssistantCreateParams::Position)) }
|
|
253
|
+
attr_reader :position
|
|
254
|
+
|
|
255
|
+
sig do
|
|
256
|
+
params(
|
|
257
|
+
position: T.nilable(Revox::AssistantCreateParams::Position::OrHash)
|
|
258
|
+
).void
|
|
259
|
+
end
|
|
260
|
+
attr_writer :position
|
|
261
|
+
|
|
262
|
+
# Visual prompt constructor data (nodes, edges, positions). Used by the UI to
|
|
263
|
+
# re-open the visual editor. Does not affect call behavior — the flattened prompt
|
|
264
|
+
# field is what the LLM receives.
|
|
265
|
+
sig { returns(T.nilable(Revox::AssistantCreateParams::PromptFlow)) }
|
|
266
|
+
attr_reader :prompt_flow
|
|
267
|
+
|
|
268
|
+
sig do
|
|
269
|
+
params(
|
|
270
|
+
prompt_flow:
|
|
271
|
+
T.nilable(Revox::AssistantCreateParams::PromptFlow::OrHash)
|
|
272
|
+
).void
|
|
273
|
+
end
|
|
274
|
+
attr_writer :prompt_flow
|
|
275
|
+
|
|
276
|
+
# Slack notification config. When set, posts a message to the chosen channel after
|
|
277
|
+
# a call ends with one of the configured outcomes.
|
|
278
|
+
sig { returns(T.nilable(Revox::AssistantCreateParams::Slack)) }
|
|
279
|
+
attr_reader :slack
|
|
280
|
+
|
|
281
|
+
sig do
|
|
282
|
+
params(
|
|
283
|
+
slack: T.nilable(Revox::AssistantCreateParams::Slack::OrHash)
|
|
284
|
+
).void
|
|
285
|
+
end
|
|
286
|
+
attr_writer :slack
|
|
287
|
+
|
|
288
|
+
# Enable SMS tool during calls. When enabled, the agent can send SMS messages to
|
|
289
|
+
# the user on the call.
|
|
290
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
291
|
+
attr_reader :sms_enabled
|
|
292
|
+
|
|
293
|
+
sig { params(sms_enabled: T::Boolean).void }
|
|
294
|
+
attr_writer :sms_enabled
|
|
295
|
+
|
|
296
|
+
# Hardcoded SMS template to send during calls. When set, this exact text is sent
|
|
297
|
+
# instead of letting the agent generate the message. Supports {{variable}}
|
|
298
|
+
# placeholders.
|
|
299
|
+
sig { returns(T.nilable(String)) }
|
|
300
|
+
attr_accessor :sms_template
|
|
301
|
+
|
|
144
302
|
# The structured output config to use for the call. This is used to extract the
|
|
145
303
|
# data from the call (like email, name, company name, etc.).
|
|
146
304
|
sig do
|
|
@@ -162,11 +320,77 @@ module Revox
|
|
|
162
320
|
end
|
|
163
321
|
attr_writer :structured_output_config
|
|
164
322
|
|
|
323
|
+
# Custom prompt for structured data extraction. If not provided, a default prompt
|
|
324
|
+
# is used. Available variables: {{transcript}}, {{call_direction}},
|
|
325
|
+
# {{user_phone_number}}, {{agent_phone_number}}.
|
|
326
|
+
sig { returns(T.nilable(String)) }
|
|
327
|
+
attr_accessor :structured_output_prompt
|
|
328
|
+
|
|
329
|
+
# Assistant-level speech-to-text context: structured `general` key/value pairs
|
|
330
|
+
# plus a list of domain `terms`. Prompt-derived context is merged in without
|
|
331
|
+
# replacing existing entries.
|
|
332
|
+
sig { returns(T.nilable(Revox::AssistantCreateParams::SttContext)) }
|
|
333
|
+
attr_reader :stt_context
|
|
334
|
+
|
|
335
|
+
sig do
|
|
336
|
+
params(
|
|
337
|
+
stt_context:
|
|
338
|
+
T.nilable(Revox::AssistantCreateParams::SttContext::OrHash)
|
|
339
|
+
).void
|
|
340
|
+
end
|
|
341
|
+
attr_writer :stt_context
|
|
342
|
+
|
|
343
|
+
# Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
|
|
344
|
+
# when omitted.
|
|
345
|
+
sig do
|
|
346
|
+
returns(T.nilable(Revox::AssistantCreateParams::SttModel::OrSymbol))
|
|
347
|
+
end
|
|
348
|
+
attr_reader :stt_model
|
|
349
|
+
|
|
350
|
+
sig do
|
|
351
|
+
params(stt_model: Revox::AssistantCreateParams::SttModel::OrSymbol).void
|
|
352
|
+
end
|
|
353
|
+
attr_writer :stt_model
|
|
354
|
+
|
|
355
|
+
# Audio clip to play while the agent is processing a response. One of the built-in
|
|
356
|
+
# LiveKit audio clips; null/omitted disables it.
|
|
357
|
+
sig do
|
|
358
|
+
returns(
|
|
359
|
+
T.nilable(Revox::AssistantCreateParams::ThinkingSound::OrSymbol)
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
attr_accessor :thinking_sound
|
|
363
|
+
|
|
364
|
+
# Probability [0..1] that the thinking sound plays on any given turn; otherwise
|
|
365
|
+
# the agent is silent while thinking.
|
|
366
|
+
sig { returns(T.nilable(Float)) }
|
|
367
|
+
attr_reader :thinking_sound_probability
|
|
368
|
+
|
|
369
|
+
sig { params(thinking_sound_probability: Float).void }
|
|
370
|
+
attr_writer :thinking_sound_probability
|
|
371
|
+
|
|
372
|
+
# Volume of the thinking sound (0 = silent, 1 = max).
|
|
373
|
+
sig { returns(T.nilable(Float)) }
|
|
374
|
+
attr_reader :thinking_sound_volume
|
|
375
|
+
|
|
376
|
+
sig { params(thinking_sound_volume: Float).void }
|
|
377
|
+
attr_writer :thinking_sound_volume
|
|
378
|
+
|
|
165
379
|
# Phone number to transfer calls to when users request to speak to a human agent
|
|
166
380
|
# in E.164 format (e.g. +1234567890).
|
|
167
381
|
sig { returns(T.nilable(String)) }
|
|
168
382
|
attr_accessor :transfer_phone_number
|
|
169
383
|
|
|
384
|
+
# Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
|
|
385
|
+
# orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
|
|
386
|
+
# multi-step flow (hidden from the assistants list). Flow transitions are managed
|
|
387
|
+
# via the /assistants/:id/edges endpoints, not on the assistant itself.
|
|
388
|
+
sig { returns(T.nilable(Revox::AssistantCreateParams::Type::OrSymbol)) }
|
|
389
|
+
attr_reader :type
|
|
390
|
+
|
|
391
|
+
sig { params(type: Revox::AssistantCreateParams::Type::OrSymbol).void }
|
|
392
|
+
attr_writer :type
|
|
393
|
+
|
|
170
394
|
# The voice to use for the call. You can get the list of voices using the /voices
|
|
171
395
|
# endpoint
|
|
172
396
|
sig { returns(T.nilable(Revox::AssistantCreateParams::Voice)) }
|
|
@@ -180,6 +404,17 @@ module Revox
|
|
|
180
404
|
sig { returns(T.nilable(String)) }
|
|
181
405
|
attr_accessor :voicemail_message
|
|
182
406
|
|
|
407
|
+
# SMS message to send when the call reaches voicemail. Supports {{variable}}
|
|
408
|
+
# placeholders. When null, no SMS is sent on voicemail.
|
|
409
|
+
sig { returns(T.nilable(String)) }
|
|
410
|
+
attr_accessor :voicemail_sms_prompt
|
|
411
|
+
|
|
412
|
+
# When using warm transfer: extra instructions for the supervisor handoff summary.
|
|
413
|
+
# If null or empty, the API uses the product default briefing when the call is
|
|
414
|
+
# loaded for the agent.
|
|
415
|
+
sig { returns(T.nilable(String)) }
|
|
416
|
+
attr_accessor :warm_transfer_summary_instructions
|
|
417
|
+
|
|
183
418
|
# The webhook URL to call when the call is completed.
|
|
184
419
|
sig { returns(T.nilable(String)) }
|
|
185
420
|
attr_reader :webhook_url
|
|
@@ -187,36 +422,96 @@ module Revox
|
|
|
187
422
|
sig { params(webhook_url: String).void }
|
|
188
423
|
attr_writer :webhook_url
|
|
189
424
|
|
|
425
|
+
# Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
|
|
426
|
+
# into the chosen module and attaches a Note with the call summary after a call
|
|
427
|
+
# ends with one of the configured outcomes.
|
|
428
|
+
sig { returns(T.nilable(Revox::AssistantCreateParams::Zoho)) }
|
|
429
|
+
attr_reader :zoho
|
|
430
|
+
|
|
431
|
+
sig do
|
|
432
|
+
params(zoho: T.nilable(Revox::AssistantCreateParams::Zoho::OrHash)).void
|
|
433
|
+
end
|
|
434
|
+
attr_writer :zoho
|
|
435
|
+
|
|
190
436
|
sig do
|
|
191
437
|
params(
|
|
192
438
|
name: String,
|
|
193
439
|
prompt: String,
|
|
440
|
+
after_call_sms_outcomes:
|
|
441
|
+
T.nilable(
|
|
442
|
+
T::Array[
|
|
443
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::OrSymbol
|
|
444
|
+
]
|
|
445
|
+
),
|
|
446
|
+
after_call_sms_prompt: T.nilable(String),
|
|
194
447
|
background_sound:
|
|
195
448
|
T.nilable(Revox::AssistantCreateParams::BackgroundSound::OrSymbol),
|
|
196
|
-
|
|
449
|
+
background_sound_volume: Float,
|
|
450
|
+
calendly: T.nilable(Revox::AssistantCreateParams::Calendly::OrHash),
|
|
197
451
|
call_retry_config:
|
|
198
452
|
Revox::AssistantCreateParams::CallRetryConfig::OrHash,
|
|
453
|
+
cartesia_dictionary_pronunciation_id: T.nilable(String),
|
|
454
|
+
custom_tools:
|
|
455
|
+
T.nilable(
|
|
456
|
+
T::Array[Revox::AssistantCreateParams::CustomTool::OrHash]
|
|
457
|
+
),
|
|
458
|
+
email_notification_address: T.nilable(String),
|
|
459
|
+
email_notification_language:
|
|
460
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol,
|
|
461
|
+
email_notification_outcomes:
|
|
462
|
+
T.nilable(
|
|
463
|
+
T::Array[
|
|
464
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::OrSymbol
|
|
465
|
+
]
|
|
466
|
+
),
|
|
199
467
|
end_of_call_sentence: String,
|
|
200
468
|
faq_items: T::Array[Revox::AssistantCreateParams::FaqItem::OrHash],
|
|
201
469
|
first_sentence: String,
|
|
202
470
|
first_sentence_delay_ms: Integer,
|
|
203
471
|
first_sentence_mode:
|
|
204
472
|
Revox::AssistantCreateParams::FirstSentenceMode::OrSymbol,
|
|
473
|
+
from_phone_number: T.nilable(String),
|
|
474
|
+
human_transfer_mode:
|
|
475
|
+
T.nilable(
|
|
476
|
+
Revox::AssistantCreateParams::HumanTransferMode::OrSymbol
|
|
477
|
+
),
|
|
205
478
|
ivr_navigation_enabled: T::Boolean,
|
|
206
479
|
llm_model:
|
|
207
480
|
T.any(
|
|
208
481
|
Revox::AssistantCreateParams::LlmModel::UnionMember0::OrHash,
|
|
209
|
-
Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash
|
|
482
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember1::OrHash,
|
|
483
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember2::OrHash,
|
|
484
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::OrHash
|
|
210
485
|
),
|
|
486
|
+
logo_url: T.nilable(String),
|
|
211
487
|
max_call_duration_secs: Float,
|
|
488
|
+
max_duration_end_message: T.nilable(String),
|
|
489
|
+
position: T.nilable(Revox::AssistantCreateParams::Position::OrHash),
|
|
490
|
+
prompt_flow:
|
|
491
|
+
T.nilable(Revox::AssistantCreateParams::PromptFlow::OrHash),
|
|
492
|
+
slack: T.nilable(Revox::AssistantCreateParams::Slack::OrHash),
|
|
493
|
+
sms_enabled: T::Boolean,
|
|
494
|
+
sms_template: T.nilable(String),
|
|
212
495
|
structured_output_config:
|
|
213
496
|
T::Array[
|
|
214
497
|
Revox::AssistantCreateParams::StructuredOutputConfig::OrHash
|
|
215
498
|
],
|
|
499
|
+
structured_output_prompt: T.nilable(String),
|
|
500
|
+
stt_context:
|
|
501
|
+
T.nilable(Revox::AssistantCreateParams::SttContext::OrHash),
|
|
502
|
+
stt_model: Revox::AssistantCreateParams::SttModel::OrSymbol,
|
|
503
|
+
thinking_sound:
|
|
504
|
+
T.nilable(Revox::AssistantCreateParams::ThinkingSound::OrSymbol),
|
|
505
|
+
thinking_sound_probability: Float,
|
|
506
|
+
thinking_sound_volume: Float,
|
|
216
507
|
transfer_phone_number: T.nilable(String),
|
|
508
|
+
type: Revox::AssistantCreateParams::Type::OrSymbol,
|
|
217
509
|
voice: Revox::AssistantCreateParams::Voice::OrHash,
|
|
218
510
|
voicemail_message: T.nilable(String),
|
|
511
|
+
voicemail_sms_prompt: T.nilable(String),
|
|
512
|
+
warm_transfer_summary_instructions: T.nilable(String),
|
|
219
513
|
webhook_url: String,
|
|
514
|
+
zoho: T.nilable(Revox::AssistantCreateParams::Zoho::OrHash),
|
|
220
515
|
request_options: Revox::RequestOptions::OrHash
|
|
221
516
|
).returns(T.attached_class)
|
|
222
517
|
end
|
|
@@ -224,13 +519,37 @@ module Revox
|
|
|
224
519
|
name:,
|
|
225
520
|
# The prompt to use for the call. This will be given to the LLM (gpt-4.1)
|
|
226
521
|
prompt:,
|
|
227
|
-
#
|
|
228
|
-
#
|
|
522
|
+
# Which call outcomes trigger the after-call SMS. When empty or null, no
|
|
523
|
+
# after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
|
|
524
|
+
# when outcome is null.
|
|
525
|
+
after_call_sms_outcomes: nil,
|
|
526
|
+
# Prompt / instructions for the after-call SMS. Supports {{variable}}
|
|
527
|
+
# placeholders. When null, no after-call SMS is sent.
|
|
528
|
+
after_call_sms_prompt: nil,
|
|
529
|
+
# Ambient background sound to play during the call. null/omitted disables it.
|
|
229
530
|
background_sound: nil,
|
|
531
|
+
# Volume of the ambient background sound (0 = silent, 1 = max).
|
|
532
|
+
background_sound_volume: nil,
|
|
230
533
|
calendly: nil,
|
|
231
534
|
# Configuration for call retry behavior including time windows, delays, and max
|
|
232
535
|
# iterations. If not provided, defaults will be used.
|
|
233
536
|
call_retry_config: nil,
|
|
537
|
+
# Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
|
|
538
|
+
# Set null to unlink it.
|
|
539
|
+
cartesia_dictionary_pronunciation_id: nil,
|
|
540
|
+
# Custom API tools the assistant can call during conversations. Each tool defines
|
|
541
|
+
# an HTTP endpoint with variable substitution.
|
|
542
|
+
custom_tools: nil,
|
|
543
|
+
# Email address(es) to receive notifications when a call ends with a matching
|
|
544
|
+
# outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
|
|
545
|
+
# bob@y.com").
|
|
546
|
+
email_notification_address: nil,
|
|
547
|
+
# The language used for the notification email content. One of "en" or "fr".
|
|
548
|
+
# Defaults to "en".
|
|
549
|
+
email_notification_language: nil,
|
|
550
|
+
# Which call outcomes trigger an email notification. E.g. ["interested",
|
|
551
|
+
# "completed", "none"]. Use "none" when outcome is null.
|
|
552
|
+
email_notification_outcomes: nil,
|
|
234
553
|
# Optional message to say when the agent decides to end the call.
|
|
235
554
|
end_of_call_sentence: nil,
|
|
236
555
|
# FAQ items to associate with this assistant. When provided, replaces all existing
|
|
@@ -245,27 +564,92 @@ module Revox
|
|
|
245
564
|
# first_sentence will be spoken exactly as provided. "none" means the agent will
|
|
246
565
|
# not speak first and will wait for the user.
|
|
247
566
|
first_sentence_mode: nil,
|
|
567
|
+
# Override the default outbound phone number for calls placed with this assistant.
|
|
568
|
+
# Must be a phone number owned by the organization in E.164 format (e.g.
|
|
569
|
+
# +1234567890). When null, the organization's default phone number is used.
|
|
570
|
+
from_phone_number: nil,
|
|
571
|
+
# When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
|
|
572
|
+
# trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
|
|
573
|
+
human_transfer_mode: nil,
|
|
248
574
|
# Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
|
|
249
575
|
# skip turns to navigate phone menus.
|
|
250
576
|
ivr_navigation_enabled: nil,
|
|
251
577
|
llm_model: nil,
|
|
578
|
+
# Public URL of the brand logo shown on the assistant's demo page. Upload a new
|
|
579
|
+
# logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
|
|
580
|
+
logo_url: nil,
|
|
252
581
|
# The maximum duration of the call in seconds. This is the maximum time the call
|
|
253
582
|
# will be allowed to run.
|
|
254
583
|
max_call_duration_secs: nil,
|
|
584
|
+
# Optional message the agent will say, without being interruptible, when the call
|
|
585
|
+
# reaches its max duration. Kept short so it fits inside the farewell buffer. If
|
|
586
|
+
# not set, the call ends silently.
|
|
587
|
+
max_duration_end_message: nil,
|
|
588
|
+
# Canvas position of this assistant's node in its multi-step flow editor.
|
|
589
|
+
position: nil,
|
|
590
|
+
# Visual prompt constructor data (nodes, edges, positions). Used by the UI to
|
|
591
|
+
# re-open the visual editor. Does not affect call behavior — the flattened prompt
|
|
592
|
+
# field is what the LLM receives.
|
|
593
|
+
prompt_flow: nil,
|
|
594
|
+
# Slack notification config. When set, posts a message to the chosen channel after
|
|
595
|
+
# a call ends with one of the configured outcomes.
|
|
596
|
+
slack: nil,
|
|
597
|
+
# Enable SMS tool during calls. When enabled, the agent can send SMS messages to
|
|
598
|
+
# the user on the call.
|
|
599
|
+
sms_enabled: nil,
|
|
600
|
+
# Hardcoded SMS template to send during calls. When set, this exact text is sent
|
|
601
|
+
# instead of letting the agent generate the message. Supports {{variable}}
|
|
602
|
+
# placeholders.
|
|
603
|
+
sms_template: nil,
|
|
255
604
|
# The structured output config to use for the call. This is used to extract the
|
|
256
605
|
# data from the call (like email, name, company name, etc.).
|
|
257
606
|
structured_output_config: nil,
|
|
607
|
+
# Custom prompt for structured data extraction. If not provided, a default prompt
|
|
608
|
+
# is used. Available variables: {{transcript}}, {{call_direction}},
|
|
609
|
+
# {{user_phone_number}}, {{agent_phone_number}}.
|
|
610
|
+
structured_output_prompt: nil,
|
|
611
|
+
# Assistant-level speech-to-text context: structured `general` key/value pairs
|
|
612
|
+
# plus a list of domain `terms`. Prompt-derived context is merged in without
|
|
613
|
+
# replacing existing entries.
|
|
614
|
+
stt_context: nil,
|
|
615
|
+
# Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
|
|
616
|
+
# when omitted.
|
|
617
|
+
stt_model: nil,
|
|
618
|
+
# Audio clip to play while the agent is processing a response. One of the built-in
|
|
619
|
+
# LiveKit audio clips; null/omitted disables it.
|
|
620
|
+
thinking_sound: nil,
|
|
621
|
+
# Probability [0..1] that the thinking sound plays on any given turn; otherwise
|
|
622
|
+
# the agent is silent while thinking.
|
|
623
|
+
thinking_sound_probability: nil,
|
|
624
|
+
# Volume of the thinking sound (0 = silent, 1 = max).
|
|
625
|
+
thinking_sound_volume: nil,
|
|
258
626
|
# Phone number to transfer calls to when users request to speak to a human agent
|
|
259
627
|
# in E.164 format (e.g. +1234567890).
|
|
260
628
|
transfer_phone_number: nil,
|
|
629
|
+
# Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
|
|
630
|
+
# orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
|
|
631
|
+
# multi-step flow (hidden from the assistants list). Flow transitions are managed
|
|
632
|
+
# via the /assistants/:id/edges endpoints, not on the assistant itself.
|
|
633
|
+
type: nil,
|
|
261
634
|
# The voice to use for the call. You can get the list of voices using the /voices
|
|
262
635
|
# endpoint
|
|
263
636
|
voice: nil,
|
|
264
637
|
# If set, when voicemail is detected the agent will speak this message then hang
|
|
265
638
|
# up; if null, hang up immediately.
|
|
266
639
|
voicemail_message: nil,
|
|
640
|
+
# SMS message to send when the call reaches voicemail. Supports {{variable}}
|
|
641
|
+
# placeholders. When null, no SMS is sent on voicemail.
|
|
642
|
+
voicemail_sms_prompt: nil,
|
|
643
|
+
# When using warm transfer: extra instructions for the supervisor handoff summary.
|
|
644
|
+
# If null or empty, the API uses the product default briefing when the call is
|
|
645
|
+
# loaded for the agent.
|
|
646
|
+
warm_transfer_summary_instructions: nil,
|
|
267
647
|
# The webhook URL to call when the call is completed.
|
|
268
648
|
webhook_url: nil,
|
|
649
|
+
# Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
|
|
650
|
+
# into the chosen module and attaches a Note with the call summary after a call
|
|
651
|
+
# ends with one of the configured outcomes.
|
|
652
|
+
zoho: nil,
|
|
269
653
|
request_options: {}
|
|
270
654
|
)
|
|
271
655
|
end
|
|
@@ -275,31 +659,76 @@ module Revox
|
|
|
275
659
|
{
|
|
276
660
|
name: String,
|
|
277
661
|
prompt: String,
|
|
662
|
+
after_call_sms_outcomes:
|
|
663
|
+
T.nilable(
|
|
664
|
+
T::Array[
|
|
665
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::OrSymbol
|
|
666
|
+
]
|
|
667
|
+
),
|
|
668
|
+
after_call_sms_prompt: T.nilable(String),
|
|
278
669
|
background_sound:
|
|
279
670
|
T.nilable(
|
|
280
671
|
Revox::AssistantCreateParams::BackgroundSound::OrSymbol
|
|
281
672
|
),
|
|
282
|
-
|
|
673
|
+
background_sound_volume: Float,
|
|
674
|
+
calendly: T.nilable(Revox::AssistantCreateParams::Calendly),
|
|
283
675
|
call_retry_config: Revox::AssistantCreateParams::CallRetryConfig,
|
|
676
|
+
cartesia_dictionary_pronunciation_id: T.nilable(String),
|
|
677
|
+
custom_tools:
|
|
678
|
+
T.nilable(T::Array[Revox::AssistantCreateParams::CustomTool]),
|
|
679
|
+
email_notification_address: T.nilable(String),
|
|
680
|
+
email_notification_language:
|
|
681
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage::OrSymbol,
|
|
682
|
+
email_notification_outcomes:
|
|
683
|
+
T.nilable(
|
|
684
|
+
T::Array[
|
|
685
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::OrSymbol
|
|
686
|
+
]
|
|
687
|
+
),
|
|
284
688
|
end_of_call_sentence: String,
|
|
285
689
|
faq_items: T::Array[Revox::AssistantCreateParams::FaqItem],
|
|
286
690
|
first_sentence: String,
|
|
287
691
|
first_sentence_delay_ms: Integer,
|
|
288
692
|
first_sentence_mode:
|
|
289
693
|
Revox::AssistantCreateParams::FirstSentenceMode::OrSymbol,
|
|
694
|
+
from_phone_number: T.nilable(String),
|
|
695
|
+
human_transfer_mode:
|
|
696
|
+
T.nilable(
|
|
697
|
+
Revox::AssistantCreateParams::HumanTransferMode::OrSymbol
|
|
698
|
+
),
|
|
290
699
|
ivr_navigation_enabled: T::Boolean,
|
|
291
700
|
llm_model:
|
|
292
701
|
T.any(
|
|
293
702
|
Revox::AssistantCreateParams::LlmModel::UnionMember0,
|
|
294
|
-
Revox::AssistantCreateParams::LlmModel::UnionMember1
|
|
703
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember1,
|
|
704
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember2,
|
|
705
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3
|
|
295
706
|
),
|
|
707
|
+
logo_url: T.nilable(String),
|
|
296
708
|
max_call_duration_secs: Float,
|
|
709
|
+
max_duration_end_message: T.nilable(String),
|
|
710
|
+
position: T.nilable(Revox::AssistantCreateParams::Position),
|
|
711
|
+
prompt_flow: T.nilable(Revox::AssistantCreateParams::PromptFlow),
|
|
712
|
+
slack: T.nilable(Revox::AssistantCreateParams::Slack),
|
|
713
|
+
sms_enabled: T::Boolean,
|
|
714
|
+
sms_template: T.nilable(String),
|
|
297
715
|
structured_output_config:
|
|
298
716
|
T::Array[Revox::AssistantCreateParams::StructuredOutputConfig],
|
|
717
|
+
structured_output_prompt: T.nilable(String),
|
|
718
|
+
stt_context: T.nilable(Revox::AssistantCreateParams::SttContext),
|
|
719
|
+
stt_model: Revox::AssistantCreateParams::SttModel::OrSymbol,
|
|
720
|
+
thinking_sound:
|
|
721
|
+
T.nilable(Revox::AssistantCreateParams::ThinkingSound::OrSymbol),
|
|
722
|
+
thinking_sound_probability: Float,
|
|
723
|
+
thinking_sound_volume: Float,
|
|
299
724
|
transfer_phone_number: T.nilable(String),
|
|
725
|
+
type: Revox::AssistantCreateParams::Type::OrSymbol,
|
|
300
726
|
voice: Revox::AssistantCreateParams::Voice,
|
|
301
727
|
voicemail_message: T.nilable(String),
|
|
728
|
+
voicemail_sms_prompt: T.nilable(String),
|
|
729
|
+
warm_transfer_summary_instructions: T.nilable(String),
|
|
302
730
|
webhook_url: String,
|
|
731
|
+
zoho: T.nilable(Revox::AssistantCreateParams::Zoho),
|
|
303
732
|
request_options: Revox::RequestOptions
|
|
304
733
|
}
|
|
305
734
|
)
|
|
@@ -307,8 +736,68 @@ module Revox
|
|
|
307
736
|
def to_hash
|
|
308
737
|
end
|
|
309
738
|
|
|
310
|
-
|
|
311
|
-
|
|
739
|
+
module AfterCallSMSOutcome
|
|
740
|
+
extend Revox::Internal::Type::Enum
|
|
741
|
+
|
|
742
|
+
TaggedSymbol =
|
|
743
|
+
T.type_alias do
|
|
744
|
+
T.all(Symbol, Revox::AssistantCreateParams::AfterCallSMSOutcome)
|
|
745
|
+
end
|
|
746
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
747
|
+
|
|
748
|
+
NOT_INTERESTED =
|
|
749
|
+
T.let(
|
|
750
|
+
:not_interested,
|
|
751
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
752
|
+
)
|
|
753
|
+
INTERESTED =
|
|
754
|
+
T.let(
|
|
755
|
+
:interested,
|
|
756
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
757
|
+
)
|
|
758
|
+
COMPLETED =
|
|
759
|
+
T.let(
|
|
760
|
+
:completed,
|
|
761
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
762
|
+
)
|
|
763
|
+
REQUESTED_CALLBACK_LATER =
|
|
764
|
+
T.let(
|
|
765
|
+
:requested_callback_later,
|
|
766
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
767
|
+
)
|
|
768
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
769
|
+
T.let(
|
|
770
|
+
:requested_callback_new_number,
|
|
771
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
772
|
+
)
|
|
773
|
+
DO_NOT_CONTACT =
|
|
774
|
+
T.let(
|
|
775
|
+
:do_not_contact,
|
|
776
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
777
|
+
)
|
|
778
|
+
AI_AVERSE =
|
|
779
|
+
T.let(
|
|
780
|
+
:ai_averse,
|
|
781
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
782
|
+
)
|
|
783
|
+
NONE =
|
|
784
|
+
T.let(
|
|
785
|
+
:none,
|
|
786
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
sig do
|
|
790
|
+
override.returns(
|
|
791
|
+
T::Array[
|
|
792
|
+
Revox::AssistantCreateParams::AfterCallSMSOutcome::TaggedSymbol
|
|
793
|
+
]
|
|
794
|
+
)
|
|
795
|
+
end
|
|
796
|
+
def self.values
|
|
797
|
+
end
|
|
798
|
+
end
|
|
799
|
+
|
|
800
|
+
# Ambient background sound to play during the call. null/omitted disables it.
|
|
312
801
|
module BackgroundSound
|
|
313
802
|
extend Revox::Internal::Type::Enum
|
|
314
803
|
|
|
@@ -383,6 +872,24 @@ module Revox
|
|
|
383
872
|
)
|
|
384
873
|
end
|
|
385
874
|
|
|
875
|
+
# Days of the week when calls are allowed, in the recipient's timezone. Default:
|
|
876
|
+
# Monday through Friday.
|
|
877
|
+
sig do
|
|
878
|
+
returns(
|
|
879
|
+
T::Array[
|
|
880
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
881
|
+
]
|
|
882
|
+
)
|
|
883
|
+
end
|
|
884
|
+
attr_accessor :allowed_days
|
|
885
|
+
|
|
886
|
+
# If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
|
|
887
|
+
# retry_delay_seconds) when attempt #1 didn't reach a human.
|
|
888
|
+
# Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
|
|
889
|
+
# Default: false.
|
|
890
|
+
sig { returns(T::Boolean) }
|
|
891
|
+
attr_accessor :call_twice_in_a_row
|
|
892
|
+
|
|
386
893
|
sig do
|
|
387
894
|
returns(
|
|
388
895
|
T::Array[
|
|
@@ -406,6 +913,11 @@ module Revox
|
|
|
406
913
|
# iterations. If not provided, defaults will be used.
|
|
407
914
|
sig do
|
|
408
915
|
params(
|
|
916
|
+
allowed_days:
|
|
917
|
+
T::Array[
|
|
918
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
919
|
+
],
|
|
920
|
+
call_twice_in_a_row: T::Boolean,
|
|
409
921
|
calling_windows:
|
|
410
922
|
T::Array[
|
|
411
923
|
Revox::AssistantCreateParams::CallRetryConfig::CallingWindow::OrHash
|
|
@@ -415,6 +927,14 @@ module Revox
|
|
|
415
927
|
).returns(T.attached_class)
|
|
416
928
|
end
|
|
417
929
|
def self.new(
|
|
930
|
+
# Days of the week when calls are allowed, in the recipient's timezone. Default:
|
|
931
|
+
# Monday through Friday.
|
|
932
|
+
allowed_days:,
|
|
933
|
+
# If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
|
|
934
|
+
# retry_delay_seconds) when attempt #1 didn't reach a human.
|
|
935
|
+
# Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
|
|
936
|
+
# Default: false.
|
|
937
|
+
call_twice_in_a_row:,
|
|
418
938
|
calling_windows:,
|
|
419
939
|
# Maximum number of call retry attempts. Default: 3.
|
|
420
940
|
max_retry_attempts:,
|
|
@@ -428,6 +948,11 @@ module Revox
|
|
|
428
948
|
sig do
|
|
429
949
|
override.returns(
|
|
430
950
|
{
|
|
951
|
+
allowed_days:
|
|
952
|
+
T::Array[
|
|
953
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::OrSymbol
|
|
954
|
+
],
|
|
955
|
+
call_twice_in_a_row: T::Boolean,
|
|
431
956
|
calling_windows:
|
|
432
957
|
T::Array[
|
|
433
958
|
Revox::AssistantCreateParams::CallRetryConfig::CallingWindow
|
|
@@ -440,6 +965,65 @@ module Revox
|
|
|
440
965
|
def to_hash
|
|
441
966
|
end
|
|
442
967
|
|
|
968
|
+
module AllowedDay
|
|
969
|
+
extend Revox::Internal::Type::Enum
|
|
970
|
+
|
|
971
|
+
TaggedSymbol =
|
|
972
|
+
T.type_alias do
|
|
973
|
+
T.all(
|
|
974
|
+
Symbol,
|
|
975
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay
|
|
976
|
+
)
|
|
977
|
+
end
|
|
978
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
979
|
+
|
|
980
|
+
MONDAY =
|
|
981
|
+
T.let(
|
|
982
|
+
:monday,
|
|
983
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
984
|
+
)
|
|
985
|
+
TUESDAY =
|
|
986
|
+
T.let(
|
|
987
|
+
:tuesday,
|
|
988
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
989
|
+
)
|
|
990
|
+
WEDNESDAY =
|
|
991
|
+
T.let(
|
|
992
|
+
:wednesday,
|
|
993
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
994
|
+
)
|
|
995
|
+
THURSDAY =
|
|
996
|
+
T.let(
|
|
997
|
+
:thursday,
|
|
998
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
999
|
+
)
|
|
1000
|
+
FRIDAY =
|
|
1001
|
+
T.let(
|
|
1002
|
+
:friday,
|
|
1003
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1004
|
+
)
|
|
1005
|
+
SATURDAY =
|
|
1006
|
+
T.let(
|
|
1007
|
+
:saturday,
|
|
1008
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1009
|
+
)
|
|
1010
|
+
SUNDAY =
|
|
1011
|
+
T.let(
|
|
1012
|
+
:sunday,
|
|
1013
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1014
|
+
)
|
|
1015
|
+
|
|
1016
|
+
sig do
|
|
1017
|
+
override.returns(
|
|
1018
|
+
T::Array[
|
|
1019
|
+
Revox::AssistantCreateParams::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1020
|
+
]
|
|
1021
|
+
)
|
|
1022
|
+
end
|
|
1023
|
+
def self.values
|
|
1024
|
+
end
|
|
1025
|
+
end
|
|
1026
|
+
|
|
443
1027
|
class CallingWindow < Revox::Internal::Type::BaseModel
|
|
444
1028
|
OrHash =
|
|
445
1029
|
T.type_alias do
|
|
@@ -500,54 +1084,498 @@ module Revox
|
|
|
500
1084
|
end
|
|
501
1085
|
end
|
|
502
1086
|
|
|
503
|
-
class
|
|
1087
|
+
class CustomTool < Revox::Internal::Type::BaseModel
|
|
504
1088
|
OrHash =
|
|
505
1089
|
T.type_alias do
|
|
506
1090
|
T.any(
|
|
507
|
-
Revox::AssistantCreateParams::
|
|
1091
|
+
Revox::AssistantCreateParams::CustomTool,
|
|
508
1092
|
Revox::Internal::AnyHash
|
|
509
1093
|
)
|
|
510
1094
|
end
|
|
511
1095
|
|
|
512
|
-
|
|
513
|
-
|
|
1096
|
+
# JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
|
|
1097
|
+
# "{{name}}") for dynamic values
|
|
1098
|
+
sig { returns(T.nilable(String)) }
|
|
1099
|
+
attr_accessor :body_template
|
|
514
1100
|
|
|
1101
|
+
# Human-readable description of what the tool does, used by the LLM to decide when
|
|
1102
|
+
# to call it
|
|
515
1103
|
sig { returns(String) }
|
|
516
|
-
attr_accessor :
|
|
1104
|
+
attr_accessor :description
|
|
517
1105
|
|
|
1106
|
+
# HTTP headers to include in the request. Values support {{variable}} placeholders
|
|
518
1107
|
sig do
|
|
519
|
-
|
|
520
|
-
end
|
|
521
|
-
def self.new(answer:, question:)
|
|
1108
|
+
returns(T::Array[Revox::AssistantCreateParams::CustomTool::Header])
|
|
522
1109
|
end
|
|
1110
|
+
attr_accessor :headers
|
|
523
1111
|
|
|
524
|
-
|
|
525
|
-
|
|
1112
|
+
# Schema defining the parameters the LLM should extract from the conversation to
|
|
1113
|
+
# pass to this tool
|
|
1114
|
+
sig do
|
|
1115
|
+
returns(
|
|
1116
|
+
T::Array[Revox::AssistantCreateParams::CustomTool::InputSchema]
|
|
1117
|
+
)
|
|
526
1118
|
end
|
|
527
|
-
|
|
1119
|
+
attr_accessor :input_schema
|
|
528
1120
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
extend Revox::Internal::Type::Enum
|
|
1121
|
+
# HTTP method to use when calling the API endpoint
|
|
1122
|
+
sig do
|
|
1123
|
+
returns(Revox::AssistantCreateParams::CustomTool::Method::OrSymbol)
|
|
1124
|
+
end
|
|
1125
|
+
attr_accessor :method_
|
|
535
1126
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
end
|
|
540
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1127
|
+
# Unique tool name in lowercase_snake_case (e.g. check_inventory)
|
|
1128
|
+
sig { returns(String) }
|
|
1129
|
+
attr_accessor :name
|
|
541
1130
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
1131
|
+
# Query string parameters appended to the URL. Values support {{variable}}
|
|
1132
|
+
# placeholders
|
|
1133
|
+
sig do
|
|
1134
|
+
returns(
|
|
1135
|
+
T::Array[Revox::AssistantCreateParams::CustomTool::QueryParam]
|
|
546
1136
|
)
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
1137
|
+
end
|
|
1138
|
+
attr_accessor :query_params
|
|
1139
|
+
|
|
1140
|
+
# Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
|
|
1141
|
+
# values
|
|
1142
|
+
sig { returns(String) }
|
|
1143
|
+
attr_accessor :url
|
|
1144
|
+
|
|
1145
|
+
sig do
|
|
1146
|
+
params(
|
|
1147
|
+
body_template: T.nilable(String),
|
|
1148
|
+
description: String,
|
|
1149
|
+
headers:
|
|
1150
|
+
T::Array[
|
|
1151
|
+
Revox::AssistantCreateParams::CustomTool::Header::OrHash
|
|
1152
|
+
],
|
|
1153
|
+
input_schema:
|
|
1154
|
+
T::Array[
|
|
1155
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::OrHash
|
|
1156
|
+
],
|
|
1157
|
+
method_: Revox::AssistantCreateParams::CustomTool::Method::OrSymbol,
|
|
1158
|
+
name: String,
|
|
1159
|
+
query_params:
|
|
1160
|
+
T::Array[
|
|
1161
|
+
Revox::AssistantCreateParams::CustomTool::QueryParam::OrHash
|
|
1162
|
+
],
|
|
1163
|
+
url: String
|
|
1164
|
+
).returns(T.attached_class)
|
|
1165
|
+
end
|
|
1166
|
+
def self.new(
|
|
1167
|
+
# JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
|
|
1168
|
+
# "{{name}}") for dynamic values
|
|
1169
|
+
body_template:,
|
|
1170
|
+
# Human-readable description of what the tool does, used by the LLM to decide when
|
|
1171
|
+
# to call it
|
|
1172
|
+
description:,
|
|
1173
|
+
# HTTP headers to include in the request. Values support {{variable}} placeholders
|
|
1174
|
+
headers:,
|
|
1175
|
+
# Schema defining the parameters the LLM should extract from the conversation to
|
|
1176
|
+
# pass to this tool
|
|
1177
|
+
input_schema:,
|
|
1178
|
+
# HTTP method to use when calling the API endpoint
|
|
1179
|
+
method_:,
|
|
1180
|
+
# Unique tool name in lowercase_snake_case (e.g. check_inventory)
|
|
1181
|
+
name:,
|
|
1182
|
+
# Query string parameters appended to the URL. Values support {{variable}}
|
|
1183
|
+
# placeholders
|
|
1184
|
+
query_params:,
|
|
1185
|
+
# Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
|
|
1186
|
+
# values
|
|
1187
|
+
url:
|
|
1188
|
+
)
|
|
1189
|
+
end
|
|
1190
|
+
|
|
1191
|
+
sig do
|
|
1192
|
+
override.returns(
|
|
1193
|
+
{
|
|
1194
|
+
body_template: T.nilable(String),
|
|
1195
|
+
description: String,
|
|
1196
|
+
headers:
|
|
1197
|
+
T::Array[Revox::AssistantCreateParams::CustomTool::Header],
|
|
1198
|
+
input_schema:
|
|
1199
|
+
T::Array[Revox::AssistantCreateParams::CustomTool::InputSchema],
|
|
1200
|
+
method_:
|
|
1201
|
+
Revox::AssistantCreateParams::CustomTool::Method::OrSymbol,
|
|
1202
|
+
name: String,
|
|
1203
|
+
query_params:
|
|
1204
|
+
T::Array[Revox::AssistantCreateParams::CustomTool::QueryParam],
|
|
1205
|
+
url: String
|
|
1206
|
+
}
|
|
1207
|
+
)
|
|
1208
|
+
end
|
|
1209
|
+
def to_hash
|
|
1210
|
+
end
|
|
1211
|
+
|
|
1212
|
+
class Header < Revox::Internal::Type::BaseModel
|
|
1213
|
+
OrHash =
|
|
1214
|
+
T.type_alias do
|
|
1215
|
+
T.any(
|
|
1216
|
+
Revox::AssistantCreateParams::CustomTool::Header,
|
|
1217
|
+
Revox::Internal::AnyHash
|
|
1218
|
+
)
|
|
1219
|
+
end
|
|
1220
|
+
|
|
1221
|
+
sig { returns(String) }
|
|
1222
|
+
attr_accessor :key
|
|
1223
|
+
|
|
1224
|
+
sig { returns(String) }
|
|
1225
|
+
attr_accessor :value
|
|
1226
|
+
|
|
1227
|
+
sig { params(key: String, value: String).returns(T.attached_class) }
|
|
1228
|
+
def self.new(key:, value:)
|
|
1229
|
+
end
|
|
1230
|
+
|
|
1231
|
+
sig { override.returns({ key: String, value: String }) }
|
|
1232
|
+
def to_hash
|
|
1233
|
+
end
|
|
1234
|
+
end
|
|
1235
|
+
|
|
1236
|
+
class InputSchema < Revox::Internal::Type::BaseModel
|
|
1237
|
+
OrHash =
|
|
1238
|
+
T.type_alias do
|
|
1239
|
+
T.any(
|
|
1240
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema,
|
|
1241
|
+
Revox::Internal::AnyHash
|
|
1242
|
+
)
|
|
1243
|
+
end
|
|
1244
|
+
|
|
1245
|
+
sig { returns(String) }
|
|
1246
|
+
attr_accessor :name
|
|
1247
|
+
|
|
1248
|
+
sig { returns(T::Boolean) }
|
|
1249
|
+
attr_accessor :required
|
|
1250
|
+
|
|
1251
|
+
sig do
|
|
1252
|
+
returns(
|
|
1253
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::OrSymbol
|
|
1254
|
+
)
|
|
1255
|
+
end
|
|
1256
|
+
attr_accessor :type
|
|
1257
|
+
|
|
1258
|
+
sig { returns(T.nilable(String)) }
|
|
1259
|
+
attr_reader :description
|
|
1260
|
+
|
|
1261
|
+
sig { params(description: String).void }
|
|
1262
|
+
attr_writer :description
|
|
1263
|
+
|
|
1264
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1265
|
+
attr_reader :enum_options
|
|
1266
|
+
|
|
1267
|
+
sig { params(enum_options: T::Array[String]).void }
|
|
1268
|
+
attr_writer :enum_options
|
|
1269
|
+
|
|
1270
|
+
sig do
|
|
1271
|
+
params(
|
|
1272
|
+
name: String,
|
|
1273
|
+
required: T::Boolean,
|
|
1274
|
+
type:
|
|
1275
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::OrSymbol,
|
|
1276
|
+
description: String,
|
|
1277
|
+
enum_options: T::Array[String]
|
|
1278
|
+
).returns(T.attached_class)
|
|
1279
|
+
end
|
|
1280
|
+
def self.new(
|
|
1281
|
+
name:,
|
|
1282
|
+
required:,
|
|
1283
|
+
type:,
|
|
1284
|
+
description: nil,
|
|
1285
|
+
enum_options: nil
|
|
1286
|
+
)
|
|
1287
|
+
end
|
|
1288
|
+
|
|
1289
|
+
sig do
|
|
1290
|
+
override.returns(
|
|
1291
|
+
{
|
|
1292
|
+
name: String,
|
|
1293
|
+
required: T::Boolean,
|
|
1294
|
+
type:
|
|
1295
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::OrSymbol,
|
|
1296
|
+
description: String,
|
|
1297
|
+
enum_options: T::Array[String]
|
|
1298
|
+
}
|
|
1299
|
+
)
|
|
1300
|
+
end
|
|
1301
|
+
def to_hash
|
|
1302
|
+
end
|
|
1303
|
+
|
|
1304
|
+
module Type
|
|
1305
|
+
extend Revox::Internal::Type::Enum
|
|
1306
|
+
|
|
1307
|
+
TaggedSymbol =
|
|
1308
|
+
T.type_alias do
|
|
1309
|
+
T.all(
|
|
1310
|
+
Symbol,
|
|
1311
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type
|
|
1312
|
+
)
|
|
1313
|
+
end
|
|
1314
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1315
|
+
|
|
1316
|
+
STRING =
|
|
1317
|
+
T.let(
|
|
1318
|
+
:string,
|
|
1319
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1320
|
+
)
|
|
1321
|
+
NUMBER =
|
|
1322
|
+
T.let(
|
|
1323
|
+
:number,
|
|
1324
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1325
|
+
)
|
|
1326
|
+
BOOLEAN =
|
|
1327
|
+
T.let(
|
|
1328
|
+
:boolean,
|
|
1329
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1330
|
+
)
|
|
1331
|
+
ENUM =
|
|
1332
|
+
T.let(
|
|
1333
|
+
:enum,
|
|
1334
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1335
|
+
)
|
|
1336
|
+
DATE =
|
|
1337
|
+
T.let(
|
|
1338
|
+
:date,
|
|
1339
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1340
|
+
)
|
|
1341
|
+
DATETIME =
|
|
1342
|
+
T.let(
|
|
1343
|
+
:datetime,
|
|
1344
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1345
|
+
)
|
|
1346
|
+
|
|
1347
|
+
sig do
|
|
1348
|
+
override.returns(
|
|
1349
|
+
T::Array[
|
|
1350
|
+
Revox::AssistantCreateParams::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1351
|
+
]
|
|
1352
|
+
)
|
|
1353
|
+
end
|
|
1354
|
+
def self.values
|
|
1355
|
+
end
|
|
1356
|
+
end
|
|
1357
|
+
end
|
|
1358
|
+
|
|
1359
|
+
# HTTP method to use when calling the API endpoint
|
|
1360
|
+
module Method
|
|
1361
|
+
extend Revox::Internal::Type::Enum
|
|
1362
|
+
|
|
1363
|
+
TaggedSymbol =
|
|
1364
|
+
T.type_alias do
|
|
1365
|
+
T.all(Symbol, Revox::AssistantCreateParams::CustomTool::Method)
|
|
1366
|
+
end
|
|
1367
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1368
|
+
|
|
1369
|
+
GET =
|
|
1370
|
+
T.let(
|
|
1371
|
+
:GET,
|
|
1372
|
+
Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
|
|
1373
|
+
)
|
|
1374
|
+
POST =
|
|
1375
|
+
T.let(
|
|
1376
|
+
:POST,
|
|
1377
|
+
Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
|
|
1378
|
+
)
|
|
1379
|
+
PUT =
|
|
1380
|
+
T.let(
|
|
1381
|
+
:PUT,
|
|
1382
|
+
Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
|
|
1383
|
+
)
|
|
1384
|
+
PATCH =
|
|
1385
|
+
T.let(
|
|
1386
|
+
:PATCH,
|
|
1387
|
+
Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
|
|
1388
|
+
)
|
|
1389
|
+
DELETE =
|
|
1390
|
+
T.let(
|
|
1391
|
+
:DELETE,
|
|
1392
|
+
Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
|
|
1393
|
+
)
|
|
1394
|
+
|
|
1395
|
+
sig do
|
|
1396
|
+
override.returns(
|
|
1397
|
+
T::Array[
|
|
1398
|
+
Revox::AssistantCreateParams::CustomTool::Method::TaggedSymbol
|
|
1399
|
+
]
|
|
1400
|
+
)
|
|
1401
|
+
end
|
|
1402
|
+
def self.values
|
|
1403
|
+
end
|
|
1404
|
+
end
|
|
1405
|
+
|
|
1406
|
+
class QueryParam < Revox::Internal::Type::BaseModel
|
|
1407
|
+
OrHash =
|
|
1408
|
+
T.type_alias do
|
|
1409
|
+
T.any(
|
|
1410
|
+
Revox::AssistantCreateParams::CustomTool::QueryParam,
|
|
1411
|
+
Revox::Internal::AnyHash
|
|
1412
|
+
)
|
|
1413
|
+
end
|
|
1414
|
+
|
|
1415
|
+
sig { returns(String) }
|
|
1416
|
+
attr_accessor :key
|
|
1417
|
+
|
|
1418
|
+
sig { returns(String) }
|
|
1419
|
+
attr_accessor :value
|
|
1420
|
+
|
|
1421
|
+
sig { params(key: String, value: String).returns(T.attached_class) }
|
|
1422
|
+
def self.new(key:, value:)
|
|
1423
|
+
end
|
|
1424
|
+
|
|
1425
|
+
sig { override.returns({ key: String, value: String }) }
|
|
1426
|
+
def to_hash
|
|
1427
|
+
end
|
|
1428
|
+
end
|
|
1429
|
+
end
|
|
1430
|
+
|
|
1431
|
+
# The language used for the notification email content. One of "en" or "fr".
|
|
1432
|
+
# Defaults to "en".
|
|
1433
|
+
module EmailNotificationLanguage
|
|
1434
|
+
extend Revox::Internal::Type::Enum
|
|
1435
|
+
|
|
1436
|
+
TaggedSymbol =
|
|
1437
|
+
T.type_alias do
|
|
1438
|
+
T.all(
|
|
1439
|
+
Symbol,
|
|
1440
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage
|
|
1441
|
+
)
|
|
1442
|
+
end
|
|
1443
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1444
|
+
|
|
1445
|
+
EN =
|
|
1446
|
+
T.let(
|
|
1447
|
+
:en,
|
|
1448
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage::TaggedSymbol
|
|
1449
|
+
)
|
|
1450
|
+
FR =
|
|
1451
|
+
T.let(
|
|
1452
|
+
:fr,
|
|
1453
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage::TaggedSymbol
|
|
1454
|
+
)
|
|
1455
|
+
|
|
1456
|
+
sig do
|
|
1457
|
+
override.returns(
|
|
1458
|
+
T::Array[
|
|
1459
|
+
Revox::AssistantCreateParams::EmailNotificationLanguage::TaggedSymbol
|
|
1460
|
+
]
|
|
1461
|
+
)
|
|
1462
|
+
end
|
|
1463
|
+
def self.values
|
|
1464
|
+
end
|
|
1465
|
+
end
|
|
1466
|
+
|
|
1467
|
+
module EmailNotificationOutcome
|
|
1468
|
+
extend Revox::Internal::Type::Enum
|
|
1469
|
+
|
|
1470
|
+
TaggedSymbol =
|
|
1471
|
+
T.type_alias do
|
|
1472
|
+
T.all(
|
|
1473
|
+
Symbol,
|
|
1474
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome
|
|
1475
|
+
)
|
|
1476
|
+
end
|
|
1477
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1478
|
+
|
|
1479
|
+
NOT_INTERESTED =
|
|
1480
|
+
T.let(
|
|
1481
|
+
:not_interested,
|
|
1482
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1483
|
+
)
|
|
1484
|
+
INTERESTED =
|
|
1485
|
+
T.let(
|
|
1486
|
+
:interested,
|
|
1487
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1488
|
+
)
|
|
1489
|
+
COMPLETED =
|
|
1490
|
+
T.let(
|
|
1491
|
+
:completed,
|
|
1492
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1493
|
+
)
|
|
1494
|
+
REQUESTED_CALLBACK_LATER =
|
|
1495
|
+
T.let(
|
|
1496
|
+
:requested_callback_later,
|
|
1497
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1498
|
+
)
|
|
1499
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
1500
|
+
T.let(
|
|
1501
|
+
:requested_callback_new_number,
|
|
1502
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1503
|
+
)
|
|
1504
|
+
DO_NOT_CONTACT =
|
|
1505
|
+
T.let(
|
|
1506
|
+
:do_not_contact,
|
|
1507
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1508
|
+
)
|
|
1509
|
+
AI_AVERSE =
|
|
1510
|
+
T.let(
|
|
1511
|
+
:ai_averse,
|
|
1512
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1513
|
+
)
|
|
1514
|
+
NONE =
|
|
1515
|
+
T.let(
|
|
1516
|
+
:none,
|
|
1517
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1518
|
+
)
|
|
1519
|
+
|
|
1520
|
+
sig do
|
|
1521
|
+
override.returns(
|
|
1522
|
+
T::Array[
|
|
1523
|
+
Revox::AssistantCreateParams::EmailNotificationOutcome::TaggedSymbol
|
|
1524
|
+
]
|
|
1525
|
+
)
|
|
1526
|
+
end
|
|
1527
|
+
def self.values
|
|
1528
|
+
end
|
|
1529
|
+
end
|
|
1530
|
+
|
|
1531
|
+
class FaqItem < Revox::Internal::Type::BaseModel
|
|
1532
|
+
OrHash =
|
|
1533
|
+
T.type_alias do
|
|
1534
|
+
T.any(
|
|
1535
|
+
Revox::AssistantCreateParams::FaqItem,
|
|
1536
|
+
Revox::Internal::AnyHash
|
|
1537
|
+
)
|
|
1538
|
+
end
|
|
1539
|
+
|
|
1540
|
+
sig { returns(String) }
|
|
1541
|
+
attr_accessor :answer
|
|
1542
|
+
|
|
1543
|
+
sig { returns(String) }
|
|
1544
|
+
attr_accessor :question
|
|
1545
|
+
|
|
1546
|
+
sig do
|
|
1547
|
+
params(answer: String, question: String).returns(T.attached_class)
|
|
1548
|
+
end
|
|
1549
|
+
def self.new(answer:, question:)
|
|
1550
|
+
end
|
|
1551
|
+
|
|
1552
|
+
sig { override.returns({ answer: String, question: String }) }
|
|
1553
|
+
def to_hash
|
|
1554
|
+
end
|
|
1555
|
+
end
|
|
1556
|
+
|
|
1557
|
+
# How the first sentence should be handled. "generated" means the LLM will
|
|
1558
|
+
# generate a response based on the first_sentence instruction. "static" means the
|
|
1559
|
+
# first_sentence will be spoken exactly as provided. "none" means the agent will
|
|
1560
|
+
# not speak first and will wait for the user.
|
|
1561
|
+
module FirstSentenceMode
|
|
1562
|
+
extend Revox::Internal::Type::Enum
|
|
1563
|
+
|
|
1564
|
+
TaggedSymbol =
|
|
1565
|
+
T.type_alias do
|
|
1566
|
+
T.all(Symbol, Revox::AssistantCreateParams::FirstSentenceMode)
|
|
1567
|
+
end
|
|
1568
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1569
|
+
|
|
1570
|
+
GENERATED =
|
|
1571
|
+
T.let(
|
|
1572
|
+
:generated,
|
|
1573
|
+
Revox::AssistantCreateParams::FirstSentenceMode::TaggedSymbol
|
|
1574
|
+
)
|
|
1575
|
+
STATIC =
|
|
1576
|
+
T.let(
|
|
1577
|
+
:static,
|
|
1578
|
+
Revox::AssistantCreateParams::FirstSentenceMode::TaggedSymbol
|
|
551
1579
|
)
|
|
552
1580
|
NONE =
|
|
553
1581
|
T.let(
|
|
@@ -566,85 +1594,333 @@ module Revox
|
|
|
566
1594
|
end
|
|
567
1595
|
end
|
|
568
1596
|
|
|
569
|
-
|
|
570
|
-
|
|
1597
|
+
# When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
|
|
1598
|
+
# trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
|
|
1599
|
+
module HumanTransferMode
|
|
1600
|
+
extend Revox::Internal::Type::Enum
|
|
1601
|
+
|
|
1602
|
+
TaggedSymbol =
|
|
1603
|
+
T.type_alias do
|
|
1604
|
+
T.all(Symbol, Revox::AssistantCreateParams::HumanTransferMode)
|
|
1605
|
+
end
|
|
1606
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1607
|
+
|
|
1608
|
+
WARM =
|
|
1609
|
+
T.let(
|
|
1610
|
+
:warm,
|
|
1611
|
+
Revox::AssistantCreateParams::HumanTransferMode::TaggedSymbol
|
|
1612
|
+
)
|
|
1613
|
+
COLD =
|
|
1614
|
+
T.let(
|
|
1615
|
+
:cold,
|
|
1616
|
+
Revox::AssistantCreateParams::HumanTransferMode::TaggedSymbol
|
|
1617
|
+
)
|
|
1618
|
+
|
|
1619
|
+
sig do
|
|
1620
|
+
override.returns(
|
|
1621
|
+
T::Array[
|
|
1622
|
+
Revox::AssistantCreateParams::HumanTransferMode::TaggedSymbol
|
|
1623
|
+
]
|
|
1624
|
+
)
|
|
1625
|
+
end
|
|
1626
|
+
def self.values
|
|
1627
|
+
end
|
|
1628
|
+
end
|
|
1629
|
+
|
|
1630
|
+
module LlmModel
|
|
1631
|
+
extend Revox::Internal::Type::Union
|
|
1632
|
+
|
|
1633
|
+
Variants =
|
|
1634
|
+
T.type_alias do
|
|
1635
|
+
T.any(
|
|
1636
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0,
|
|
1637
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember1,
|
|
1638
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember2,
|
|
1639
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3
|
|
1640
|
+
)
|
|
1641
|
+
end
|
|
1642
|
+
|
|
1643
|
+
class UnionMember0 < Revox::Internal::Type::BaseModel
|
|
1644
|
+
OrHash =
|
|
1645
|
+
T.type_alias do
|
|
1646
|
+
T.any(
|
|
1647
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0,
|
|
1648
|
+
Revox::Internal::AnyHash
|
|
1649
|
+
)
|
|
1650
|
+
end
|
|
1651
|
+
|
|
1652
|
+
sig do
|
|
1653
|
+
returns(
|
|
1654
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol
|
|
1655
|
+
)
|
|
1656
|
+
end
|
|
1657
|
+
attr_accessor :name
|
|
1658
|
+
|
|
1659
|
+
sig { returns(Symbol) }
|
|
1660
|
+
attr_accessor :type
|
|
1661
|
+
|
|
1662
|
+
sig do
|
|
1663
|
+
params(
|
|
1664
|
+
name:
|
|
1665
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol,
|
|
1666
|
+
type: Symbol
|
|
1667
|
+
).returns(T.attached_class)
|
|
1668
|
+
end
|
|
1669
|
+
def self.new(name:, type: :"dedicated-instance")
|
|
1670
|
+
end
|
|
1671
|
+
|
|
1672
|
+
sig do
|
|
1673
|
+
override.returns(
|
|
1674
|
+
{
|
|
1675
|
+
name:
|
|
1676
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::OrSymbol,
|
|
1677
|
+
type: Symbol
|
|
1678
|
+
}
|
|
1679
|
+
)
|
|
1680
|
+
end
|
|
1681
|
+
def to_hash
|
|
1682
|
+
end
|
|
1683
|
+
|
|
1684
|
+
module Name
|
|
1685
|
+
extend Revox::Internal::Type::Enum
|
|
1686
|
+
|
|
1687
|
+
TaggedSymbol =
|
|
1688
|
+
T.type_alias do
|
|
1689
|
+
T.all(
|
|
1690
|
+
Symbol,
|
|
1691
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0::Name
|
|
1692
|
+
)
|
|
1693
|
+
end
|
|
1694
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1695
|
+
|
|
1696
|
+
GPT_4_1 =
|
|
1697
|
+
T.let(
|
|
1698
|
+
:"gpt-4.1",
|
|
1699
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
|
|
1700
|
+
)
|
|
1701
|
+
MINISTRAL_3_8B_INSTRUCT =
|
|
1702
|
+
T.let(
|
|
1703
|
+
:"ministral-3-8b-instruct",
|
|
1704
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
|
|
1705
|
+
)
|
|
1706
|
+
|
|
1707
|
+
sig do
|
|
1708
|
+
override.returns(
|
|
1709
|
+
T::Array[
|
|
1710
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember0::Name::TaggedSymbol
|
|
1711
|
+
]
|
|
1712
|
+
)
|
|
1713
|
+
end
|
|
1714
|
+
def self.values
|
|
1715
|
+
end
|
|
1716
|
+
end
|
|
1717
|
+
end
|
|
1718
|
+
|
|
1719
|
+
class UnionMember1 < Revox::Internal::Type::BaseModel
|
|
1720
|
+
OrHash =
|
|
1721
|
+
T.type_alias do
|
|
1722
|
+
T.any(
|
|
1723
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember1,
|
|
1724
|
+
Revox::Internal::AnyHash
|
|
1725
|
+
)
|
|
1726
|
+
end
|
|
1727
|
+
|
|
1728
|
+
# The model ID to use from OpenRouter. eg: openai/gpt-4.1
|
|
1729
|
+
sig { returns(String) }
|
|
1730
|
+
attr_accessor :openrouter_model_id
|
|
1731
|
+
|
|
1732
|
+
# The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
|
|
1733
|
+
sig { returns(String) }
|
|
1734
|
+
attr_accessor :openrouter_provider
|
|
1735
|
+
|
|
1736
|
+
# Use a model from OpenRouter.
|
|
1737
|
+
sig { returns(Symbol) }
|
|
1738
|
+
attr_accessor :type
|
|
1739
|
+
|
|
1740
|
+
sig do
|
|
1741
|
+
params(
|
|
1742
|
+
openrouter_model_id: String,
|
|
1743
|
+
openrouter_provider: String,
|
|
1744
|
+
type: Symbol
|
|
1745
|
+
).returns(T.attached_class)
|
|
1746
|
+
end
|
|
1747
|
+
def self.new(
|
|
1748
|
+
# The model ID to use from OpenRouter. eg: openai/gpt-4.1
|
|
1749
|
+
openrouter_model_id:,
|
|
1750
|
+
# The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
|
|
1751
|
+
openrouter_provider:,
|
|
1752
|
+
# Use a model from OpenRouter.
|
|
1753
|
+
type: :openrouter
|
|
1754
|
+
)
|
|
1755
|
+
end
|
|
1756
|
+
|
|
1757
|
+
sig do
|
|
1758
|
+
override.returns(
|
|
1759
|
+
{
|
|
1760
|
+
openrouter_model_id: String,
|
|
1761
|
+
openrouter_provider: String,
|
|
1762
|
+
type: Symbol
|
|
1763
|
+
}
|
|
1764
|
+
)
|
|
1765
|
+
end
|
|
1766
|
+
def to_hash
|
|
1767
|
+
end
|
|
1768
|
+
end
|
|
1769
|
+
|
|
1770
|
+
class UnionMember2 < Revox::Internal::Type::BaseModel
|
|
1771
|
+
OrHash =
|
|
1772
|
+
T.type_alias do
|
|
1773
|
+
T.any(
|
|
1774
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember2,
|
|
1775
|
+
Revox::Internal::AnyHash
|
|
1776
|
+
)
|
|
1777
|
+
end
|
|
1778
|
+
|
|
1779
|
+
# API key sent as Bearer token to the custom endpoint.
|
|
1780
|
+
sig { returns(String) }
|
|
1781
|
+
attr_accessor :api_key
|
|
1782
|
+
|
|
1783
|
+
# Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
|
|
1784
|
+
sig { returns(String) }
|
|
1785
|
+
attr_accessor :api_url
|
|
571
1786
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
1787
|
+
# Model name as expected by the provider, e.g. meta-llama/llama-3-70b
|
|
1788
|
+
sig { returns(String) }
|
|
1789
|
+
attr_accessor :model_name
|
|
1790
|
+
|
|
1791
|
+
# OpenAI-compatible chat completions API (bring your own endpoint and key).
|
|
1792
|
+
sig { returns(Symbol) }
|
|
1793
|
+
attr_accessor :type
|
|
1794
|
+
|
|
1795
|
+
sig do
|
|
1796
|
+
params(
|
|
1797
|
+
api_key: String,
|
|
1798
|
+
api_url: String,
|
|
1799
|
+
model_name: String,
|
|
1800
|
+
type: Symbol
|
|
1801
|
+
).returns(T.attached_class)
|
|
1802
|
+
end
|
|
1803
|
+
def self.new(
|
|
1804
|
+
# API key sent as Bearer token to the custom endpoint.
|
|
1805
|
+
api_key:,
|
|
1806
|
+
# Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
|
|
1807
|
+
api_url:,
|
|
1808
|
+
# Model name as expected by the provider, e.g. meta-llama/llama-3-70b
|
|
1809
|
+
model_name:,
|
|
1810
|
+
# OpenAI-compatible chat completions API (bring your own endpoint and key).
|
|
1811
|
+
type: :custom
|
|
1812
|
+
)
|
|
1813
|
+
end
|
|
1814
|
+
|
|
1815
|
+
sig do
|
|
1816
|
+
override.returns(
|
|
1817
|
+
{
|
|
1818
|
+
api_key: String,
|
|
1819
|
+
api_url: String,
|
|
1820
|
+
model_name: String,
|
|
1821
|
+
type: Symbol
|
|
1822
|
+
}
|
|
577
1823
|
)
|
|
578
1824
|
end
|
|
1825
|
+
def to_hash
|
|
1826
|
+
end
|
|
1827
|
+
end
|
|
579
1828
|
|
|
580
|
-
class
|
|
1829
|
+
class UnionMember3 < Revox::Internal::Type::BaseModel
|
|
581
1830
|
OrHash =
|
|
582
1831
|
T.type_alias do
|
|
583
1832
|
T.any(
|
|
584
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
1833
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3,
|
|
585
1834
|
Revox::Internal::AnyHash
|
|
586
1835
|
)
|
|
587
1836
|
end
|
|
588
1837
|
|
|
1838
|
+
# The provider to use from Realtime. eg: openai, google.
|
|
589
1839
|
sig do
|
|
590
1840
|
returns(
|
|
591
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
1841
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::OrSymbol
|
|
592
1842
|
)
|
|
593
1843
|
end
|
|
594
|
-
attr_accessor :
|
|
1844
|
+
attr_accessor :provider
|
|
1845
|
+
|
|
1846
|
+
# The model ID to use from Realtime. eg: gpt-4.1
|
|
1847
|
+
sig { returns(String) }
|
|
1848
|
+
attr_accessor :realtime_model_id
|
|
595
1849
|
|
|
1850
|
+
# Use a model from Realtime.
|
|
596
1851
|
sig { returns(Symbol) }
|
|
597
1852
|
attr_accessor :type
|
|
598
1853
|
|
|
1854
|
+
# Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
|
|
1855
|
+
sig { returns(T.nilable(String)) }
|
|
1856
|
+
attr_reader :realtime_voice_id
|
|
1857
|
+
|
|
1858
|
+
sig { params(realtime_voice_id: String).void }
|
|
1859
|
+
attr_writer :realtime_voice_id
|
|
1860
|
+
|
|
599
1861
|
sig do
|
|
600
1862
|
params(
|
|
601
|
-
|
|
602
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
1863
|
+
provider:
|
|
1864
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::OrSymbol,
|
|
1865
|
+
realtime_model_id: String,
|
|
1866
|
+
realtime_voice_id: String,
|
|
603
1867
|
type: Symbol
|
|
604
1868
|
).returns(T.attached_class)
|
|
605
1869
|
end
|
|
606
|
-
def self.new(
|
|
1870
|
+
def self.new(
|
|
1871
|
+
# The provider to use from Realtime. eg: openai, google.
|
|
1872
|
+
provider:,
|
|
1873
|
+
# The model ID to use from Realtime. eg: gpt-4.1
|
|
1874
|
+
realtime_model_id:,
|
|
1875
|
+
# Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
|
|
1876
|
+
realtime_voice_id: nil,
|
|
1877
|
+
# Use a model from Realtime.
|
|
1878
|
+
type: :realtime
|
|
1879
|
+
)
|
|
607
1880
|
end
|
|
608
1881
|
|
|
609
1882
|
sig do
|
|
610
1883
|
override.returns(
|
|
611
1884
|
{
|
|
612
|
-
|
|
613
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
614
|
-
|
|
1885
|
+
provider:
|
|
1886
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::OrSymbol,
|
|
1887
|
+
realtime_model_id: String,
|
|
1888
|
+
type: Symbol,
|
|
1889
|
+
realtime_voice_id: String
|
|
615
1890
|
}
|
|
616
1891
|
)
|
|
617
1892
|
end
|
|
618
1893
|
def to_hash
|
|
619
1894
|
end
|
|
620
1895
|
|
|
621
|
-
|
|
1896
|
+
# The provider to use from Realtime. eg: openai, google.
|
|
1897
|
+
module Provider
|
|
622
1898
|
extend Revox::Internal::Type::Enum
|
|
623
1899
|
|
|
624
1900
|
TaggedSymbol =
|
|
625
1901
|
T.type_alias do
|
|
626
1902
|
T.all(
|
|
627
1903
|
Symbol,
|
|
628
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
1904
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider
|
|
629
1905
|
)
|
|
630
1906
|
end
|
|
631
1907
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
632
1908
|
|
|
633
|
-
|
|
1909
|
+
OPENAI =
|
|
634
1910
|
T.let(
|
|
635
|
-
:
|
|
636
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
1911
|
+
:openai,
|
|
1912
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::TaggedSymbol
|
|
637
1913
|
)
|
|
638
|
-
|
|
1914
|
+
GOOGLE =
|
|
639
1915
|
T.let(
|
|
640
|
-
:
|
|
641
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
1916
|
+
:google,
|
|
1917
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::TaggedSymbol
|
|
642
1918
|
)
|
|
643
1919
|
|
|
644
1920
|
sig do
|
|
645
1921
|
override.returns(
|
|
646
1922
|
T::Array[
|
|
647
|
-
Revox::AssistantCreateParams::LlmModel::
|
|
1923
|
+
Revox::AssistantCreateParams::LlmModel::UnionMember3::Provider::TaggedSymbol
|
|
648
1924
|
]
|
|
649
1925
|
)
|
|
650
1926
|
end
|
|
@@ -653,64 +1929,377 @@ module Revox
|
|
|
653
1929
|
end
|
|
654
1930
|
end
|
|
655
1931
|
|
|
656
|
-
|
|
1932
|
+
sig do
|
|
1933
|
+
override.returns(
|
|
1934
|
+
T::Array[Revox::AssistantCreateParams::LlmModel::Variants]
|
|
1935
|
+
)
|
|
1936
|
+
end
|
|
1937
|
+
def self.variants
|
|
1938
|
+
end
|
|
1939
|
+
end
|
|
1940
|
+
|
|
1941
|
+
class Position < Revox::Internal::Type::BaseModel
|
|
1942
|
+
OrHash =
|
|
1943
|
+
T.type_alias do
|
|
1944
|
+
T.any(
|
|
1945
|
+
Revox::AssistantCreateParams::Position,
|
|
1946
|
+
Revox::Internal::AnyHash
|
|
1947
|
+
)
|
|
1948
|
+
end
|
|
1949
|
+
|
|
1950
|
+
sig { returns(Float) }
|
|
1951
|
+
attr_accessor :x
|
|
1952
|
+
|
|
1953
|
+
sig { returns(Float) }
|
|
1954
|
+
attr_accessor :y_
|
|
1955
|
+
|
|
1956
|
+
# Canvas position of this assistant's node in its multi-step flow editor.
|
|
1957
|
+
sig { params(x: Float, y_: Float).returns(T.attached_class) }
|
|
1958
|
+
def self.new(x:, y_:)
|
|
1959
|
+
end
|
|
1960
|
+
|
|
1961
|
+
sig { override.returns({ x: Float, y_: Float }) }
|
|
1962
|
+
def to_hash
|
|
1963
|
+
end
|
|
1964
|
+
end
|
|
1965
|
+
|
|
1966
|
+
class PromptFlow < Revox::Internal::Type::BaseModel
|
|
1967
|
+
OrHash =
|
|
1968
|
+
T.type_alias do
|
|
1969
|
+
T.any(
|
|
1970
|
+
Revox::AssistantCreateParams::PromptFlow,
|
|
1971
|
+
Revox::Internal::AnyHash
|
|
1972
|
+
)
|
|
1973
|
+
end
|
|
1974
|
+
|
|
1975
|
+
sig do
|
|
1976
|
+
returns(T::Array[Revox::AssistantCreateParams::PromptFlow::Edge])
|
|
1977
|
+
end
|
|
1978
|
+
attr_accessor :edges
|
|
1979
|
+
|
|
1980
|
+
sig do
|
|
1981
|
+
returns(T::Array[Revox::AssistantCreateParams::PromptFlow::Node])
|
|
1982
|
+
end
|
|
1983
|
+
attr_accessor :nodes
|
|
1984
|
+
|
|
1985
|
+
# Visual prompt constructor data (nodes, edges, positions). Used by the UI to
|
|
1986
|
+
# re-open the visual editor. Does not affect call behavior — the flattened prompt
|
|
1987
|
+
# field is what the LLM receives.
|
|
1988
|
+
sig do
|
|
1989
|
+
params(
|
|
1990
|
+
edges:
|
|
1991
|
+
T::Array[Revox::AssistantCreateParams::PromptFlow::Edge::OrHash],
|
|
1992
|
+
nodes:
|
|
1993
|
+
T::Array[Revox::AssistantCreateParams::PromptFlow::Node::OrHash]
|
|
1994
|
+
).returns(T.attached_class)
|
|
1995
|
+
end
|
|
1996
|
+
def self.new(edges:, nodes:)
|
|
1997
|
+
end
|
|
1998
|
+
|
|
1999
|
+
sig do
|
|
2000
|
+
override.returns(
|
|
2001
|
+
{
|
|
2002
|
+
edges: T::Array[Revox::AssistantCreateParams::PromptFlow::Edge],
|
|
2003
|
+
nodes: T::Array[Revox::AssistantCreateParams::PromptFlow::Node]
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
2006
|
+
end
|
|
2007
|
+
def to_hash
|
|
2008
|
+
end
|
|
2009
|
+
|
|
2010
|
+
class Edge < Revox::Internal::Type::BaseModel
|
|
657
2011
|
OrHash =
|
|
658
2012
|
T.type_alias do
|
|
659
2013
|
T.any(
|
|
660
|
-
Revox::AssistantCreateParams::
|
|
2014
|
+
Revox::AssistantCreateParams::PromptFlow::Edge,
|
|
661
2015
|
Revox::Internal::AnyHash
|
|
662
2016
|
)
|
|
663
2017
|
end
|
|
664
2018
|
|
|
665
|
-
# The model ID to use from OpenRouter. eg: openai/gpt-4.1
|
|
666
2019
|
sig { returns(String) }
|
|
667
|
-
attr_accessor :
|
|
2020
|
+
attr_accessor :id
|
|
668
2021
|
|
|
669
|
-
# The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
|
|
670
2022
|
sig { returns(String) }
|
|
671
|
-
attr_accessor :
|
|
2023
|
+
attr_accessor :source
|
|
2024
|
+
|
|
2025
|
+
sig { returns(String) }
|
|
2026
|
+
attr_accessor :target
|
|
2027
|
+
|
|
2028
|
+
sig do
|
|
2029
|
+
params(id: String, source: String, target: String).returns(
|
|
2030
|
+
T.attached_class
|
|
2031
|
+
)
|
|
2032
|
+
end
|
|
2033
|
+
def self.new(id:, source:, target:)
|
|
2034
|
+
end
|
|
2035
|
+
|
|
2036
|
+
sig do
|
|
2037
|
+
override.returns({ id: String, source: String, target: String })
|
|
2038
|
+
end
|
|
2039
|
+
def to_hash
|
|
2040
|
+
end
|
|
2041
|
+
end
|
|
2042
|
+
|
|
2043
|
+
class Node < Revox::Internal::Type::BaseModel
|
|
2044
|
+
OrHash =
|
|
2045
|
+
T.type_alias do
|
|
2046
|
+
T.any(
|
|
2047
|
+
Revox::AssistantCreateParams::PromptFlow::Node,
|
|
2048
|
+
Revox::Internal::AnyHash
|
|
2049
|
+
)
|
|
2050
|
+
end
|
|
2051
|
+
|
|
2052
|
+
sig { returns(String) }
|
|
2053
|
+
attr_accessor :id
|
|
2054
|
+
|
|
2055
|
+
sig { returns(Revox::AssistantCreateParams::PromptFlow::Node::Data) }
|
|
2056
|
+
attr_reader :data
|
|
2057
|
+
|
|
2058
|
+
sig do
|
|
2059
|
+
params(
|
|
2060
|
+
data: Revox::AssistantCreateParams::PromptFlow::Node::Data::OrHash
|
|
2061
|
+
).void
|
|
2062
|
+
end
|
|
2063
|
+
attr_writer :data
|
|
2064
|
+
|
|
2065
|
+
sig do
|
|
2066
|
+
returns(Revox::AssistantCreateParams::PromptFlow::Node::Position)
|
|
2067
|
+
end
|
|
2068
|
+
attr_reader :position
|
|
2069
|
+
|
|
2070
|
+
sig do
|
|
2071
|
+
params(
|
|
2072
|
+
position:
|
|
2073
|
+
Revox::AssistantCreateParams::PromptFlow::Node::Position::OrHash
|
|
2074
|
+
).void
|
|
2075
|
+
end
|
|
2076
|
+
attr_writer :position
|
|
672
2077
|
|
|
673
|
-
# Use a model from OpenRouter.
|
|
674
2078
|
sig { returns(Symbol) }
|
|
675
2079
|
attr_accessor :type
|
|
676
2080
|
|
|
677
2081
|
sig do
|
|
678
2082
|
params(
|
|
679
|
-
|
|
680
|
-
|
|
2083
|
+
id: String,
|
|
2084
|
+
data:
|
|
2085
|
+
Revox::AssistantCreateParams::PromptFlow::Node::Data::OrHash,
|
|
2086
|
+
position:
|
|
2087
|
+
Revox::AssistantCreateParams::PromptFlow::Node::Position::OrHash,
|
|
681
2088
|
type: Symbol
|
|
682
2089
|
).returns(T.attached_class)
|
|
683
2090
|
end
|
|
684
|
-
def self.new(
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
2091
|
+
def self.new(id:, data:, position:, type: :promptBlock)
|
|
2092
|
+
end
|
|
2093
|
+
|
|
2094
|
+
sig do
|
|
2095
|
+
override.returns(
|
|
2096
|
+
{
|
|
2097
|
+
id: String,
|
|
2098
|
+
data: Revox::AssistantCreateParams::PromptFlow::Node::Data,
|
|
2099
|
+
position:
|
|
2100
|
+
Revox::AssistantCreateParams::PromptFlow::Node::Position,
|
|
2101
|
+
type: Symbol
|
|
2102
|
+
}
|
|
2103
|
+
)
|
|
2104
|
+
end
|
|
2105
|
+
def to_hash
|
|
2106
|
+
end
|
|
2107
|
+
|
|
2108
|
+
class Data < Revox::Internal::Type::BaseModel
|
|
2109
|
+
OrHash =
|
|
2110
|
+
T.type_alias do
|
|
2111
|
+
T.any(
|
|
2112
|
+
Revox::AssistantCreateParams::PromptFlow::Node::Data,
|
|
2113
|
+
Revox::Internal::AnyHash
|
|
2114
|
+
)
|
|
2115
|
+
end
|
|
2116
|
+
|
|
2117
|
+
sig { returns(String) }
|
|
2118
|
+
attr_accessor :body
|
|
2119
|
+
|
|
2120
|
+
sig { returns(String) }
|
|
2121
|
+
attr_accessor :title
|
|
2122
|
+
|
|
2123
|
+
sig do
|
|
2124
|
+
params(body: String, title: String).returns(T.attached_class)
|
|
2125
|
+
end
|
|
2126
|
+
def self.new(body:, title:)
|
|
2127
|
+
end
|
|
2128
|
+
|
|
2129
|
+
sig { override.returns({ body: String, title: String }) }
|
|
2130
|
+
def to_hash
|
|
2131
|
+
end
|
|
2132
|
+
end
|
|
2133
|
+
|
|
2134
|
+
class Position < Revox::Internal::Type::BaseModel
|
|
2135
|
+
OrHash =
|
|
2136
|
+
T.type_alias do
|
|
2137
|
+
T.any(
|
|
2138
|
+
Revox::AssistantCreateParams::PromptFlow::Node::Position,
|
|
2139
|
+
Revox::Internal::AnyHash
|
|
2140
|
+
)
|
|
2141
|
+
end
|
|
2142
|
+
|
|
2143
|
+
sig { returns(Float) }
|
|
2144
|
+
attr_accessor :x
|
|
2145
|
+
|
|
2146
|
+
sig { returns(Float) }
|
|
2147
|
+
attr_accessor :y_
|
|
2148
|
+
|
|
2149
|
+
sig { params(x: Float, y_: Float).returns(T.attached_class) }
|
|
2150
|
+
def self.new(x:, y_:)
|
|
2151
|
+
end
|
|
2152
|
+
|
|
2153
|
+
sig { override.returns({ x: Float, y_: Float }) }
|
|
2154
|
+
def to_hash
|
|
2155
|
+
end
|
|
692
2156
|
end
|
|
2157
|
+
end
|
|
2158
|
+
end
|
|
2159
|
+
|
|
2160
|
+
class Slack < Revox::Internal::Type::BaseModel
|
|
2161
|
+
OrHash =
|
|
2162
|
+
T.type_alias do
|
|
2163
|
+
T.any(Revox::AssistantCreateParams::Slack, Revox::Internal::AnyHash)
|
|
2164
|
+
end
|
|
2165
|
+
|
|
2166
|
+
# The Slack channel ID where the notification will be posted.
|
|
2167
|
+
sig { returns(String) }
|
|
2168
|
+
attr_accessor :channel_id
|
|
2169
|
+
|
|
2170
|
+
# The Nango connection ID linking the org's Slack workspace to Revox.
|
|
2171
|
+
sig { returns(String) }
|
|
2172
|
+
attr_accessor :connection_id
|
|
2173
|
+
|
|
2174
|
+
# Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
|
|
2175
|
+
# Use 'none' to notify when outcome is null.
|
|
2176
|
+
sig do
|
|
2177
|
+
returns(
|
|
2178
|
+
T::Array[Revox::AssistantCreateParams::Slack::Outcome::OrSymbol]
|
|
2179
|
+
)
|
|
2180
|
+
end
|
|
2181
|
+
attr_accessor :outcomes
|
|
2182
|
+
|
|
2183
|
+
# Human-readable Slack channel name, cached for display in the UI.
|
|
2184
|
+
sig { returns(T.nilable(String)) }
|
|
2185
|
+
attr_accessor :channel_name
|
|
2186
|
+
|
|
2187
|
+
# Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
2188
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
|
|
2189
|
+
# {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
|
|
2190
|
+
# prompt_variables and structured_output keys. When null/empty a default template
|
|
2191
|
+
# is used.
|
|
2192
|
+
sig { returns(T.nilable(String)) }
|
|
2193
|
+
attr_accessor :template
|
|
2194
|
+
|
|
2195
|
+
# Slack notification config. When set, posts a message to the chosen channel after
|
|
2196
|
+
# a call ends with one of the configured outcomes.
|
|
2197
|
+
sig do
|
|
2198
|
+
params(
|
|
2199
|
+
channel_id: String,
|
|
2200
|
+
connection_id: String,
|
|
2201
|
+
outcomes:
|
|
2202
|
+
T::Array[Revox::AssistantCreateParams::Slack::Outcome::OrSymbol],
|
|
2203
|
+
channel_name: T.nilable(String),
|
|
2204
|
+
template: T.nilable(String)
|
|
2205
|
+
).returns(T.attached_class)
|
|
2206
|
+
end
|
|
2207
|
+
def self.new(
|
|
2208
|
+
# The Slack channel ID where the notification will be posted.
|
|
2209
|
+
channel_id:,
|
|
2210
|
+
# The Nango connection ID linking the org's Slack workspace to Revox.
|
|
2211
|
+
connection_id:,
|
|
2212
|
+
# Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
|
|
2213
|
+
# Use 'none' to notify when outcome is null.
|
|
2214
|
+
outcomes:,
|
|
2215
|
+
# Human-readable Slack channel name, cached for display in the UI.
|
|
2216
|
+
channel_name: nil,
|
|
2217
|
+
# Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
2218
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
|
|
2219
|
+
# {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
|
|
2220
|
+
# prompt_variables and structured_output keys. When null/empty a default template
|
|
2221
|
+
# is used.
|
|
2222
|
+
template: nil
|
|
2223
|
+
)
|
|
2224
|
+
end
|
|
2225
|
+
|
|
2226
|
+
sig do
|
|
2227
|
+
override.returns(
|
|
2228
|
+
{
|
|
2229
|
+
channel_id: String,
|
|
2230
|
+
connection_id: String,
|
|
2231
|
+
outcomes:
|
|
2232
|
+
T::Array[
|
|
2233
|
+
Revox::AssistantCreateParams::Slack::Outcome::OrSymbol
|
|
2234
|
+
],
|
|
2235
|
+
channel_name: T.nilable(String),
|
|
2236
|
+
template: T.nilable(String)
|
|
2237
|
+
}
|
|
2238
|
+
)
|
|
2239
|
+
end
|
|
2240
|
+
def to_hash
|
|
2241
|
+
end
|
|
2242
|
+
|
|
2243
|
+
module Outcome
|
|
2244
|
+
extend Revox::Internal::Type::Enum
|
|
2245
|
+
|
|
2246
|
+
TaggedSymbol =
|
|
2247
|
+
T.type_alias do
|
|
2248
|
+
T.all(Symbol, Revox::AssistantCreateParams::Slack::Outcome)
|
|
2249
|
+
end
|
|
2250
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2251
|
+
|
|
2252
|
+
NOT_INTERESTED =
|
|
2253
|
+
T.let(
|
|
2254
|
+
:not_interested,
|
|
2255
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2256
|
+
)
|
|
2257
|
+
INTERESTED =
|
|
2258
|
+
T.let(
|
|
2259
|
+
:interested,
|
|
2260
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2261
|
+
)
|
|
2262
|
+
COMPLETED =
|
|
2263
|
+
T.let(
|
|
2264
|
+
:completed,
|
|
2265
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2266
|
+
)
|
|
2267
|
+
REQUESTED_CALLBACK_LATER =
|
|
2268
|
+
T.let(
|
|
2269
|
+
:requested_callback_later,
|
|
2270
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2271
|
+
)
|
|
2272
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
2273
|
+
T.let(
|
|
2274
|
+
:requested_callback_new_number,
|
|
2275
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2276
|
+
)
|
|
2277
|
+
DO_NOT_CONTACT =
|
|
2278
|
+
T.let(
|
|
2279
|
+
:do_not_contact,
|
|
2280
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2281
|
+
)
|
|
2282
|
+
AI_AVERSE =
|
|
2283
|
+
T.let(
|
|
2284
|
+
:ai_averse,
|
|
2285
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2286
|
+
)
|
|
2287
|
+
NONE =
|
|
2288
|
+
T.let(
|
|
2289
|
+
:none,
|
|
2290
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2291
|
+
)
|
|
693
2292
|
|
|
694
2293
|
sig do
|
|
695
2294
|
override.returns(
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
type: Symbol
|
|
700
|
-
}
|
|
2295
|
+
T::Array[
|
|
2296
|
+
Revox::AssistantCreateParams::Slack::Outcome::TaggedSymbol
|
|
2297
|
+
]
|
|
701
2298
|
)
|
|
702
2299
|
end
|
|
703
|
-
def
|
|
2300
|
+
def self.values
|
|
704
2301
|
end
|
|
705
2302
|
end
|
|
706
|
-
|
|
707
|
-
sig do
|
|
708
|
-
override.returns(
|
|
709
|
-
T::Array[Revox::AssistantCreateParams::LlmModel::Variants]
|
|
710
|
-
)
|
|
711
|
-
end
|
|
712
|
-
def self.variants
|
|
713
|
-
end
|
|
714
2303
|
end
|
|
715
2304
|
|
|
716
2305
|
class StructuredOutputConfig < Revox::Internal::Type::BaseModel
|
|
@@ -836,6 +2425,190 @@ module Revox
|
|
|
836
2425
|
end
|
|
837
2426
|
end
|
|
838
2427
|
|
|
2428
|
+
class SttContext < Revox::Internal::Type::BaseModel
|
|
2429
|
+
OrHash =
|
|
2430
|
+
T.type_alias do
|
|
2431
|
+
T.any(
|
|
2432
|
+
Revox::AssistantCreateParams::SttContext,
|
|
2433
|
+
Revox::Internal::AnyHash
|
|
2434
|
+
)
|
|
2435
|
+
end
|
|
2436
|
+
|
|
2437
|
+
sig do
|
|
2438
|
+
returns(T::Array[Revox::AssistantCreateParams::SttContext::General])
|
|
2439
|
+
end
|
|
2440
|
+
attr_accessor :general
|
|
2441
|
+
|
|
2442
|
+
sig { returns(T::Array[String]) }
|
|
2443
|
+
attr_accessor :terms
|
|
2444
|
+
|
|
2445
|
+
# Assistant-level speech-to-text context: structured `general` key/value pairs
|
|
2446
|
+
# plus a list of domain `terms`. Prompt-derived context is merged in without
|
|
2447
|
+
# replacing existing entries.
|
|
2448
|
+
sig do
|
|
2449
|
+
params(
|
|
2450
|
+
general:
|
|
2451
|
+
T::Array[
|
|
2452
|
+
Revox::AssistantCreateParams::SttContext::General::OrHash
|
|
2453
|
+
],
|
|
2454
|
+
terms: T::Array[String]
|
|
2455
|
+
).returns(T.attached_class)
|
|
2456
|
+
end
|
|
2457
|
+
def self.new(general:, terms:)
|
|
2458
|
+
end
|
|
2459
|
+
|
|
2460
|
+
sig do
|
|
2461
|
+
override.returns(
|
|
2462
|
+
{
|
|
2463
|
+
general:
|
|
2464
|
+
T::Array[Revox::AssistantCreateParams::SttContext::General],
|
|
2465
|
+
terms: T::Array[String]
|
|
2466
|
+
}
|
|
2467
|
+
)
|
|
2468
|
+
end
|
|
2469
|
+
def to_hash
|
|
2470
|
+
end
|
|
2471
|
+
|
|
2472
|
+
class General < Revox::Internal::Type::BaseModel
|
|
2473
|
+
OrHash =
|
|
2474
|
+
T.type_alias do
|
|
2475
|
+
T.any(
|
|
2476
|
+
Revox::AssistantCreateParams::SttContext::General,
|
|
2477
|
+
Revox::Internal::AnyHash
|
|
2478
|
+
)
|
|
2479
|
+
end
|
|
2480
|
+
|
|
2481
|
+
sig { returns(String) }
|
|
2482
|
+
attr_accessor :key
|
|
2483
|
+
|
|
2484
|
+
sig { returns(String) }
|
|
2485
|
+
attr_accessor :value
|
|
2486
|
+
|
|
2487
|
+
sig { params(key: String, value: String).returns(T.attached_class) }
|
|
2488
|
+
def self.new(key:, value:)
|
|
2489
|
+
end
|
|
2490
|
+
|
|
2491
|
+
sig { override.returns({ key: String, value: String }) }
|
|
2492
|
+
def to_hash
|
|
2493
|
+
end
|
|
2494
|
+
end
|
|
2495
|
+
end
|
|
2496
|
+
|
|
2497
|
+
# Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
|
|
2498
|
+
# when omitted.
|
|
2499
|
+
module SttModel
|
|
2500
|
+
extend Revox::Internal::Type::Enum
|
|
2501
|
+
|
|
2502
|
+
TaggedSymbol =
|
|
2503
|
+
T.type_alias { T.all(Symbol, Revox::AssistantCreateParams::SttModel) }
|
|
2504
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2505
|
+
|
|
2506
|
+
STT_RT_V4 =
|
|
2507
|
+
T.let(
|
|
2508
|
+
:"stt-rt-v4",
|
|
2509
|
+
Revox::AssistantCreateParams::SttModel::TaggedSymbol
|
|
2510
|
+
)
|
|
2511
|
+
STT_RT_V5 =
|
|
2512
|
+
T.let(
|
|
2513
|
+
:"stt-rt-v5",
|
|
2514
|
+
Revox::AssistantCreateParams::SttModel::TaggedSymbol
|
|
2515
|
+
)
|
|
2516
|
+
|
|
2517
|
+
sig do
|
|
2518
|
+
override.returns(
|
|
2519
|
+
T::Array[Revox::AssistantCreateParams::SttModel::TaggedSymbol]
|
|
2520
|
+
)
|
|
2521
|
+
end
|
|
2522
|
+
def self.values
|
|
2523
|
+
end
|
|
2524
|
+
end
|
|
2525
|
+
|
|
2526
|
+
# Audio clip to play while the agent is processing a response. One of the built-in
|
|
2527
|
+
# LiveKit audio clips; null/omitted disables it.
|
|
2528
|
+
module ThinkingSound
|
|
2529
|
+
extend Revox::Internal::Type::Enum
|
|
2530
|
+
|
|
2531
|
+
TaggedSymbol =
|
|
2532
|
+
T.type_alias do
|
|
2533
|
+
T.all(Symbol, Revox::AssistantCreateParams::ThinkingSound)
|
|
2534
|
+
end
|
|
2535
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2536
|
+
|
|
2537
|
+
CITY_AMBIENCE_OGG =
|
|
2538
|
+
T.let(
|
|
2539
|
+
:"city-ambience.ogg",
|
|
2540
|
+
Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
|
|
2541
|
+
)
|
|
2542
|
+
FOREST_AMBIENCE_OGG =
|
|
2543
|
+
T.let(
|
|
2544
|
+
:"forest-ambience.ogg",
|
|
2545
|
+
Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
|
|
2546
|
+
)
|
|
2547
|
+
OFFICE_AMBIENCE_OGG =
|
|
2548
|
+
T.let(
|
|
2549
|
+
:"office-ambience.ogg",
|
|
2550
|
+
Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
|
|
2551
|
+
)
|
|
2552
|
+
CROWDED_ROOM_OGG =
|
|
2553
|
+
T.let(
|
|
2554
|
+
:"crowded-room.ogg",
|
|
2555
|
+
Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
|
|
2556
|
+
)
|
|
2557
|
+
KEYBOARD_TYPING_OGG =
|
|
2558
|
+
T.let(
|
|
2559
|
+
:"keyboard-typing.ogg",
|
|
2560
|
+
Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
|
|
2561
|
+
)
|
|
2562
|
+
KEYBOARD_TYPING2_OGG =
|
|
2563
|
+
T.let(
|
|
2564
|
+
:"keyboard-typing2.ogg",
|
|
2565
|
+
Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
|
|
2566
|
+
)
|
|
2567
|
+
HOLD_MUSIC_OGG =
|
|
2568
|
+
T.let(
|
|
2569
|
+
:"hold_music.ogg",
|
|
2570
|
+
Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol
|
|
2571
|
+
)
|
|
2572
|
+
|
|
2573
|
+
sig do
|
|
2574
|
+
override.returns(
|
|
2575
|
+
T::Array[Revox::AssistantCreateParams::ThinkingSound::TaggedSymbol]
|
|
2576
|
+
)
|
|
2577
|
+
end
|
|
2578
|
+
def self.values
|
|
2579
|
+
end
|
|
2580
|
+
end
|
|
2581
|
+
|
|
2582
|
+
# Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
|
|
2583
|
+
# orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
|
|
2584
|
+
# multi-step flow (hidden from the assistants list). Flow transitions are managed
|
|
2585
|
+
# via the /assistants/:id/edges endpoints, not on the assistant itself.
|
|
2586
|
+
module Type
|
|
2587
|
+
extend Revox::Internal::Type::Enum
|
|
2588
|
+
|
|
2589
|
+
TaggedSymbol =
|
|
2590
|
+
T.type_alias { T.all(Symbol, Revox::AssistantCreateParams::Type) }
|
|
2591
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2592
|
+
|
|
2593
|
+
STANDALONE =
|
|
2594
|
+
T.let(:standalone, Revox::AssistantCreateParams::Type::TaggedSymbol)
|
|
2595
|
+
MULTI_STEP =
|
|
2596
|
+
T.let(:"multi-step", Revox::AssistantCreateParams::Type::TaggedSymbol)
|
|
2597
|
+
SUB_ASSISTANT =
|
|
2598
|
+
T.let(
|
|
2599
|
+
:"sub-assistant",
|
|
2600
|
+
Revox::AssistantCreateParams::Type::TaggedSymbol
|
|
2601
|
+
)
|
|
2602
|
+
|
|
2603
|
+
sig do
|
|
2604
|
+
override.returns(
|
|
2605
|
+
T::Array[Revox::AssistantCreateParams::Type::TaggedSymbol]
|
|
2606
|
+
)
|
|
2607
|
+
end
|
|
2608
|
+
def self.values
|
|
2609
|
+
end
|
|
2610
|
+
end
|
|
2611
|
+
|
|
839
2612
|
class Voice < Revox::Internal::Type::BaseModel
|
|
840
2613
|
OrHash =
|
|
841
2614
|
T.type_alias do
|
|
@@ -850,6 +2623,22 @@ module Revox
|
|
|
850
2623
|
sig { returns(Revox::AssistantCreateParams::Voice::Provider::OrSymbol) }
|
|
851
2624
|
attr_accessor :provider
|
|
852
2625
|
|
|
2626
|
+
# Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
|
|
2627
|
+
# for other providers.
|
|
2628
|
+
sig do
|
|
2629
|
+
returns(
|
|
2630
|
+
T.nilable(Revox::AssistantCreateParams::Voice::Model::OrSymbol)
|
|
2631
|
+
)
|
|
2632
|
+
end
|
|
2633
|
+
attr_reader :model
|
|
2634
|
+
|
|
2635
|
+
sig do
|
|
2636
|
+
params(
|
|
2637
|
+
model: Revox::AssistantCreateParams::Voice::Model::OrSymbol
|
|
2638
|
+
).void
|
|
2639
|
+
end
|
|
2640
|
+
attr_writer :model
|
|
2641
|
+
|
|
853
2642
|
# The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
|
|
854
2643
|
# 0.7–1.2. Default is 1.0.
|
|
855
2644
|
sig { returns(T.nilable(Float)) }
|
|
@@ -858,13 +2647,23 @@ module Revox
|
|
|
858
2647
|
sig { params(speed: Float).void }
|
|
859
2648
|
attr_writer :speed
|
|
860
2649
|
|
|
2650
|
+
# Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
|
|
2651
|
+
# providers.
|
|
2652
|
+
sig { returns(T.nilable(Float)) }
|
|
2653
|
+
attr_reader :volume
|
|
2654
|
+
|
|
2655
|
+
sig { params(volume: Float).void }
|
|
2656
|
+
attr_writer :volume
|
|
2657
|
+
|
|
861
2658
|
# The voice to use for the call. You can get the list of voices using the /voices
|
|
862
2659
|
# endpoint
|
|
863
2660
|
sig do
|
|
864
2661
|
params(
|
|
865
2662
|
id: String,
|
|
866
2663
|
provider: Revox::AssistantCreateParams::Voice::Provider::OrSymbol,
|
|
867
|
-
|
|
2664
|
+
model: Revox::AssistantCreateParams::Voice::Model::OrSymbol,
|
|
2665
|
+
speed: Float,
|
|
2666
|
+
volume: Float
|
|
868
2667
|
).returns(T.attached_class)
|
|
869
2668
|
end
|
|
870
2669
|
def self.new(
|
|
@@ -872,9 +2671,15 @@ module Revox
|
|
|
872
2671
|
id:,
|
|
873
2672
|
# The provider of the voice.
|
|
874
2673
|
provider:,
|
|
2674
|
+
# Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
|
|
2675
|
+
# for other providers.
|
|
2676
|
+
model: nil,
|
|
875
2677
|
# The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
|
|
876
2678
|
# 0.7–1.2. Default is 1.0.
|
|
877
|
-
speed: nil
|
|
2679
|
+
speed: nil,
|
|
2680
|
+
# Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
|
|
2681
|
+
# providers.
|
|
2682
|
+
volume: nil
|
|
878
2683
|
)
|
|
879
2684
|
end
|
|
880
2685
|
|
|
@@ -883,7 +2688,9 @@ module Revox
|
|
|
883
2688
|
{
|
|
884
2689
|
id: String,
|
|
885
2690
|
provider: Revox::AssistantCreateParams::Voice::Provider::OrSymbol,
|
|
886
|
-
|
|
2691
|
+
model: Revox::AssistantCreateParams::Voice::Model::OrSymbol,
|
|
2692
|
+
speed: Float,
|
|
2693
|
+
volume: Float
|
|
887
2694
|
}
|
|
888
2695
|
)
|
|
889
2696
|
end
|
|
@@ -921,6 +2728,234 @@ module Revox
|
|
|
921
2728
|
def self.values
|
|
922
2729
|
end
|
|
923
2730
|
end
|
|
2731
|
+
|
|
2732
|
+
# Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
|
|
2733
|
+
# for other providers.
|
|
2734
|
+
module Model
|
|
2735
|
+
extend Revox::Internal::Type::Enum
|
|
2736
|
+
|
|
2737
|
+
TaggedSymbol =
|
|
2738
|
+
T.type_alias do
|
|
2739
|
+
T.all(Symbol, Revox::AssistantCreateParams::Voice::Model)
|
|
2740
|
+
end
|
|
2741
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2742
|
+
|
|
2743
|
+
SONIC_3 =
|
|
2744
|
+
T.let(
|
|
2745
|
+
:"sonic-3",
|
|
2746
|
+
Revox::AssistantCreateParams::Voice::Model::TaggedSymbol
|
|
2747
|
+
)
|
|
2748
|
+
SONIC_3_5 =
|
|
2749
|
+
T.let(
|
|
2750
|
+
:"sonic-3.5",
|
|
2751
|
+
Revox::AssistantCreateParams::Voice::Model::TaggedSymbol
|
|
2752
|
+
)
|
|
2753
|
+
|
|
2754
|
+
sig do
|
|
2755
|
+
override.returns(
|
|
2756
|
+
T::Array[Revox::AssistantCreateParams::Voice::Model::TaggedSymbol]
|
|
2757
|
+
)
|
|
2758
|
+
end
|
|
2759
|
+
def self.values
|
|
2760
|
+
end
|
|
2761
|
+
end
|
|
2762
|
+
end
|
|
2763
|
+
|
|
2764
|
+
class Zoho < Revox::Internal::Type::BaseModel
|
|
2765
|
+
OrHash =
|
|
2766
|
+
T.type_alias do
|
|
2767
|
+
T.any(Revox::AssistantCreateParams::Zoho, Revox::Internal::AnyHash)
|
|
2768
|
+
end
|
|
2769
|
+
|
|
2770
|
+
# The Nango connection ID linking the org's Zoho CRM account to Revox.
|
|
2771
|
+
sig { returns(String) }
|
|
2772
|
+
attr_accessor :connection_id
|
|
2773
|
+
|
|
2774
|
+
# Maps extracted call fields (structured_output / prompt variables) onto Zoho
|
|
2775
|
+
# field API names on the upserted record.
|
|
2776
|
+
sig do
|
|
2777
|
+
returns(T::Array[Revox::AssistantCreateParams::Zoho::FieldMapping])
|
|
2778
|
+
end
|
|
2779
|
+
attr_accessor :field_mapping
|
|
2780
|
+
|
|
2781
|
+
# When true, also log the call as a record in Zoho's Calls module (related to the
|
|
2782
|
+
# upserted prospect via Who_Id).
|
|
2783
|
+
sig { returns(T::Boolean) }
|
|
2784
|
+
attr_accessor :log_call_activity
|
|
2785
|
+
|
|
2786
|
+
# Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
|
|
2787
|
+
sig { returns(String) }
|
|
2788
|
+
attr_accessor :module_
|
|
2789
|
+
|
|
2790
|
+
# Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
|
|
2791
|
+
# 'none' to push when outcome is null.
|
|
2792
|
+
sig do
|
|
2793
|
+
returns(
|
|
2794
|
+
T::Array[Revox::AssistantCreateParams::Zoho::Outcome::OrSymbol]
|
|
2795
|
+
)
|
|
2796
|
+
end
|
|
2797
|
+
attr_accessor :outcomes
|
|
2798
|
+
|
|
2799
|
+
# Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
2800
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
|
|
2801
|
+
# prompt_variables and structured_output keys. When null/empty a default note
|
|
2802
|
+
# (outcome + summary + auto-listed extracted fields) is used.
|
|
2803
|
+
sig { returns(T.nilable(String)) }
|
|
2804
|
+
attr_accessor :template
|
|
2805
|
+
|
|
2806
|
+
# Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
|
|
2807
|
+
# into the chosen module and attaches a Note with the call summary after a call
|
|
2808
|
+
# ends with one of the configured outcomes.
|
|
2809
|
+
sig do
|
|
2810
|
+
params(
|
|
2811
|
+
connection_id: String,
|
|
2812
|
+
field_mapping:
|
|
2813
|
+
T::Array[
|
|
2814
|
+
Revox::AssistantCreateParams::Zoho::FieldMapping::OrHash
|
|
2815
|
+
],
|
|
2816
|
+
log_call_activity: T::Boolean,
|
|
2817
|
+
module_: String,
|
|
2818
|
+
outcomes:
|
|
2819
|
+
T::Array[Revox::AssistantCreateParams::Zoho::Outcome::OrSymbol],
|
|
2820
|
+
template: T.nilable(String)
|
|
2821
|
+
).returns(T.attached_class)
|
|
2822
|
+
end
|
|
2823
|
+
def self.new(
|
|
2824
|
+
# The Nango connection ID linking the org's Zoho CRM account to Revox.
|
|
2825
|
+
connection_id:,
|
|
2826
|
+
# Maps extracted call fields (structured_output / prompt variables) onto Zoho
|
|
2827
|
+
# field API names on the upserted record.
|
|
2828
|
+
field_mapping:,
|
|
2829
|
+
# When true, also log the call as a record in Zoho's Calls module (related to the
|
|
2830
|
+
# upserted prospect via Who_Id).
|
|
2831
|
+
log_call_activity:,
|
|
2832
|
+
# Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
|
|
2833
|
+
module_:,
|
|
2834
|
+
# Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
|
|
2835
|
+
# 'none' to push when outcome is null.
|
|
2836
|
+
outcomes:,
|
|
2837
|
+
# Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
2838
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
|
|
2839
|
+
# prompt_variables and structured_output keys. When null/empty a default note
|
|
2840
|
+
# (outcome + summary + auto-listed extracted fields) is used.
|
|
2841
|
+
template: nil
|
|
2842
|
+
)
|
|
2843
|
+
end
|
|
2844
|
+
|
|
2845
|
+
sig do
|
|
2846
|
+
override.returns(
|
|
2847
|
+
{
|
|
2848
|
+
connection_id: String,
|
|
2849
|
+
field_mapping:
|
|
2850
|
+
T::Array[Revox::AssistantCreateParams::Zoho::FieldMapping],
|
|
2851
|
+
log_call_activity: T::Boolean,
|
|
2852
|
+
module_: String,
|
|
2853
|
+
outcomes:
|
|
2854
|
+
T::Array[Revox::AssistantCreateParams::Zoho::Outcome::OrSymbol],
|
|
2855
|
+
template: T.nilable(String)
|
|
2856
|
+
}
|
|
2857
|
+
)
|
|
2858
|
+
end
|
|
2859
|
+
def to_hash
|
|
2860
|
+
end
|
|
2861
|
+
|
|
2862
|
+
class FieldMapping < Revox::Internal::Type::BaseModel
|
|
2863
|
+
OrHash =
|
|
2864
|
+
T.type_alias do
|
|
2865
|
+
T.any(
|
|
2866
|
+
Revox::AssistantCreateParams::Zoho::FieldMapping,
|
|
2867
|
+
Revox::Internal::AnyHash
|
|
2868
|
+
)
|
|
2869
|
+
end
|
|
2870
|
+
|
|
2871
|
+
# Source key to read from the call: a structured_output field name, falling back
|
|
2872
|
+
# to a prompt variable of the same name.
|
|
2873
|
+
sig { returns(String) }
|
|
2874
|
+
attr_accessor :source
|
|
2875
|
+
|
|
2876
|
+
# Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
|
|
2877
|
+
# or a custom 'Budget\_\_c').
|
|
2878
|
+
sig { returns(String) }
|
|
2879
|
+
attr_accessor :zoho_field
|
|
2880
|
+
|
|
2881
|
+
sig do
|
|
2882
|
+
params(source: String, zoho_field: String).returns(T.attached_class)
|
|
2883
|
+
end
|
|
2884
|
+
def self.new(
|
|
2885
|
+
# Source key to read from the call: a structured_output field name, falling back
|
|
2886
|
+
# to a prompt variable of the same name.
|
|
2887
|
+
source:,
|
|
2888
|
+
# Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
|
|
2889
|
+
# or a custom 'Budget\_\_c').
|
|
2890
|
+
zoho_field:
|
|
2891
|
+
)
|
|
2892
|
+
end
|
|
2893
|
+
|
|
2894
|
+
sig { override.returns({ source: String, zoho_field: String }) }
|
|
2895
|
+
def to_hash
|
|
2896
|
+
end
|
|
2897
|
+
end
|
|
2898
|
+
|
|
2899
|
+
module Outcome
|
|
2900
|
+
extend Revox::Internal::Type::Enum
|
|
2901
|
+
|
|
2902
|
+
TaggedSymbol =
|
|
2903
|
+
T.type_alias do
|
|
2904
|
+
T.all(Symbol, Revox::AssistantCreateParams::Zoho::Outcome)
|
|
2905
|
+
end
|
|
2906
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2907
|
+
|
|
2908
|
+
NOT_INTERESTED =
|
|
2909
|
+
T.let(
|
|
2910
|
+
:not_interested,
|
|
2911
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2912
|
+
)
|
|
2913
|
+
INTERESTED =
|
|
2914
|
+
T.let(
|
|
2915
|
+
:interested,
|
|
2916
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2917
|
+
)
|
|
2918
|
+
COMPLETED =
|
|
2919
|
+
T.let(
|
|
2920
|
+
:completed,
|
|
2921
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2922
|
+
)
|
|
2923
|
+
REQUESTED_CALLBACK_LATER =
|
|
2924
|
+
T.let(
|
|
2925
|
+
:requested_callback_later,
|
|
2926
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2927
|
+
)
|
|
2928
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
2929
|
+
T.let(
|
|
2930
|
+
:requested_callback_new_number,
|
|
2931
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2932
|
+
)
|
|
2933
|
+
DO_NOT_CONTACT =
|
|
2934
|
+
T.let(
|
|
2935
|
+
:do_not_contact,
|
|
2936
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2937
|
+
)
|
|
2938
|
+
AI_AVERSE =
|
|
2939
|
+
T.let(
|
|
2940
|
+
:ai_averse,
|
|
2941
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2942
|
+
)
|
|
2943
|
+
NONE =
|
|
2944
|
+
T.let(
|
|
2945
|
+
:none,
|
|
2946
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2947
|
+
)
|
|
2948
|
+
|
|
2949
|
+
sig do
|
|
2950
|
+
override.returns(
|
|
2951
|
+
T::Array[
|
|
2952
|
+
Revox::AssistantCreateParams::Zoho::Outcome::TaggedSymbol
|
|
2953
|
+
]
|
|
2954
|
+
)
|
|
2955
|
+
end
|
|
2956
|
+
def self.values
|
|
2957
|
+
end
|
|
2958
|
+
end
|
|
924
2959
|
end
|
|
925
2960
|
end
|
|
926
2961
|
end
|