revox 0.0.2 → 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 +96 -0
- data/README.md +88 -22
- data/lib/revox/client.rb +19 -1
- data/lib/revox/internal/transport/base_client.rb +5 -0
- data/lib/revox/internal/type/base_model.rb +3 -3
- data/lib/revox/internal/util.rb +53 -7
- data/lib/revox/models/assistant_create_params.rb +1036 -11
- data/lib/revox/models/assistant_create_response.rb +1071 -11
- data/lib/revox/models/assistant_delete_params.rb +7 -1
- data/lib/revox/models/assistant_list_response.rb +1070 -11
- data/lib/revox/models/assistant_retrieve_params.rb +7 -1
- data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
- data/lib/revox/models/assistant_update_params.rb +1043 -11
- data/lib/revox/models/assistant_update_response.rb +1097 -12
- data/lib/revox/models/call_create_params.rb +1063 -11
- data/lib/revox/models/call_create_response.rb +2507 -87
- data/lib/revox/models/call_retrieve_params.rb +7 -1
- data/lib/revox/models/call_retrieve_response.rb +2512 -87
- data/lib/revox/models/campaign_cancel_params.rb +20 -0
- data/lib/revox/models/campaign_cancel_response.rb +16 -0
- data/lib/revox/models/campaign_create_params.rb +239 -0
- data/lib/revox/models/campaign_create_response.rb +2030 -0
- data/lib/revox/models/campaign_delete_params.rb +20 -0
- data/lib/revox/models/campaign_delete_response.rb +16 -0
- data/lib/revox/models/campaign_export_rows_params.rb +20 -0
- data/lib/revox/models/campaign_export_rows_response.rb +22 -0
- data/lib/revox/models/campaign_get_rows_params.rb +20 -0
- data/lib/revox/models/campaign_get_rows_response.rb +3176 -0
- data/lib/revox/models/campaign_list_params.rb +14 -0
- data/lib/revox/models/campaign_list_response.rb +2024 -0
- data/lib/revox/models/campaign_retrieve_params.rb +20 -0
- data/lib/revox/models/campaign_retrieve_response.rb +2032 -0
- 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 +43 -3
- data/lib/revox/models/voice_retrieve_params.rb +7 -1
- data/lib/revox/models.rb +14 -2
- data/lib/revox/resources/assistants.rb +138 -6
- data/lib/revox/resources/call.rb +10 -27
- data/lib/revox/resources/campaigns.rb +176 -0
- data/lib/revox/resources/voices.rb +17 -7
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +15 -2
- data/rbi/revox/client.rbi +3 -0
- data/rbi/revox/internal/util.rbi +28 -0
- data/rbi/revox/models/assistant_create_params.rbi +2135 -102
- data/rbi/revox/models/assistant_create_response.rbi +2454 -199
- data/rbi/revox/models/assistant_delete_params.rbi +11 -5
- data/rbi/revox/models/assistant_list_response.rbi +2448 -195
- data/rbi/revox/models/assistant_retrieve_params.rbi +11 -5
- data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
- data/rbi/revox/models/assistant_update_params.rbi +2139 -100
- data/rbi/revox/models/assistant_update_response.rbi +2504 -198
- data/rbi/revox/models/call_create_params.rbi +2377 -222
- data/rbi/revox/models/call_create_response.rbi +5840 -594
- data/rbi/revox/models/call_retrieve_params.rbi +11 -5
- data/rbi/revox/models/call_retrieve_response.rbi +5872 -618
- data/rbi/revox/models/campaign_cancel_params.rbi +33 -0
- data/rbi/revox/models/campaign_cancel_response.rbi +23 -0
- data/rbi/revox/models/campaign_create_params.rbi +433 -0
- data/rbi/revox/models/campaign_create_response.rbi +4170 -0
- data/rbi/revox/models/campaign_delete_params.rbi +33 -0
- data/rbi/revox/models/campaign_delete_response.rbi +23 -0
- data/rbi/revox/models/campaign_export_rows_params.rbi +33 -0
- data/rbi/revox/models/campaign_export_rows_response.rbi +29 -0
- data/rbi/revox/models/campaign_get_rows_params.rbi +33 -0
- data/rbi/revox/models/campaign_get_rows_response.rbi +6706 -0
- data/rbi/revox/models/campaign_list_params.rbi +27 -0
- data/rbi/revox/models/campaign_list_response.rbi +4156 -0
- data/rbi/revox/models/campaign_retrieve_params.rbi +33 -0
- data/rbi/revox/models/campaign_retrieve_response.rbi +4175 -0
- 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 +60 -2
- data/rbi/revox/models/voice_retrieve_params.rbi +6 -1
- data/rbi/revox/models.rbi +14 -2
- data/rbi/revox/resources/assistants.rbi +301 -6
- data/rbi/revox/resources/call.rbi +10 -19
- data/rbi/revox/resources/campaigns.rbi +121 -0
- data/rbi/revox/resources/voices.rbi +15 -5
- data/sig/revox/client.rbs +2 -0
- data/sig/revox/internal/util.rbs +14 -0
- data/sig/revox/models/assistant_create_params.rbs +841 -4
- data/sig/revox/models/assistant_create_response.rbs +860 -3
- data/sig/revox/models/assistant_delete_params.rbs +8 -3
- data/sig/revox/models/assistant_list_response.rbs +860 -3
- data/sig/revox/models/assistant_retrieve_params.rbs +8 -3
- data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
- data/sig/revox/models/assistant_update_params.rbs +846 -4
- data/sig/revox/models/assistant_update_response.rbs +886 -6
- data/sig/revox/models/call_create_params.rbs +844 -6
- data/sig/revox/models/call_create_response.rbs +2166 -79
- data/sig/revox/models/call_retrieve_params.rbs +9 -3
- data/sig/revox/models/call_retrieve_response.rbs +2166 -79
- data/sig/revox/models/campaign_cancel_params.rbs +20 -0
- data/sig/revox/models/campaign_cancel_response.rbs +13 -0
- data/sig/revox/models/campaign_create_params.rbs +203 -0
- data/sig/revox/models/campaign_create_response.rbs +1694 -0
- data/sig/revox/models/campaign_delete_params.rbs +20 -0
- data/sig/revox/models/campaign_delete_response.rbs +13 -0
- data/sig/revox/models/campaign_export_rows_params.rbs +20 -0
- data/sig/revox/models/campaign_export_rows_response.rbs +15 -0
- data/sig/revox/models/campaign_get_rows_params.rbs +20 -0
- data/sig/revox/models/campaign_get_rows_response.rbs +2688 -0
- data/sig/revox/models/campaign_list_params.rbs +14 -0
- data/sig/revox/models/campaign_list_response.rbs +1694 -0
- data/sig/revox/models/campaign_retrieve_params.rbs +20 -0
- data/sig/revox/models/campaign_retrieve_response.rbs +1694 -0
- 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 +35 -1
- data/sig/revox/models/voice_retrieve_params.rbs +5 -1
- data/sig/revox/models.rbs +14 -2
- data/sig/revox/resources/assistants.rbs +54 -0
- data/sig/revox/resources/call.rbs +0 -6
- data/sig/revox/resources/campaigns.rbs +49 -0
- data/sig/revox/resources/voices.rbs +3 -0
- metadata +47 -8
- data/lib/revox/models/call_list_params.rb +0 -29
- data/lib/revox/models/call_list_response.rb +0 -197
- data/rbi/revox/models/call_list_params.rbi +0 -47
- data/rbi/revox/models/call_list_response.rbi +0 -401
- data/sig/revox/models/call_list_params.rbs +0 -28
- data/sig/revox/models/call_list_response.rbs +0 -171
|
@@ -153,8 +153,26 @@ module Revox
|
|
|
153
153
|
sig { returns(String) }
|
|
154
154
|
attr_accessor :prompt
|
|
155
155
|
|
|
156
|
-
#
|
|
157
|
-
#
|
|
156
|
+
# Which call outcomes trigger the after-call SMS. When empty or null, no
|
|
157
|
+
# after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
|
|
158
|
+
# when outcome is null.
|
|
159
|
+
sig do
|
|
160
|
+
returns(
|
|
161
|
+
T.nilable(
|
|
162
|
+
T::Array[
|
|
163
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::OrSymbol
|
|
164
|
+
]
|
|
165
|
+
)
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
attr_accessor :after_call_sms_outcomes
|
|
169
|
+
|
|
170
|
+
# Prompt / instructions for the after-call SMS. Supports {{variable}}
|
|
171
|
+
# placeholders. When null, no after-call SMS is sent.
|
|
172
|
+
sig { returns(T.nilable(String)) }
|
|
173
|
+
attr_accessor :after_call_sms_prompt
|
|
174
|
+
|
|
175
|
+
# Ambient background sound to play during the call. null/omitted disables it.
|
|
158
176
|
sig do
|
|
159
177
|
returns(
|
|
160
178
|
T.nilable(
|
|
@@ -164,6 +182,13 @@ module Revox
|
|
|
164
182
|
end
|
|
165
183
|
attr_accessor :background_sound
|
|
166
184
|
|
|
185
|
+
# Volume of the ambient background sound (0 = silent, 1 = max).
|
|
186
|
+
sig { returns(T.nilable(Float)) }
|
|
187
|
+
attr_reader :background_sound_volume
|
|
188
|
+
|
|
189
|
+
sig { params(background_sound_volume: Float).void }
|
|
190
|
+
attr_writer :background_sound_volume
|
|
191
|
+
|
|
167
192
|
sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Calendly)) }
|
|
168
193
|
attr_reader :calendly
|
|
169
194
|
|
|
@@ -192,6 +217,58 @@ module Revox
|
|
|
192
217
|
end
|
|
193
218
|
attr_writer :call_retry_config
|
|
194
219
|
|
|
220
|
+
# Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
|
|
221
|
+
# Set null to unlink it.
|
|
222
|
+
sig { returns(T.nilable(String)) }
|
|
223
|
+
attr_accessor :cartesia_dictionary_pronunciation_id
|
|
224
|
+
|
|
225
|
+
# Custom API tools the assistant can call during conversations. Each tool defines
|
|
226
|
+
# an HTTP endpoint with variable substitution.
|
|
227
|
+
sig do
|
|
228
|
+
returns(
|
|
229
|
+
T.nilable(T::Array[Revox::CallCreateParams::Assistant::CustomTool])
|
|
230
|
+
)
|
|
231
|
+
end
|
|
232
|
+
attr_accessor :custom_tools
|
|
233
|
+
|
|
234
|
+
# Email address(es) to receive notifications when a call ends with a matching
|
|
235
|
+
# outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
|
|
236
|
+
# bob@y.com").
|
|
237
|
+
sig { returns(T.nilable(String)) }
|
|
238
|
+
attr_accessor :email_notification_address
|
|
239
|
+
|
|
240
|
+
# The language used for the notification email content. One of "en" or "fr".
|
|
241
|
+
# Defaults to "en".
|
|
242
|
+
sig do
|
|
243
|
+
returns(
|
|
244
|
+
T.nilable(
|
|
245
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage::OrSymbol
|
|
246
|
+
)
|
|
247
|
+
)
|
|
248
|
+
end
|
|
249
|
+
attr_reader :email_notification_language
|
|
250
|
+
|
|
251
|
+
sig do
|
|
252
|
+
params(
|
|
253
|
+
email_notification_language:
|
|
254
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage::OrSymbol
|
|
255
|
+
).void
|
|
256
|
+
end
|
|
257
|
+
attr_writer :email_notification_language
|
|
258
|
+
|
|
259
|
+
# Which call outcomes trigger an email notification. E.g. ["interested",
|
|
260
|
+
# "completed", "none"]. Use "none" when outcome is null.
|
|
261
|
+
sig do
|
|
262
|
+
returns(
|
|
263
|
+
T.nilable(
|
|
264
|
+
T::Array[
|
|
265
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::OrSymbol
|
|
266
|
+
]
|
|
267
|
+
)
|
|
268
|
+
)
|
|
269
|
+
end
|
|
270
|
+
attr_accessor :email_notification_outcomes
|
|
271
|
+
|
|
195
272
|
# Optional message to say when the agent decides to end the call.
|
|
196
273
|
sig { returns(T.nilable(String)) }
|
|
197
274
|
attr_reader :end_of_call_sentence
|
|
@@ -251,6 +328,23 @@ module Revox
|
|
|
251
328
|
end
|
|
252
329
|
attr_writer :first_sentence_mode
|
|
253
330
|
|
|
331
|
+
# Override the default outbound phone number for calls placed with this assistant.
|
|
332
|
+
# Must be a phone number owned by the organization in E.164 format (e.g.
|
|
333
|
+
# +1234567890). When null, the organization's default phone number is used.
|
|
334
|
+
sig { returns(T.nilable(String)) }
|
|
335
|
+
attr_accessor :from_phone_number
|
|
336
|
+
|
|
337
|
+
# When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
|
|
338
|
+
# trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
|
|
339
|
+
sig do
|
|
340
|
+
returns(
|
|
341
|
+
T.nilable(
|
|
342
|
+
Revox::CallCreateParams::Assistant::HumanTransferMode::OrSymbol
|
|
343
|
+
)
|
|
344
|
+
)
|
|
345
|
+
end
|
|
346
|
+
attr_accessor :human_transfer_mode
|
|
347
|
+
|
|
254
348
|
# Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
|
|
255
349
|
# skip turns to navigate phone menus.
|
|
256
350
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -264,7 +358,9 @@ module Revox
|
|
|
264
358
|
T.nilable(
|
|
265
359
|
T.any(
|
|
266
360
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
|
|
267
|
-
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1
|
|
361
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1,
|
|
362
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2,
|
|
363
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3
|
|
268
364
|
)
|
|
269
365
|
)
|
|
270
366
|
)
|
|
@@ -276,12 +372,19 @@ module Revox
|
|
|
276
372
|
llm_model:
|
|
277
373
|
T.any(
|
|
278
374
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::OrHash,
|
|
279
|
-
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1::OrHash
|
|
375
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1::OrHash,
|
|
376
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2::OrHash,
|
|
377
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::OrHash
|
|
280
378
|
)
|
|
281
379
|
).void
|
|
282
380
|
end
|
|
283
381
|
attr_writer :llm_model
|
|
284
382
|
|
|
383
|
+
# Public URL of the brand logo shown on the assistant's demo page. Upload a new
|
|
384
|
+
# logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
|
|
385
|
+
sig { returns(T.nilable(String)) }
|
|
386
|
+
attr_accessor :logo_url
|
|
387
|
+
|
|
285
388
|
# The maximum duration of the call in seconds. This is the maximum time the call
|
|
286
389
|
# will be allowed to run.
|
|
287
390
|
sig { returns(T.nilable(Float)) }
|
|
@@ -290,6 +393,66 @@ module Revox
|
|
|
290
393
|
sig { params(max_call_duration_secs: Float).void }
|
|
291
394
|
attr_writer :max_call_duration_secs
|
|
292
395
|
|
|
396
|
+
# Optional message the agent will say, without being interruptible, when the call
|
|
397
|
+
# reaches its max duration. Kept short so it fits inside the farewell buffer. If
|
|
398
|
+
# not set, the call ends silently.
|
|
399
|
+
sig { returns(T.nilable(String)) }
|
|
400
|
+
attr_accessor :max_duration_end_message
|
|
401
|
+
|
|
402
|
+
# Canvas position of this assistant's node in its multi-step flow editor.
|
|
403
|
+
sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Position)) }
|
|
404
|
+
attr_reader :position
|
|
405
|
+
|
|
406
|
+
sig do
|
|
407
|
+
params(
|
|
408
|
+
position:
|
|
409
|
+
T.nilable(Revox::CallCreateParams::Assistant::Position::OrHash)
|
|
410
|
+
).void
|
|
411
|
+
end
|
|
412
|
+
attr_writer :position
|
|
413
|
+
|
|
414
|
+
# Visual prompt constructor data (nodes, edges, positions). Used by the UI to
|
|
415
|
+
# re-open the visual editor. Does not affect call behavior — the flattened prompt
|
|
416
|
+
# field is what the LLM receives.
|
|
417
|
+
sig do
|
|
418
|
+
returns(T.nilable(Revox::CallCreateParams::Assistant::PromptFlow))
|
|
419
|
+
end
|
|
420
|
+
attr_reader :prompt_flow
|
|
421
|
+
|
|
422
|
+
sig do
|
|
423
|
+
params(
|
|
424
|
+
prompt_flow:
|
|
425
|
+
T.nilable(Revox::CallCreateParams::Assistant::PromptFlow::OrHash)
|
|
426
|
+
).void
|
|
427
|
+
end
|
|
428
|
+
attr_writer :prompt_flow
|
|
429
|
+
|
|
430
|
+
# Slack notification config. When set, posts a message to the chosen channel after
|
|
431
|
+
# a call ends with one of the configured outcomes.
|
|
432
|
+
sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Slack)) }
|
|
433
|
+
attr_reader :slack
|
|
434
|
+
|
|
435
|
+
sig do
|
|
436
|
+
params(
|
|
437
|
+
slack: T.nilable(Revox::CallCreateParams::Assistant::Slack::OrHash)
|
|
438
|
+
).void
|
|
439
|
+
end
|
|
440
|
+
attr_writer :slack
|
|
441
|
+
|
|
442
|
+
# Enable SMS tool during calls. When enabled, the agent can send SMS messages to
|
|
443
|
+
# the user on the call.
|
|
444
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
445
|
+
attr_reader :sms_enabled
|
|
446
|
+
|
|
447
|
+
sig { params(sms_enabled: T::Boolean).void }
|
|
448
|
+
attr_writer :sms_enabled
|
|
449
|
+
|
|
450
|
+
# Hardcoded SMS template to send during calls. When set, this exact text is sent
|
|
451
|
+
# instead of letting the agent generate the message. Supports {{variable}}
|
|
452
|
+
# placeholders.
|
|
453
|
+
sig { returns(T.nilable(String)) }
|
|
454
|
+
attr_accessor :sms_template
|
|
455
|
+
|
|
293
456
|
# The structured output config to use for the call. This is used to extract the
|
|
294
457
|
# data from the call (like email, name, company name, etc.).
|
|
295
458
|
sig do
|
|
@@ -313,11 +476,89 @@ module Revox
|
|
|
313
476
|
end
|
|
314
477
|
attr_writer :structured_output_config
|
|
315
478
|
|
|
479
|
+
# Custom prompt for structured data extraction. If not provided, a default prompt
|
|
480
|
+
# is used. Available variables: {{transcript}}, {{call_direction}},
|
|
481
|
+
# {{user_phone_number}}, {{agent_phone_number}}.
|
|
482
|
+
sig { returns(T.nilable(String)) }
|
|
483
|
+
attr_accessor :structured_output_prompt
|
|
484
|
+
|
|
485
|
+
# Assistant-level speech-to-text context: structured `general` key/value pairs
|
|
486
|
+
# plus a list of domain `terms`. Prompt-derived context is merged in without
|
|
487
|
+
# replacing existing entries.
|
|
488
|
+
sig do
|
|
489
|
+
returns(T.nilable(Revox::CallCreateParams::Assistant::SttContext))
|
|
490
|
+
end
|
|
491
|
+
attr_reader :stt_context
|
|
492
|
+
|
|
493
|
+
sig do
|
|
494
|
+
params(
|
|
495
|
+
stt_context:
|
|
496
|
+
T.nilable(Revox::CallCreateParams::Assistant::SttContext::OrHash)
|
|
497
|
+
).void
|
|
498
|
+
end
|
|
499
|
+
attr_writer :stt_context
|
|
500
|
+
|
|
501
|
+
# Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
|
|
502
|
+
# when omitted.
|
|
503
|
+
sig do
|
|
504
|
+
returns(
|
|
505
|
+
T.nilable(Revox::CallCreateParams::Assistant::SttModel::OrSymbol)
|
|
506
|
+
)
|
|
507
|
+
end
|
|
508
|
+
attr_reader :stt_model
|
|
509
|
+
|
|
510
|
+
sig do
|
|
511
|
+
params(
|
|
512
|
+
stt_model: Revox::CallCreateParams::Assistant::SttModel::OrSymbol
|
|
513
|
+
).void
|
|
514
|
+
end
|
|
515
|
+
attr_writer :stt_model
|
|
516
|
+
|
|
517
|
+
# Audio clip to play while the agent is processing a response. One of the built-in
|
|
518
|
+
# LiveKit audio clips; null/omitted disables it.
|
|
519
|
+
sig do
|
|
520
|
+
returns(
|
|
521
|
+
T.nilable(
|
|
522
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::OrSymbol
|
|
523
|
+
)
|
|
524
|
+
)
|
|
525
|
+
end
|
|
526
|
+
attr_accessor :thinking_sound
|
|
527
|
+
|
|
528
|
+
# Probability [0..1] that the thinking sound plays on any given turn; otherwise
|
|
529
|
+
# the agent is silent while thinking.
|
|
530
|
+
sig { returns(T.nilable(Float)) }
|
|
531
|
+
attr_reader :thinking_sound_probability
|
|
532
|
+
|
|
533
|
+
sig { params(thinking_sound_probability: Float).void }
|
|
534
|
+
attr_writer :thinking_sound_probability
|
|
535
|
+
|
|
536
|
+
# Volume of the thinking sound (0 = silent, 1 = max).
|
|
537
|
+
sig { returns(T.nilable(Float)) }
|
|
538
|
+
attr_reader :thinking_sound_volume
|
|
539
|
+
|
|
540
|
+
sig { params(thinking_sound_volume: Float).void }
|
|
541
|
+
attr_writer :thinking_sound_volume
|
|
542
|
+
|
|
316
543
|
# Phone number to transfer calls to when users request to speak to a human agent
|
|
317
544
|
# in E.164 format (e.g. +1234567890).
|
|
318
545
|
sig { returns(T.nilable(String)) }
|
|
319
546
|
attr_accessor :transfer_phone_number
|
|
320
547
|
|
|
548
|
+
# Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
|
|
549
|
+
# orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
|
|
550
|
+
# multi-step flow (hidden from the assistants list). Flow transitions are managed
|
|
551
|
+
# via the /assistants/:id/edges endpoints, not on the assistant itself.
|
|
552
|
+
sig do
|
|
553
|
+
returns(T.nilable(Revox::CallCreateParams::Assistant::Type::OrSymbol))
|
|
554
|
+
end
|
|
555
|
+
attr_reader :type
|
|
556
|
+
|
|
557
|
+
sig do
|
|
558
|
+
params(type: Revox::CallCreateParams::Assistant::Type::OrSymbol).void
|
|
559
|
+
end
|
|
560
|
+
attr_writer :type
|
|
561
|
+
|
|
321
562
|
# The voice to use for the call. You can get the list of voices using the /voices
|
|
322
563
|
# endpoint
|
|
323
564
|
sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Voice)) }
|
|
@@ -333,6 +574,17 @@ module Revox
|
|
|
333
574
|
sig { returns(T.nilable(String)) }
|
|
334
575
|
attr_accessor :voicemail_message
|
|
335
576
|
|
|
577
|
+
# SMS message to send when the call reaches voicemail. Supports {{variable}}
|
|
578
|
+
# placeholders. When null, no SMS is sent on voicemail.
|
|
579
|
+
sig { returns(T.nilable(String)) }
|
|
580
|
+
attr_accessor :voicemail_sms_prompt
|
|
581
|
+
|
|
582
|
+
# When using warm transfer: extra instructions for the supervisor handoff summary.
|
|
583
|
+
# If null or empty, the API uses the product default briefing when the call is
|
|
584
|
+
# loaded for the agent.
|
|
585
|
+
sig { returns(T.nilable(String)) }
|
|
586
|
+
attr_accessor :warm_transfer_summary_instructions
|
|
587
|
+
|
|
336
588
|
# The webhook URL to call when the call is completed.
|
|
337
589
|
sig { returns(T.nilable(String)) }
|
|
338
590
|
attr_reader :webhook_url
|
|
@@ -340,19 +592,54 @@ module Revox
|
|
|
340
592
|
sig { params(webhook_url: String).void }
|
|
341
593
|
attr_writer :webhook_url
|
|
342
594
|
|
|
595
|
+
# Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
|
|
596
|
+
# into the chosen module and attaches a Note with the call summary after a call
|
|
597
|
+
# ends with one of the configured outcomes.
|
|
598
|
+
sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Zoho)) }
|
|
599
|
+
attr_reader :zoho
|
|
600
|
+
|
|
601
|
+
sig do
|
|
602
|
+
params(
|
|
603
|
+
zoho: T.nilable(Revox::CallCreateParams::Assistant::Zoho::OrHash)
|
|
604
|
+
).void
|
|
605
|
+
end
|
|
606
|
+
attr_writer :zoho
|
|
607
|
+
|
|
343
608
|
# You can provide a custom assistant configuration here. If you don't provide an
|
|
344
609
|
# assistant_id, this assistant object will be used for this call.
|
|
345
610
|
sig do
|
|
346
611
|
params(
|
|
347
612
|
prompt: String,
|
|
613
|
+
after_call_sms_outcomes:
|
|
614
|
+
T.nilable(
|
|
615
|
+
T::Array[
|
|
616
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::OrSymbol
|
|
617
|
+
]
|
|
618
|
+
),
|
|
619
|
+
after_call_sms_prompt: T.nilable(String),
|
|
348
620
|
background_sound:
|
|
349
621
|
T.nilable(
|
|
350
622
|
Revox::CallCreateParams::Assistant::BackgroundSound::OrSymbol
|
|
351
623
|
),
|
|
624
|
+
background_sound_volume: Float,
|
|
352
625
|
calendly:
|
|
353
626
|
T.nilable(Revox::CallCreateParams::Assistant::Calendly::OrHash),
|
|
354
627
|
call_retry_config:
|
|
355
628
|
Revox::CallCreateParams::Assistant::CallRetryConfig::OrHash,
|
|
629
|
+
cartesia_dictionary_pronunciation_id: T.nilable(String),
|
|
630
|
+
custom_tools:
|
|
631
|
+
T.nilable(
|
|
632
|
+
T::Array[Revox::CallCreateParams::Assistant::CustomTool::OrHash]
|
|
633
|
+
),
|
|
634
|
+
email_notification_address: T.nilable(String),
|
|
635
|
+
email_notification_language:
|
|
636
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage::OrSymbol,
|
|
637
|
+
email_notification_outcomes:
|
|
638
|
+
T.nilable(
|
|
639
|
+
T::Array[
|
|
640
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::OrSymbol
|
|
641
|
+
]
|
|
642
|
+
),
|
|
356
643
|
end_of_call_sentence: String,
|
|
357
644
|
faq_items:
|
|
358
645
|
T::Array[Revox::CallCreateParams::Assistant::FaqItem::OrHash],
|
|
@@ -360,33 +647,87 @@ module Revox
|
|
|
360
647
|
first_sentence_delay_ms: Integer,
|
|
361
648
|
first_sentence_mode:
|
|
362
649
|
Revox::CallCreateParams::Assistant::FirstSentenceMode::OrSymbol,
|
|
650
|
+
from_phone_number: T.nilable(String),
|
|
651
|
+
human_transfer_mode:
|
|
652
|
+
T.nilable(
|
|
653
|
+
Revox::CallCreateParams::Assistant::HumanTransferMode::OrSymbol
|
|
654
|
+
),
|
|
363
655
|
ivr_navigation_enabled: T::Boolean,
|
|
364
656
|
llm_model:
|
|
365
657
|
T.any(
|
|
366
658
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::OrHash,
|
|
367
|
-
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1::OrHash
|
|
659
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1::OrHash,
|
|
660
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2::OrHash,
|
|
661
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::OrHash
|
|
368
662
|
),
|
|
663
|
+
logo_url: T.nilable(String),
|
|
369
664
|
max_call_duration_secs: Float,
|
|
665
|
+
max_duration_end_message: T.nilable(String),
|
|
666
|
+
position:
|
|
667
|
+
T.nilable(Revox::CallCreateParams::Assistant::Position::OrHash),
|
|
668
|
+
prompt_flow:
|
|
669
|
+
T.nilable(Revox::CallCreateParams::Assistant::PromptFlow::OrHash),
|
|
670
|
+
slack: T.nilable(Revox::CallCreateParams::Assistant::Slack::OrHash),
|
|
671
|
+
sms_enabled: T::Boolean,
|
|
672
|
+
sms_template: T.nilable(String),
|
|
370
673
|
structured_output_config:
|
|
371
674
|
T::Array[
|
|
372
675
|
Revox::CallCreateParams::Assistant::StructuredOutputConfig::OrHash
|
|
373
676
|
],
|
|
677
|
+
structured_output_prompt: T.nilable(String),
|
|
678
|
+
stt_context:
|
|
679
|
+
T.nilable(Revox::CallCreateParams::Assistant::SttContext::OrHash),
|
|
680
|
+
stt_model: Revox::CallCreateParams::Assistant::SttModel::OrSymbol,
|
|
681
|
+
thinking_sound:
|
|
682
|
+
T.nilable(
|
|
683
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::OrSymbol
|
|
684
|
+
),
|
|
685
|
+
thinking_sound_probability: Float,
|
|
686
|
+
thinking_sound_volume: Float,
|
|
374
687
|
transfer_phone_number: T.nilable(String),
|
|
688
|
+
type: Revox::CallCreateParams::Assistant::Type::OrSymbol,
|
|
375
689
|
voice: Revox::CallCreateParams::Assistant::Voice::OrHash,
|
|
376
690
|
voicemail_message: T.nilable(String),
|
|
377
|
-
|
|
691
|
+
voicemail_sms_prompt: T.nilable(String),
|
|
692
|
+
warm_transfer_summary_instructions: T.nilable(String),
|
|
693
|
+
webhook_url: String,
|
|
694
|
+
zoho: T.nilable(Revox::CallCreateParams::Assistant::Zoho::OrHash)
|
|
378
695
|
).returns(T.attached_class)
|
|
379
696
|
end
|
|
380
697
|
def self.new(
|
|
381
698
|
# The prompt to use for the call. This will be given to the LLM (gpt-4.1)
|
|
382
699
|
prompt:,
|
|
383
|
-
#
|
|
384
|
-
#
|
|
700
|
+
# Which call outcomes trigger the after-call SMS. When empty or null, no
|
|
701
|
+
# after-call SMS is sent. E.g. ["interested", "completed", "none"]. Use "none"
|
|
702
|
+
# when outcome is null.
|
|
703
|
+
after_call_sms_outcomes: nil,
|
|
704
|
+
# Prompt / instructions for the after-call SMS. Supports {{variable}}
|
|
705
|
+
# placeholders. When null, no after-call SMS is sent.
|
|
706
|
+
after_call_sms_prompt: nil,
|
|
707
|
+
# Ambient background sound to play during the call. null/omitted disables it.
|
|
385
708
|
background_sound: nil,
|
|
709
|
+
# Volume of the ambient background sound (0 = silent, 1 = max).
|
|
710
|
+
background_sound_volume: nil,
|
|
386
711
|
calendly: nil,
|
|
387
712
|
# Configuration for call retry behavior including time windows, delays, and max
|
|
388
713
|
# iterations. If not provided, defaults will be used.
|
|
389
714
|
call_retry_config: nil,
|
|
715
|
+
# Optional Cartesia pronunciation dictionary ID to use for this assistant's calls.
|
|
716
|
+
# Set null to unlink it.
|
|
717
|
+
cartesia_dictionary_pronunciation_id: nil,
|
|
718
|
+
# Custom API tools the assistant can call during conversations. Each tool defines
|
|
719
|
+
# an HTTP endpoint with variable substitution.
|
|
720
|
+
custom_tools: nil,
|
|
721
|
+
# Email address(es) to receive notifications when a call ends with a matching
|
|
722
|
+
# outcome. Accepts a single email or a comma-separated list (e.g. "alice@x.com,
|
|
723
|
+
# bob@y.com").
|
|
724
|
+
email_notification_address: nil,
|
|
725
|
+
# The language used for the notification email content. One of "en" or "fr".
|
|
726
|
+
# Defaults to "en".
|
|
727
|
+
email_notification_language: nil,
|
|
728
|
+
# Which call outcomes trigger an email notification. E.g. ["interested",
|
|
729
|
+
# "completed", "none"]. Use "none" when outcome is null.
|
|
730
|
+
email_notification_outcomes: nil,
|
|
390
731
|
# Optional message to say when the agent decides to end the call.
|
|
391
732
|
end_of_call_sentence: nil,
|
|
392
733
|
# FAQ items to associate with this assistant. When provided, replaces all existing
|
|
@@ -401,27 +742,92 @@ module Revox
|
|
|
401
742
|
# first_sentence will be spoken exactly as provided. "none" means the agent will
|
|
402
743
|
# not speak first and will wait for the user.
|
|
403
744
|
first_sentence_mode: nil,
|
|
745
|
+
# Override the default outbound phone number for calls placed with this assistant.
|
|
746
|
+
# Must be a phone number owned by the organization in E.164 format (e.g.
|
|
747
|
+
# +1234567890). When null, the organization's default phone number is used.
|
|
748
|
+
from_phone_number: nil,
|
|
749
|
+
# When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
|
|
750
|
+
# trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
|
|
751
|
+
human_transfer_mode: nil,
|
|
404
752
|
# Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
|
|
405
753
|
# skip turns to navigate phone menus.
|
|
406
754
|
ivr_navigation_enabled: nil,
|
|
407
755
|
llm_model: nil,
|
|
756
|
+
# Public URL of the brand logo shown on the assistant's demo page. Upload a new
|
|
757
|
+
# logo via POST /assistants/:id/logo. Set explicitly to null to clear it.
|
|
758
|
+
logo_url: nil,
|
|
408
759
|
# The maximum duration of the call in seconds. This is the maximum time the call
|
|
409
760
|
# will be allowed to run.
|
|
410
761
|
max_call_duration_secs: nil,
|
|
762
|
+
# Optional message the agent will say, without being interruptible, when the call
|
|
763
|
+
# reaches its max duration. Kept short so it fits inside the farewell buffer. If
|
|
764
|
+
# not set, the call ends silently.
|
|
765
|
+
max_duration_end_message: nil,
|
|
766
|
+
# Canvas position of this assistant's node in its multi-step flow editor.
|
|
767
|
+
position: nil,
|
|
768
|
+
# Visual prompt constructor data (nodes, edges, positions). Used by the UI to
|
|
769
|
+
# re-open the visual editor. Does not affect call behavior — the flattened prompt
|
|
770
|
+
# field is what the LLM receives.
|
|
771
|
+
prompt_flow: nil,
|
|
772
|
+
# Slack notification config. When set, posts a message to the chosen channel after
|
|
773
|
+
# a call ends with one of the configured outcomes.
|
|
774
|
+
slack: nil,
|
|
775
|
+
# Enable SMS tool during calls. When enabled, the agent can send SMS messages to
|
|
776
|
+
# the user on the call.
|
|
777
|
+
sms_enabled: nil,
|
|
778
|
+
# Hardcoded SMS template to send during calls. When set, this exact text is sent
|
|
779
|
+
# instead of letting the agent generate the message. Supports {{variable}}
|
|
780
|
+
# placeholders.
|
|
781
|
+
sms_template: nil,
|
|
411
782
|
# The structured output config to use for the call. This is used to extract the
|
|
412
783
|
# data from the call (like email, name, company name, etc.).
|
|
413
784
|
structured_output_config: nil,
|
|
785
|
+
# Custom prompt for structured data extraction. If not provided, a default prompt
|
|
786
|
+
# is used. Available variables: {{transcript}}, {{call_direction}},
|
|
787
|
+
# {{user_phone_number}}, {{agent_phone_number}}.
|
|
788
|
+
structured_output_prompt: nil,
|
|
789
|
+
# Assistant-level speech-to-text context: structured `general` key/value pairs
|
|
790
|
+
# plus a list of domain `terms`. Prompt-derived context is merged in without
|
|
791
|
+
# replacing existing entries.
|
|
792
|
+
stt_context: nil,
|
|
793
|
+
# Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
|
|
794
|
+
# when omitted.
|
|
795
|
+
stt_model: nil,
|
|
796
|
+
# Audio clip to play while the agent is processing a response. One of the built-in
|
|
797
|
+
# LiveKit audio clips; null/omitted disables it.
|
|
798
|
+
thinking_sound: nil,
|
|
799
|
+
# Probability [0..1] that the thinking sound plays on any given turn; otherwise
|
|
800
|
+
# the agent is silent while thinking.
|
|
801
|
+
thinking_sound_probability: nil,
|
|
802
|
+
# Volume of the thinking sound (0 = silent, 1 = max).
|
|
803
|
+
thinking_sound_volume: nil,
|
|
414
804
|
# Phone number to transfer calls to when users request to speak to a human agent
|
|
415
805
|
# in E.164 format (e.g. +1234567890).
|
|
416
806
|
transfer_phone_number: nil,
|
|
807
|
+
# Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
|
|
808
|
+
# orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
|
|
809
|
+
# multi-step flow (hidden from the assistants list). Flow transitions are managed
|
|
810
|
+
# via the /assistants/:id/edges endpoints, not on the assistant itself.
|
|
811
|
+
type: nil,
|
|
417
812
|
# The voice to use for the call. You can get the list of voices using the /voices
|
|
418
813
|
# endpoint
|
|
419
814
|
voice: nil,
|
|
420
815
|
# If set, when voicemail is detected the agent will speak this message then hang
|
|
421
816
|
# up; if null, hang up immediately.
|
|
422
817
|
voicemail_message: nil,
|
|
818
|
+
# SMS message to send when the call reaches voicemail. Supports {{variable}}
|
|
819
|
+
# placeholders. When null, no SMS is sent on voicemail.
|
|
820
|
+
voicemail_sms_prompt: nil,
|
|
821
|
+
# When using warm transfer: extra instructions for the supervisor handoff summary.
|
|
822
|
+
# If null or empty, the API uses the product default briefing when the call is
|
|
823
|
+
# loaded for the agent.
|
|
824
|
+
warm_transfer_summary_instructions: nil,
|
|
423
825
|
# The webhook URL to call when the call is completed.
|
|
424
|
-
webhook_url: nil
|
|
826
|
+
webhook_url: nil,
|
|
827
|
+
# Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
|
|
828
|
+
# into the chosen module and attaches a Note with the call summary after a call
|
|
829
|
+
# ends with one of the configured outcomes.
|
|
830
|
+
zoho: nil
|
|
425
831
|
)
|
|
426
832
|
end
|
|
427
833
|
|
|
@@ -429,42 +835,156 @@ module Revox
|
|
|
429
835
|
override.returns(
|
|
430
836
|
{
|
|
431
837
|
prompt: String,
|
|
838
|
+
after_call_sms_outcomes:
|
|
839
|
+
T.nilable(
|
|
840
|
+
T::Array[
|
|
841
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::OrSymbol
|
|
842
|
+
]
|
|
843
|
+
),
|
|
844
|
+
after_call_sms_prompt: T.nilable(String),
|
|
432
845
|
background_sound:
|
|
433
846
|
T.nilable(
|
|
434
847
|
Revox::CallCreateParams::Assistant::BackgroundSound::OrSymbol
|
|
435
848
|
),
|
|
849
|
+
background_sound_volume: Float,
|
|
436
850
|
calendly: T.nilable(Revox::CallCreateParams::Assistant::Calendly),
|
|
437
851
|
call_retry_config:
|
|
438
852
|
Revox::CallCreateParams::Assistant::CallRetryConfig,
|
|
853
|
+
cartesia_dictionary_pronunciation_id: T.nilable(String),
|
|
854
|
+
custom_tools:
|
|
855
|
+
T.nilable(
|
|
856
|
+
T::Array[Revox::CallCreateParams::Assistant::CustomTool]
|
|
857
|
+
),
|
|
858
|
+
email_notification_address: T.nilable(String),
|
|
859
|
+
email_notification_language:
|
|
860
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage::OrSymbol,
|
|
861
|
+
email_notification_outcomes:
|
|
862
|
+
T.nilable(
|
|
863
|
+
T::Array[
|
|
864
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::OrSymbol
|
|
865
|
+
]
|
|
866
|
+
),
|
|
439
867
|
end_of_call_sentence: String,
|
|
440
868
|
faq_items: T::Array[Revox::CallCreateParams::Assistant::FaqItem],
|
|
441
869
|
first_sentence: String,
|
|
442
870
|
first_sentence_delay_ms: Integer,
|
|
443
871
|
first_sentence_mode:
|
|
444
872
|
Revox::CallCreateParams::Assistant::FirstSentenceMode::OrSymbol,
|
|
873
|
+
from_phone_number: T.nilable(String),
|
|
874
|
+
human_transfer_mode:
|
|
875
|
+
T.nilable(
|
|
876
|
+
Revox::CallCreateParams::Assistant::HumanTransferMode::OrSymbol
|
|
877
|
+
),
|
|
445
878
|
ivr_navigation_enabled: T::Boolean,
|
|
446
879
|
llm_model:
|
|
447
880
|
T.any(
|
|
448
881
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
|
|
449
|
-
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1
|
|
882
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1,
|
|
883
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2,
|
|
884
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3
|
|
450
885
|
),
|
|
886
|
+
logo_url: T.nilable(String),
|
|
451
887
|
max_call_duration_secs: Float,
|
|
888
|
+
max_duration_end_message: T.nilable(String),
|
|
889
|
+
position: T.nilable(Revox::CallCreateParams::Assistant::Position),
|
|
890
|
+
prompt_flow:
|
|
891
|
+
T.nilable(Revox::CallCreateParams::Assistant::PromptFlow),
|
|
892
|
+
slack: T.nilable(Revox::CallCreateParams::Assistant::Slack),
|
|
893
|
+
sms_enabled: T::Boolean,
|
|
894
|
+
sms_template: T.nilable(String),
|
|
452
895
|
structured_output_config:
|
|
453
896
|
T::Array[
|
|
454
897
|
Revox::CallCreateParams::Assistant::StructuredOutputConfig
|
|
455
898
|
],
|
|
899
|
+
structured_output_prompt: T.nilable(String),
|
|
900
|
+
stt_context:
|
|
901
|
+
T.nilable(Revox::CallCreateParams::Assistant::SttContext),
|
|
902
|
+
stt_model: Revox::CallCreateParams::Assistant::SttModel::OrSymbol,
|
|
903
|
+
thinking_sound:
|
|
904
|
+
T.nilable(
|
|
905
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::OrSymbol
|
|
906
|
+
),
|
|
907
|
+
thinking_sound_probability: Float,
|
|
908
|
+
thinking_sound_volume: Float,
|
|
456
909
|
transfer_phone_number: T.nilable(String),
|
|
910
|
+
type: Revox::CallCreateParams::Assistant::Type::OrSymbol,
|
|
457
911
|
voice: Revox::CallCreateParams::Assistant::Voice,
|
|
458
912
|
voicemail_message: T.nilable(String),
|
|
459
|
-
|
|
913
|
+
voicemail_sms_prompt: T.nilable(String),
|
|
914
|
+
warm_transfer_summary_instructions: T.nilable(String),
|
|
915
|
+
webhook_url: String,
|
|
916
|
+
zoho: T.nilable(Revox::CallCreateParams::Assistant::Zoho)
|
|
460
917
|
}
|
|
461
918
|
)
|
|
462
919
|
end
|
|
463
920
|
def to_hash
|
|
464
921
|
end
|
|
465
922
|
|
|
466
|
-
|
|
467
|
-
|
|
923
|
+
module AfterCallSMSOutcome
|
|
924
|
+
extend Revox::Internal::Type::Enum
|
|
925
|
+
|
|
926
|
+
TaggedSymbol =
|
|
927
|
+
T.type_alias do
|
|
928
|
+
T.all(
|
|
929
|
+
Symbol,
|
|
930
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome
|
|
931
|
+
)
|
|
932
|
+
end
|
|
933
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
934
|
+
|
|
935
|
+
NOT_INTERESTED =
|
|
936
|
+
T.let(
|
|
937
|
+
:not_interested,
|
|
938
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
939
|
+
)
|
|
940
|
+
INTERESTED =
|
|
941
|
+
T.let(
|
|
942
|
+
:interested,
|
|
943
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
944
|
+
)
|
|
945
|
+
COMPLETED =
|
|
946
|
+
T.let(
|
|
947
|
+
:completed,
|
|
948
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
949
|
+
)
|
|
950
|
+
REQUESTED_CALLBACK_LATER =
|
|
951
|
+
T.let(
|
|
952
|
+
:requested_callback_later,
|
|
953
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
954
|
+
)
|
|
955
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
956
|
+
T.let(
|
|
957
|
+
:requested_callback_new_number,
|
|
958
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
959
|
+
)
|
|
960
|
+
DO_NOT_CONTACT =
|
|
961
|
+
T.let(
|
|
962
|
+
:do_not_contact,
|
|
963
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
964
|
+
)
|
|
965
|
+
AI_AVERSE =
|
|
966
|
+
T.let(
|
|
967
|
+
:ai_averse,
|
|
968
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
969
|
+
)
|
|
970
|
+
NONE =
|
|
971
|
+
T.let(
|
|
972
|
+
:none,
|
|
973
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
974
|
+
)
|
|
975
|
+
|
|
976
|
+
sig do
|
|
977
|
+
override.returns(
|
|
978
|
+
T::Array[
|
|
979
|
+
Revox::CallCreateParams::Assistant::AfterCallSMSOutcome::TaggedSymbol
|
|
980
|
+
]
|
|
981
|
+
)
|
|
982
|
+
end
|
|
983
|
+
def self.values
|
|
984
|
+
end
|
|
985
|
+
end
|
|
986
|
+
|
|
987
|
+
# Ambient background sound to play during the call. null/omitted disables it.
|
|
468
988
|
module BackgroundSound
|
|
469
989
|
extend Revox::Internal::Type::Enum
|
|
470
990
|
|
|
@@ -539,6 +1059,24 @@ module Revox
|
|
|
539
1059
|
)
|
|
540
1060
|
end
|
|
541
1061
|
|
|
1062
|
+
# Days of the week when calls are allowed, in the recipient's timezone. Default:
|
|
1063
|
+
# Monday through Friday.
|
|
1064
|
+
sig do
|
|
1065
|
+
returns(
|
|
1066
|
+
T::Array[
|
|
1067
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::OrSymbol
|
|
1068
|
+
]
|
|
1069
|
+
)
|
|
1070
|
+
end
|
|
1071
|
+
attr_accessor :allowed_days
|
|
1072
|
+
|
|
1073
|
+
# If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
|
|
1074
|
+
# retry_delay_seconds) when attempt #1 didn't reach a human.
|
|
1075
|
+
# Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
|
|
1076
|
+
# Default: false.
|
|
1077
|
+
sig { returns(T::Boolean) }
|
|
1078
|
+
attr_accessor :call_twice_in_a_row
|
|
1079
|
+
|
|
542
1080
|
sig do
|
|
543
1081
|
returns(
|
|
544
1082
|
T::Array[
|
|
@@ -562,6 +1100,11 @@ module Revox
|
|
|
562
1100
|
# iterations. If not provided, defaults will be used.
|
|
563
1101
|
sig do
|
|
564
1102
|
params(
|
|
1103
|
+
allowed_days:
|
|
1104
|
+
T::Array[
|
|
1105
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::OrSymbol
|
|
1106
|
+
],
|
|
1107
|
+
call_twice_in_a_row: T::Boolean,
|
|
565
1108
|
calling_windows:
|
|
566
1109
|
T::Array[
|
|
567
1110
|
Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow::OrHash
|
|
@@ -571,6 +1114,14 @@ module Revox
|
|
|
571
1114
|
).returns(T.attached_class)
|
|
572
1115
|
end
|
|
573
1116
|
def self.new(
|
|
1117
|
+
# Days of the week when calls are allowed, in the recipient's timezone. Default:
|
|
1118
|
+
# Monday through Friday.
|
|
1119
|
+
allowed_days:,
|
|
1120
|
+
# If true and max_retry_attempts >= 2, attempt #2 fires immediately (skipping
|
|
1121
|
+
# retry_delay_seconds) when attempt #1 didn't reach a human.
|
|
1122
|
+
# Calling-window/allowed-days checks still apply. Only affects the 1→2 transition.
|
|
1123
|
+
# Default: false.
|
|
1124
|
+
call_twice_in_a_row:,
|
|
574
1125
|
calling_windows:,
|
|
575
1126
|
# Maximum number of call retry attempts. Default: 3.
|
|
576
1127
|
max_retry_attempts:,
|
|
@@ -584,6 +1135,11 @@ module Revox
|
|
|
584
1135
|
sig do
|
|
585
1136
|
override.returns(
|
|
586
1137
|
{
|
|
1138
|
+
allowed_days:
|
|
1139
|
+
T::Array[
|
|
1140
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::OrSymbol
|
|
1141
|
+
],
|
|
1142
|
+
call_twice_in_a_row: T::Boolean,
|
|
587
1143
|
calling_windows:
|
|
588
1144
|
T::Array[
|
|
589
1145
|
Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow
|
|
@@ -596,6 +1152,65 @@ module Revox
|
|
|
596
1152
|
def to_hash
|
|
597
1153
|
end
|
|
598
1154
|
|
|
1155
|
+
module AllowedDay
|
|
1156
|
+
extend Revox::Internal::Type::Enum
|
|
1157
|
+
|
|
1158
|
+
TaggedSymbol =
|
|
1159
|
+
T.type_alias do
|
|
1160
|
+
T.all(
|
|
1161
|
+
Symbol,
|
|
1162
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay
|
|
1163
|
+
)
|
|
1164
|
+
end
|
|
1165
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1166
|
+
|
|
1167
|
+
MONDAY =
|
|
1168
|
+
T.let(
|
|
1169
|
+
:monday,
|
|
1170
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1171
|
+
)
|
|
1172
|
+
TUESDAY =
|
|
1173
|
+
T.let(
|
|
1174
|
+
:tuesday,
|
|
1175
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1176
|
+
)
|
|
1177
|
+
WEDNESDAY =
|
|
1178
|
+
T.let(
|
|
1179
|
+
:wednesday,
|
|
1180
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1181
|
+
)
|
|
1182
|
+
THURSDAY =
|
|
1183
|
+
T.let(
|
|
1184
|
+
:thursday,
|
|
1185
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1186
|
+
)
|
|
1187
|
+
FRIDAY =
|
|
1188
|
+
T.let(
|
|
1189
|
+
:friday,
|
|
1190
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1191
|
+
)
|
|
1192
|
+
SATURDAY =
|
|
1193
|
+
T.let(
|
|
1194
|
+
:saturday,
|
|
1195
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1196
|
+
)
|
|
1197
|
+
SUNDAY =
|
|
1198
|
+
T.let(
|
|
1199
|
+
:sunday,
|
|
1200
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
sig do
|
|
1204
|
+
override.returns(
|
|
1205
|
+
T::Array[
|
|
1206
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::TaggedSymbol
|
|
1207
|
+
]
|
|
1208
|
+
)
|
|
1209
|
+
end
|
|
1210
|
+
def self.values
|
|
1211
|
+
end
|
|
1212
|
+
end
|
|
1213
|
+
|
|
599
1214
|
class CallingWindow < Revox::Internal::Type::BaseModel
|
|
600
1215
|
OrHash =
|
|
601
1216
|
T.type_alias do
|
|
@@ -656,154 +1271,285 @@ module Revox
|
|
|
656
1271
|
end
|
|
657
1272
|
end
|
|
658
1273
|
|
|
659
|
-
class
|
|
1274
|
+
class CustomTool < Revox::Internal::Type::BaseModel
|
|
660
1275
|
OrHash =
|
|
661
1276
|
T.type_alias do
|
|
662
1277
|
T.any(
|
|
663
|
-
Revox::CallCreateParams::Assistant::
|
|
1278
|
+
Revox::CallCreateParams::Assistant::CustomTool,
|
|
664
1279
|
Revox::Internal::AnyHash
|
|
665
1280
|
)
|
|
666
1281
|
end
|
|
667
1282
|
|
|
668
|
-
|
|
669
|
-
|
|
1283
|
+
# JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
|
|
1284
|
+
# "{{name}}") for dynamic values
|
|
1285
|
+
sig { returns(T.nilable(String)) }
|
|
1286
|
+
attr_accessor :body_template
|
|
670
1287
|
|
|
1288
|
+
# Human-readable description of what the tool does, used by the LLM to decide when
|
|
1289
|
+
# to call it
|
|
671
1290
|
sig { returns(String) }
|
|
672
|
-
attr_accessor :
|
|
1291
|
+
attr_accessor :description
|
|
673
1292
|
|
|
1293
|
+
# HTTP headers to include in the request. Values support {{variable}} placeholders
|
|
674
1294
|
sig do
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
1295
|
+
returns(
|
|
1296
|
+
T::Array[Revox::CallCreateParams::Assistant::CustomTool::Header]
|
|
1297
|
+
)
|
|
678
1298
|
end
|
|
1299
|
+
attr_accessor :headers
|
|
679
1300
|
|
|
680
|
-
|
|
681
|
-
|
|
1301
|
+
# Schema defining the parameters the LLM should extract from the conversation to
|
|
1302
|
+
# pass to this tool
|
|
1303
|
+
sig do
|
|
1304
|
+
returns(
|
|
1305
|
+
T::Array[
|
|
1306
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema
|
|
1307
|
+
]
|
|
1308
|
+
)
|
|
682
1309
|
end
|
|
683
|
-
|
|
1310
|
+
attr_accessor :input_schema
|
|
684
1311
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
1312
|
+
# HTTP method to use when calling the API endpoint
|
|
1313
|
+
sig do
|
|
1314
|
+
returns(
|
|
1315
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::OrSymbol
|
|
1316
|
+
)
|
|
1317
|
+
end
|
|
1318
|
+
attr_accessor :method_
|
|
691
1319
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
Symbol,
|
|
696
|
-
Revox::CallCreateParams::Assistant::FirstSentenceMode
|
|
697
|
-
)
|
|
698
|
-
end
|
|
699
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1320
|
+
# Unique tool name in lowercase_snake_case (e.g. check_inventory)
|
|
1321
|
+
sig { returns(String) }
|
|
1322
|
+
attr_accessor :name
|
|
700
1323
|
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
:static,
|
|
709
|
-
Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
|
|
710
|
-
)
|
|
711
|
-
NONE =
|
|
712
|
-
T.let(
|
|
713
|
-
:none,
|
|
714
|
-
Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
|
|
1324
|
+
# Query string parameters appended to the URL. Values support {{variable}}
|
|
1325
|
+
# placeholders
|
|
1326
|
+
sig do
|
|
1327
|
+
returns(
|
|
1328
|
+
T::Array[
|
|
1329
|
+
Revox::CallCreateParams::Assistant::CustomTool::QueryParam
|
|
1330
|
+
]
|
|
715
1331
|
)
|
|
1332
|
+
end
|
|
1333
|
+
attr_accessor :query_params
|
|
1334
|
+
|
|
1335
|
+
# Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
|
|
1336
|
+
# values
|
|
1337
|
+
sig { returns(String) }
|
|
1338
|
+
attr_accessor :url
|
|
1339
|
+
|
|
1340
|
+
sig do
|
|
1341
|
+
params(
|
|
1342
|
+
body_template: T.nilable(String),
|
|
1343
|
+
description: String,
|
|
1344
|
+
headers:
|
|
1345
|
+
T::Array[
|
|
1346
|
+
Revox::CallCreateParams::Assistant::CustomTool::Header::OrHash
|
|
1347
|
+
],
|
|
1348
|
+
input_schema:
|
|
1349
|
+
T::Array[
|
|
1350
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::OrHash
|
|
1351
|
+
],
|
|
1352
|
+
method_:
|
|
1353
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::OrSymbol,
|
|
1354
|
+
name: String,
|
|
1355
|
+
query_params:
|
|
1356
|
+
T::Array[
|
|
1357
|
+
Revox::CallCreateParams::Assistant::CustomTool::QueryParam::OrHash
|
|
1358
|
+
],
|
|
1359
|
+
url: String
|
|
1360
|
+
).returns(T.attached_class)
|
|
1361
|
+
end
|
|
1362
|
+
def self.new(
|
|
1363
|
+
# JSON body template for the request. Use quoted {{variable}} placeholders (e.g.
|
|
1364
|
+
# "{{name}}") for dynamic values
|
|
1365
|
+
body_template:,
|
|
1366
|
+
# Human-readable description of what the tool does, used by the LLM to decide when
|
|
1367
|
+
# to call it
|
|
1368
|
+
description:,
|
|
1369
|
+
# HTTP headers to include in the request. Values support {{variable}} placeholders
|
|
1370
|
+
headers:,
|
|
1371
|
+
# Schema defining the parameters the LLM should extract from the conversation to
|
|
1372
|
+
# pass to this tool
|
|
1373
|
+
input_schema:,
|
|
1374
|
+
# HTTP method to use when calling the API endpoint
|
|
1375
|
+
method_:,
|
|
1376
|
+
# Unique tool name in lowercase_snake_case (e.g. check_inventory)
|
|
1377
|
+
name:,
|
|
1378
|
+
# Query string parameters appended to the URL. Values support {{variable}}
|
|
1379
|
+
# placeholders
|
|
1380
|
+
query_params:,
|
|
1381
|
+
# Full URL of the API endpoint. Supports {{variable}} placeholders for dynamic
|
|
1382
|
+
# values
|
|
1383
|
+
url:
|
|
1384
|
+
)
|
|
1385
|
+
end
|
|
716
1386
|
|
|
717
1387
|
sig do
|
|
718
1388
|
override.returns(
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
1389
|
+
{
|
|
1390
|
+
body_template: T.nilable(String),
|
|
1391
|
+
description: String,
|
|
1392
|
+
headers:
|
|
1393
|
+
T::Array[
|
|
1394
|
+
Revox::CallCreateParams::Assistant::CustomTool::Header
|
|
1395
|
+
],
|
|
1396
|
+
input_schema:
|
|
1397
|
+
T::Array[
|
|
1398
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema
|
|
1399
|
+
],
|
|
1400
|
+
method_:
|
|
1401
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::OrSymbol,
|
|
1402
|
+
name: String,
|
|
1403
|
+
query_params:
|
|
1404
|
+
T::Array[
|
|
1405
|
+
Revox::CallCreateParams::Assistant::CustomTool::QueryParam
|
|
1406
|
+
],
|
|
1407
|
+
url: String
|
|
1408
|
+
}
|
|
722
1409
|
)
|
|
723
1410
|
end
|
|
724
|
-
def
|
|
1411
|
+
def to_hash
|
|
725
1412
|
end
|
|
726
|
-
end
|
|
727
1413
|
|
|
728
|
-
|
|
729
|
-
|
|
1414
|
+
class Header < Revox::Internal::Type::BaseModel
|
|
1415
|
+
OrHash =
|
|
1416
|
+
T.type_alias do
|
|
1417
|
+
T.any(
|
|
1418
|
+
Revox::CallCreateParams::Assistant::CustomTool::Header,
|
|
1419
|
+
Revox::Internal::AnyHash
|
|
1420
|
+
)
|
|
1421
|
+
end
|
|
730
1422
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
1423
|
+
sig { returns(String) }
|
|
1424
|
+
attr_accessor :key
|
|
1425
|
+
|
|
1426
|
+
sig { returns(String) }
|
|
1427
|
+
attr_accessor :value
|
|
1428
|
+
|
|
1429
|
+
sig { params(key: String, value: String).returns(T.attached_class) }
|
|
1430
|
+
def self.new(key:, value:)
|
|
737
1431
|
end
|
|
738
1432
|
|
|
739
|
-
|
|
1433
|
+
sig { override.returns({ key: String, value: String }) }
|
|
1434
|
+
def to_hash
|
|
1435
|
+
end
|
|
1436
|
+
end
|
|
1437
|
+
|
|
1438
|
+
class InputSchema < Revox::Internal::Type::BaseModel
|
|
740
1439
|
OrHash =
|
|
741
1440
|
T.type_alias do
|
|
742
1441
|
T.any(
|
|
743
|
-
Revox::CallCreateParams::Assistant::
|
|
1442
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema,
|
|
744
1443
|
Revox::Internal::AnyHash
|
|
745
1444
|
)
|
|
746
1445
|
end
|
|
747
1446
|
|
|
1447
|
+
sig { returns(String) }
|
|
1448
|
+
attr_accessor :name
|
|
1449
|
+
|
|
1450
|
+
sig { returns(T::Boolean) }
|
|
1451
|
+
attr_accessor :required
|
|
1452
|
+
|
|
748
1453
|
sig do
|
|
749
1454
|
returns(
|
|
750
|
-
Revox::CallCreateParams::Assistant::
|
|
1455
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::OrSymbol
|
|
751
1456
|
)
|
|
752
1457
|
end
|
|
753
|
-
attr_accessor :name
|
|
754
|
-
|
|
755
|
-
sig { returns(Symbol) }
|
|
756
1458
|
attr_accessor :type
|
|
757
1459
|
|
|
1460
|
+
sig { returns(T.nilable(String)) }
|
|
1461
|
+
attr_reader :description
|
|
1462
|
+
|
|
1463
|
+
sig { params(description: String).void }
|
|
1464
|
+
attr_writer :description
|
|
1465
|
+
|
|
1466
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
1467
|
+
attr_reader :enum_options
|
|
1468
|
+
|
|
1469
|
+
sig { params(enum_options: T::Array[String]).void }
|
|
1470
|
+
attr_writer :enum_options
|
|
1471
|
+
|
|
758
1472
|
sig do
|
|
759
1473
|
params(
|
|
760
|
-
name:
|
|
761
|
-
|
|
762
|
-
type:
|
|
1474
|
+
name: String,
|
|
1475
|
+
required: T::Boolean,
|
|
1476
|
+
type:
|
|
1477
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::OrSymbol,
|
|
1478
|
+
description: String,
|
|
1479
|
+
enum_options: T::Array[String]
|
|
763
1480
|
).returns(T.attached_class)
|
|
764
1481
|
end
|
|
765
|
-
def self.new(
|
|
1482
|
+
def self.new(
|
|
1483
|
+
name:,
|
|
1484
|
+
required:,
|
|
1485
|
+
type:,
|
|
1486
|
+
description: nil,
|
|
1487
|
+
enum_options: nil
|
|
1488
|
+
)
|
|
766
1489
|
end
|
|
767
1490
|
|
|
768
1491
|
sig do
|
|
769
1492
|
override.returns(
|
|
770
1493
|
{
|
|
771
|
-
name:
|
|
772
|
-
|
|
773
|
-
type:
|
|
1494
|
+
name: String,
|
|
1495
|
+
required: T::Boolean,
|
|
1496
|
+
type:
|
|
1497
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::OrSymbol,
|
|
1498
|
+
description: String,
|
|
1499
|
+
enum_options: T::Array[String]
|
|
774
1500
|
}
|
|
775
1501
|
)
|
|
776
1502
|
end
|
|
777
1503
|
def to_hash
|
|
778
1504
|
end
|
|
779
1505
|
|
|
780
|
-
module
|
|
1506
|
+
module Type
|
|
781
1507
|
extend Revox::Internal::Type::Enum
|
|
782
1508
|
|
|
783
1509
|
TaggedSymbol =
|
|
784
1510
|
T.type_alias do
|
|
785
1511
|
T.all(
|
|
786
1512
|
Symbol,
|
|
787
|
-
Revox::CallCreateParams::Assistant::
|
|
1513
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type
|
|
788
1514
|
)
|
|
789
1515
|
end
|
|
790
1516
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
791
1517
|
|
|
792
|
-
|
|
1518
|
+
STRING =
|
|
793
1519
|
T.let(
|
|
794
|
-
:
|
|
795
|
-
Revox::CallCreateParams::Assistant::
|
|
1520
|
+
:string,
|
|
1521
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
796
1522
|
)
|
|
797
|
-
|
|
1523
|
+
NUMBER =
|
|
798
1524
|
T.let(
|
|
799
|
-
:
|
|
800
|
-
Revox::CallCreateParams::Assistant::
|
|
1525
|
+
:number,
|
|
1526
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1527
|
+
)
|
|
1528
|
+
BOOLEAN =
|
|
1529
|
+
T.let(
|
|
1530
|
+
:boolean,
|
|
1531
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1532
|
+
)
|
|
1533
|
+
ENUM =
|
|
1534
|
+
T.let(
|
|
1535
|
+
:enum,
|
|
1536
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1537
|
+
)
|
|
1538
|
+
DATE =
|
|
1539
|
+
T.let(
|
|
1540
|
+
:date,
|
|
1541
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
1542
|
+
)
|
|
1543
|
+
DATETIME =
|
|
1544
|
+
T.let(
|
|
1545
|
+
:datetime,
|
|
1546
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
801
1547
|
)
|
|
802
1548
|
|
|
803
1549
|
sig do
|
|
804
1550
|
override.returns(
|
|
805
1551
|
T::Array[
|
|
806
|
-
Revox::CallCreateParams::Assistant::
|
|
1552
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
807
1553
|
]
|
|
808
1554
|
)
|
|
809
1555
|
end
|
|
@@ -812,181 +1558,1477 @@ module Revox
|
|
|
812
1558
|
end
|
|
813
1559
|
end
|
|
814
1560
|
|
|
815
|
-
|
|
1561
|
+
# HTTP method to use when calling the API endpoint
|
|
1562
|
+
module Method
|
|
1563
|
+
extend Revox::Internal::Type::Enum
|
|
1564
|
+
|
|
1565
|
+
TaggedSymbol =
|
|
1566
|
+
T.type_alias do
|
|
1567
|
+
T.all(
|
|
1568
|
+
Symbol,
|
|
1569
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method
|
|
1570
|
+
)
|
|
1571
|
+
end
|
|
1572
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1573
|
+
|
|
1574
|
+
GET =
|
|
1575
|
+
T.let(
|
|
1576
|
+
:GET,
|
|
1577
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::TaggedSymbol
|
|
1578
|
+
)
|
|
1579
|
+
POST =
|
|
1580
|
+
T.let(
|
|
1581
|
+
:POST,
|
|
1582
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::TaggedSymbol
|
|
1583
|
+
)
|
|
1584
|
+
PUT =
|
|
1585
|
+
T.let(
|
|
1586
|
+
:PUT,
|
|
1587
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::TaggedSymbol
|
|
1588
|
+
)
|
|
1589
|
+
PATCH =
|
|
1590
|
+
T.let(
|
|
1591
|
+
:PATCH,
|
|
1592
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::TaggedSymbol
|
|
1593
|
+
)
|
|
1594
|
+
DELETE =
|
|
1595
|
+
T.let(
|
|
1596
|
+
:DELETE,
|
|
1597
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::TaggedSymbol
|
|
1598
|
+
)
|
|
1599
|
+
|
|
1600
|
+
sig do
|
|
1601
|
+
override.returns(
|
|
1602
|
+
T::Array[
|
|
1603
|
+
Revox::CallCreateParams::Assistant::CustomTool::Method::TaggedSymbol
|
|
1604
|
+
]
|
|
1605
|
+
)
|
|
1606
|
+
end
|
|
1607
|
+
def self.values
|
|
1608
|
+
end
|
|
1609
|
+
end
|
|
1610
|
+
|
|
1611
|
+
class QueryParam < Revox::Internal::Type::BaseModel
|
|
816
1612
|
OrHash =
|
|
817
1613
|
T.type_alias do
|
|
818
1614
|
T.any(
|
|
819
|
-
Revox::CallCreateParams::Assistant::
|
|
1615
|
+
Revox::CallCreateParams::Assistant::CustomTool::QueryParam,
|
|
820
1616
|
Revox::Internal::AnyHash
|
|
821
1617
|
)
|
|
822
1618
|
end
|
|
823
1619
|
|
|
824
|
-
# The model ID to use from OpenRouter. eg: openai/gpt-4.1
|
|
825
1620
|
sig { returns(String) }
|
|
826
|
-
attr_accessor :
|
|
1621
|
+
attr_accessor :key
|
|
827
1622
|
|
|
828
|
-
# The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
|
|
829
1623
|
sig { returns(String) }
|
|
830
|
-
attr_accessor :
|
|
1624
|
+
attr_accessor :value
|
|
831
1625
|
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
1626
|
+
sig { params(key: String, value: String).returns(T.attached_class) }
|
|
1627
|
+
def self.new(key:, value:)
|
|
1628
|
+
end
|
|
835
1629
|
|
|
836
|
-
sig
|
|
837
|
-
|
|
838
|
-
openrouter_model_id: String,
|
|
839
|
-
openrouter_provider: String,
|
|
840
|
-
type: Symbol
|
|
841
|
-
).returns(T.attached_class)
|
|
1630
|
+
sig { override.returns({ key: String, value: String }) }
|
|
1631
|
+
def to_hash
|
|
842
1632
|
end
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
1633
|
+
end
|
|
1634
|
+
end
|
|
1635
|
+
|
|
1636
|
+
# The language used for the notification email content. One of "en" or "fr".
|
|
1637
|
+
# Defaults to "en".
|
|
1638
|
+
module EmailNotificationLanguage
|
|
1639
|
+
extend Revox::Internal::Type::Enum
|
|
1640
|
+
|
|
1641
|
+
TaggedSymbol =
|
|
1642
|
+
T.type_alias do
|
|
1643
|
+
T.all(
|
|
1644
|
+
Symbol,
|
|
1645
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage
|
|
1646
|
+
)
|
|
1647
|
+
end
|
|
1648
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1649
|
+
|
|
1650
|
+
EN =
|
|
1651
|
+
T.let(
|
|
1652
|
+
:en,
|
|
1653
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage::TaggedSymbol
|
|
1654
|
+
)
|
|
1655
|
+
FR =
|
|
1656
|
+
T.let(
|
|
1657
|
+
:fr,
|
|
1658
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage::TaggedSymbol
|
|
1659
|
+
)
|
|
1660
|
+
|
|
1661
|
+
sig do
|
|
1662
|
+
override.returns(
|
|
1663
|
+
T::Array[
|
|
1664
|
+
Revox::CallCreateParams::Assistant::EmailNotificationLanguage::TaggedSymbol
|
|
1665
|
+
]
|
|
1666
|
+
)
|
|
1667
|
+
end
|
|
1668
|
+
def self.values
|
|
1669
|
+
end
|
|
1670
|
+
end
|
|
1671
|
+
|
|
1672
|
+
module EmailNotificationOutcome
|
|
1673
|
+
extend Revox::Internal::Type::Enum
|
|
1674
|
+
|
|
1675
|
+
TaggedSymbol =
|
|
1676
|
+
T.type_alias do
|
|
1677
|
+
T.all(
|
|
1678
|
+
Symbol,
|
|
1679
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome
|
|
1680
|
+
)
|
|
1681
|
+
end
|
|
1682
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1683
|
+
|
|
1684
|
+
NOT_INTERESTED =
|
|
1685
|
+
T.let(
|
|
1686
|
+
:not_interested,
|
|
1687
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1688
|
+
)
|
|
1689
|
+
INTERESTED =
|
|
1690
|
+
T.let(
|
|
1691
|
+
:interested,
|
|
1692
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1693
|
+
)
|
|
1694
|
+
COMPLETED =
|
|
1695
|
+
T.let(
|
|
1696
|
+
:completed,
|
|
1697
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1698
|
+
)
|
|
1699
|
+
REQUESTED_CALLBACK_LATER =
|
|
1700
|
+
T.let(
|
|
1701
|
+
:requested_callback_later,
|
|
1702
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1703
|
+
)
|
|
1704
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
1705
|
+
T.let(
|
|
1706
|
+
:requested_callback_new_number,
|
|
1707
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1708
|
+
)
|
|
1709
|
+
DO_NOT_CONTACT =
|
|
1710
|
+
T.let(
|
|
1711
|
+
:do_not_contact,
|
|
1712
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1713
|
+
)
|
|
1714
|
+
AI_AVERSE =
|
|
1715
|
+
T.let(
|
|
1716
|
+
:ai_averse,
|
|
1717
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1718
|
+
)
|
|
1719
|
+
NONE =
|
|
1720
|
+
T.let(
|
|
1721
|
+
:none,
|
|
1722
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1723
|
+
)
|
|
1724
|
+
|
|
1725
|
+
sig do
|
|
1726
|
+
override.returns(
|
|
1727
|
+
T::Array[
|
|
1728
|
+
Revox::CallCreateParams::Assistant::EmailNotificationOutcome::TaggedSymbol
|
|
1729
|
+
]
|
|
1730
|
+
)
|
|
1731
|
+
end
|
|
1732
|
+
def self.values
|
|
1733
|
+
end
|
|
1734
|
+
end
|
|
1735
|
+
|
|
1736
|
+
class FaqItem < Revox::Internal::Type::BaseModel
|
|
1737
|
+
OrHash =
|
|
1738
|
+
T.type_alias do
|
|
1739
|
+
T.any(
|
|
1740
|
+
Revox::CallCreateParams::Assistant::FaqItem,
|
|
1741
|
+
Revox::Internal::AnyHash
|
|
1742
|
+
)
|
|
1743
|
+
end
|
|
1744
|
+
|
|
1745
|
+
sig { returns(String) }
|
|
1746
|
+
attr_accessor :answer
|
|
1747
|
+
|
|
1748
|
+
sig { returns(String) }
|
|
1749
|
+
attr_accessor :question
|
|
1750
|
+
|
|
1751
|
+
sig do
|
|
1752
|
+
params(answer: String, question: String).returns(T.attached_class)
|
|
1753
|
+
end
|
|
1754
|
+
def self.new(answer:, question:)
|
|
1755
|
+
end
|
|
1756
|
+
|
|
1757
|
+
sig { override.returns({ answer: String, question: String }) }
|
|
1758
|
+
def to_hash
|
|
1759
|
+
end
|
|
1760
|
+
end
|
|
1761
|
+
|
|
1762
|
+
# How the first sentence should be handled. "generated" means the LLM will
|
|
1763
|
+
# generate a response based on the first_sentence instruction. "static" means the
|
|
1764
|
+
# first_sentence will be spoken exactly as provided. "none" means the agent will
|
|
1765
|
+
# not speak first and will wait for the user.
|
|
1766
|
+
module FirstSentenceMode
|
|
1767
|
+
extend Revox::Internal::Type::Enum
|
|
1768
|
+
|
|
1769
|
+
TaggedSymbol =
|
|
1770
|
+
T.type_alias do
|
|
1771
|
+
T.all(
|
|
1772
|
+
Symbol,
|
|
1773
|
+
Revox::CallCreateParams::Assistant::FirstSentenceMode
|
|
1774
|
+
)
|
|
1775
|
+
end
|
|
1776
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1777
|
+
|
|
1778
|
+
GENERATED =
|
|
1779
|
+
T.let(
|
|
1780
|
+
:generated,
|
|
1781
|
+
Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
|
|
1782
|
+
)
|
|
1783
|
+
STATIC =
|
|
1784
|
+
T.let(
|
|
1785
|
+
:static,
|
|
1786
|
+
Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
|
|
1787
|
+
)
|
|
1788
|
+
NONE =
|
|
1789
|
+
T.let(
|
|
1790
|
+
:none,
|
|
1791
|
+
Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
|
|
1792
|
+
)
|
|
1793
|
+
|
|
1794
|
+
sig do
|
|
1795
|
+
override.returns(
|
|
1796
|
+
T::Array[
|
|
1797
|
+
Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
|
|
1798
|
+
]
|
|
1799
|
+
)
|
|
1800
|
+
end
|
|
1801
|
+
def self.values
|
|
1802
|
+
end
|
|
1803
|
+
end
|
|
1804
|
+
|
|
1805
|
+
# When transfer_phone_number is set: "warm" (AI bridges) or "cold" (SIP REFER;
|
|
1806
|
+
# trunk must allow REFER/PSTN). Omit or null when transfer is disabled.
|
|
1807
|
+
module HumanTransferMode
|
|
1808
|
+
extend Revox::Internal::Type::Enum
|
|
1809
|
+
|
|
1810
|
+
TaggedSymbol =
|
|
1811
|
+
T.type_alias do
|
|
1812
|
+
T.all(
|
|
1813
|
+
Symbol,
|
|
1814
|
+
Revox::CallCreateParams::Assistant::HumanTransferMode
|
|
1815
|
+
)
|
|
1816
|
+
end
|
|
1817
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1818
|
+
|
|
1819
|
+
WARM =
|
|
1820
|
+
T.let(
|
|
1821
|
+
:warm,
|
|
1822
|
+
Revox::CallCreateParams::Assistant::HumanTransferMode::TaggedSymbol
|
|
1823
|
+
)
|
|
1824
|
+
COLD =
|
|
1825
|
+
T.let(
|
|
1826
|
+
:cold,
|
|
1827
|
+
Revox::CallCreateParams::Assistant::HumanTransferMode::TaggedSymbol
|
|
1828
|
+
)
|
|
1829
|
+
|
|
1830
|
+
sig do
|
|
1831
|
+
override.returns(
|
|
1832
|
+
T::Array[
|
|
1833
|
+
Revox::CallCreateParams::Assistant::HumanTransferMode::TaggedSymbol
|
|
1834
|
+
]
|
|
1835
|
+
)
|
|
1836
|
+
end
|
|
1837
|
+
def self.values
|
|
1838
|
+
end
|
|
1839
|
+
end
|
|
1840
|
+
|
|
1841
|
+
module LlmModel
|
|
1842
|
+
extend Revox::Internal::Type::Union
|
|
1843
|
+
|
|
1844
|
+
Variants =
|
|
1845
|
+
T.type_alias do
|
|
1846
|
+
T.any(
|
|
1847
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
|
|
1848
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1,
|
|
1849
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2,
|
|
1850
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3
|
|
1851
|
+
)
|
|
1852
|
+
end
|
|
1853
|
+
|
|
1854
|
+
class UnionMember0 < Revox::Internal::Type::BaseModel
|
|
1855
|
+
OrHash =
|
|
1856
|
+
T.type_alias do
|
|
1857
|
+
T.any(
|
|
1858
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
|
|
1859
|
+
Revox::Internal::AnyHash
|
|
1860
|
+
)
|
|
1861
|
+
end
|
|
1862
|
+
|
|
1863
|
+
sig do
|
|
1864
|
+
returns(
|
|
1865
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::OrSymbol
|
|
1866
|
+
)
|
|
1867
|
+
end
|
|
1868
|
+
attr_accessor :name
|
|
1869
|
+
|
|
1870
|
+
sig { returns(Symbol) }
|
|
1871
|
+
attr_accessor :type
|
|
1872
|
+
|
|
1873
|
+
sig do
|
|
1874
|
+
params(
|
|
1875
|
+
name:
|
|
1876
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::OrSymbol,
|
|
1877
|
+
type: Symbol
|
|
1878
|
+
).returns(T.attached_class)
|
|
1879
|
+
end
|
|
1880
|
+
def self.new(name:, type: :"dedicated-instance")
|
|
1881
|
+
end
|
|
1882
|
+
|
|
1883
|
+
sig do
|
|
1884
|
+
override.returns(
|
|
1885
|
+
{
|
|
1886
|
+
name:
|
|
1887
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::OrSymbol,
|
|
1888
|
+
type: Symbol
|
|
1889
|
+
}
|
|
1890
|
+
)
|
|
1891
|
+
end
|
|
1892
|
+
def to_hash
|
|
1893
|
+
end
|
|
1894
|
+
|
|
1895
|
+
module Name
|
|
1896
|
+
extend Revox::Internal::Type::Enum
|
|
1897
|
+
|
|
1898
|
+
TaggedSymbol =
|
|
1899
|
+
T.type_alias do
|
|
1900
|
+
T.all(
|
|
1901
|
+
Symbol,
|
|
1902
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name
|
|
1903
|
+
)
|
|
1904
|
+
end
|
|
1905
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1906
|
+
|
|
1907
|
+
GPT_4_1 =
|
|
1908
|
+
T.let(
|
|
1909
|
+
:"gpt-4.1",
|
|
1910
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
|
|
1911
|
+
)
|
|
1912
|
+
MINISTRAL_3_8B_INSTRUCT =
|
|
1913
|
+
T.let(
|
|
1914
|
+
:"ministral-3-8b-instruct",
|
|
1915
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
|
|
1916
|
+
)
|
|
1917
|
+
|
|
1918
|
+
sig do
|
|
1919
|
+
override.returns(
|
|
1920
|
+
T::Array[
|
|
1921
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::Name::TaggedSymbol
|
|
1922
|
+
]
|
|
1923
|
+
)
|
|
1924
|
+
end
|
|
1925
|
+
def self.values
|
|
1926
|
+
end
|
|
1927
|
+
end
|
|
1928
|
+
end
|
|
1929
|
+
|
|
1930
|
+
class UnionMember1 < Revox::Internal::Type::BaseModel
|
|
1931
|
+
OrHash =
|
|
1932
|
+
T.type_alias do
|
|
1933
|
+
T.any(
|
|
1934
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1,
|
|
1935
|
+
Revox::Internal::AnyHash
|
|
1936
|
+
)
|
|
1937
|
+
end
|
|
1938
|
+
|
|
1939
|
+
# The model ID to use from OpenRouter. eg: openai/gpt-4.1
|
|
1940
|
+
sig { returns(String) }
|
|
1941
|
+
attr_accessor :openrouter_model_id
|
|
1942
|
+
|
|
1943
|
+
# The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
|
|
1944
|
+
sig { returns(String) }
|
|
1945
|
+
attr_accessor :openrouter_provider
|
|
1946
|
+
|
|
1947
|
+
# Use a model from OpenRouter.
|
|
1948
|
+
sig { returns(Symbol) }
|
|
1949
|
+
attr_accessor :type
|
|
1950
|
+
|
|
1951
|
+
sig do
|
|
1952
|
+
params(
|
|
1953
|
+
openrouter_model_id: String,
|
|
1954
|
+
openrouter_provider: String,
|
|
1955
|
+
type: Symbol
|
|
1956
|
+
).returns(T.attached_class)
|
|
1957
|
+
end
|
|
1958
|
+
def self.new(
|
|
1959
|
+
# The model ID to use from OpenRouter. eg: openai/gpt-4.1
|
|
1960
|
+
openrouter_model_id:,
|
|
1961
|
+
# The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
|
|
1962
|
+
openrouter_provider:,
|
|
1963
|
+
# Use a model from OpenRouter.
|
|
1964
|
+
type: :openrouter
|
|
1965
|
+
)
|
|
1966
|
+
end
|
|
1967
|
+
|
|
1968
|
+
sig do
|
|
1969
|
+
override.returns(
|
|
1970
|
+
{
|
|
1971
|
+
openrouter_model_id: String,
|
|
1972
|
+
openrouter_provider: String,
|
|
1973
|
+
type: Symbol
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
end
|
|
1977
|
+
def to_hash
|
|
1978
|
+
end
|
|
1979
|
+
end
|
|
1980
|
+
|
|
1981
|
+
class UnionMember2 < Revox::Internal::Type::BaseModel
|
|
1982
|
+
OrHash =
|
|
1983
|
+
T.type_alias do
|
|
1984
|
+
T.any(
|
|
1985
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2,
|
|
1986
|
+
Revox::Internal::AnyHash
|
|
1987
|
+
)
|
|
1988
|
+
end
|
|
1989
|
+
|
|
1990
|
+
# API key sent as Bearer token to the custom endpoint.
|
|
1991
|
+
sig { returns(String) }
|
|
1992
|
+
attr_accessor :api_key
|
|
1993
|
+
|
|
1994
|
+
# Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
|
|
1995
|
+
sig { returns(String) }
|
|
1996
|
+
attr_accessor :api_url
|
|
1997
|
+
|
|
1998
|
+
# Model name as expected by the provider, e.g. meta-llama/llama-3-70b
|
|
1999
|
+
sig { returns(String) }
|
|
2000
|
+
attr_accessor :model_name
|
|
2001
|
+
|
|
2002
|
+
# OpenAI-compatible chat completions API (bring your own endpoint and key).
|
|
2003
|
+
sig { returns(Symbol) }
|
|
2004
|
+
attr_accessor :type
|
|
2005
|
+
|
|
2006
|
+
sig do
|
|
2007
|
+
params(
|
|
2008
|
+
api_key: String,
|
|
2009
|
+
api_url: String,
|
|
2010
|
+
model_name: String,
|
|
2011
|
+
type: Symbol
|
|
2012
|
+
).returns(T.attached_class)
|
|
2013
|
+
end
|
|
2014
|
+
def self.new(
|
|
2015
|
+
# API key sent as Bearer token to the custom endpoint.
|
|
2016
|
+
api_key:,
|
|
2017
|
+
# Base URL for the OpenAI-compatible API, e.g. https://api.together.xyz/v1
|
|
2018
|
+
api_url:,
|
|
2019
|
+
# Model name as expected by the provider, e.g. meta-llama/llama-3-70b
|
|
2020
|
+
model_name:,
|
|
2021
|
+
# OpenAI-compatible chat completions API (bring your own endpoint and key).
|
|
2022
|
+
type: :custom
|
|
2023
|
+
)
|
|
2024
|
+
end
|
|
2025
|
+
|
|
2026
|
+
sig do
|
|
2027
|
+
override.returns(
|
|
2028
|
+
{
|
|
2029
|
+
api_key: String,
|
|
2030
|
+
api_url: String,
|
|
2031
|
+
model_name: String,
|
|
2032
|
+
type: Symbol
|
|
2033
|
+
}
|
|
2034
|
+
)
|
|
2035
|
+
end
|
|
2036
|
+
def to_hash
|
|
2037
|
+
end
|
|
2038
|
+
end
|
|
2039
|
+
|
|
2040
|
+
class UnionMember3 < Revox::Internal::Type::BaseModel
|
|
2041
|
+
OrHash =
|
|
2042
|
+
T.type_alias do
|
|
2043
|
+
T.any(
|
|
2044
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3,
|
|
2045
|
+
Revox::Internal::AnyHash
|
|
2046
|
+
)
|
|
2047
|
+
end
|
|
2048
|
+
|
|
2049
|
+
# The provider to use from Realtime. eg: openai, google.
|
|
2050
|
+
sig do
|
|
2051
|
+
returns(
|
|
2052
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::Provider::OrSymbol
|
|
2053
|
+
)
|
|
2054
|
+
end
|
|
2055
|
+
attr_accessor :provider
|
|
2056
|
+
|
|
2057
|
+
# The model ID to use from Realtime. eg: gpt-4.1
|
|
2058
|
+
sig { returns(String) }
|
|
2059
|
+
attr_accessor :realtime_model_id
|
|
2060
|
+
|
|
2061
|
+
# Use a model from Realtime.
|
|
2062
|
+
sig { returns(Symbol) }
|
|
2063
|
+
attr_accessor :type
|
|
2064
|
+
|
|
2065
|
+
# Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
|
|
2066
|
+
sig { returns(T.nilable(String)) }
|
|
2067
|
+
attr_reader :realtime_voice_id
|
|
2068
|
+
|
|
2069
|
+
sig { params(realtime_voice_id: String).void }
|
|
2070
|
+
attr_writer :realtime_voice_id
|
|
2071
|
+
|
|
2072
|
+
sig do
|
|
2073
|
+
params(
|
|
2074
|
+
provider:
|
|
2075
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::Provider::OrSymbol,
|
|
2076
|
+
realtime_model_id: String,
|
|
2077
|
+
realtime_voice_id: String,
|
|
2078
|
+
type: Symbol
|
|
2079
|
+
).returns(T.attached_class)
|
|
2080
|
+
end
|
|
2081
|
+
def self.new(
|
|
2082
|
+
# The provider to use from Realtime. eg: openai, google.
|
|
2083
|
+
provider:,
|
|
2084
|
+
# The model ID to use from Realtime. eg: gpt-4.1
|
|
2085
|
+
realtime_model_id:,
|
|
2086
|
+
# Output voice for the realtime provider (e.g. OpenAI: marin; Gemini: Puck).
|
|
2087
|
+
realtime_voice_id: nil,
|
|
2088
|
+
# Use a model from Realtime.
|
|
2089
|
+
type: :realtime
|
|
2090
|
+
)
|
|
2091
|
+
end
|
|
2092
|
+
|
|
2093
|
+
sig do
|
|
2094
|
+
override.returns(
|
|
2095
|
+
{
|
|
2096
|
+
provider:
|
|
2097
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::Provider::OrSymbol,
|
|
2098
|
+
realtime_model_id: String,
|
|
2099
|
+
type: Symbol,
|
|
2100
|
+
realtime_voice_id: String
|
|
2101
|
+
}
|
|
2102
|
+
)
|
|
2103
|
+
end
|
|
2104
|
+
def to_hash
|
|
2105
|
+
end
|
|
2106
|
+
|
|
2107
|
+
# The provider to use from Realtime. eg: openai, google.
|
|
2108
|
+
module Provider
|
|
2109
|
+
extend Revox::Internal::Type::Enum
|
|
2110
|
+
|
|
2111
|
+
TaggedSymbol =
|
|
2112
|
+
T.type_alias do
|
|
2113
|
+
T.all(
|
|
2114
|
+
Symbol,
|
|
2115
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::Provider
|
|
2116
|
+
)
|
|
2117
|
+
end
|
|
2118
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2119
|
+
|
|
2120
|
+
OPENAI =
|
|
2121
|
+
T.let(
|
|
2122
|
+
:openai,
|
|
2123
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::Provider::TaggedSymbol
|
|
2124
|
+
)
|
|
2125
|
+
GOOGLE =
|
|
2126
|
+
T.let(
|
|
2127
|
+
:google,
|
|
2128
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::Provider::TaggedSymbol
|
|
2129
|
+
)
|
|
2130
|
+
|
|
2131
|
+
sig do
|
|
2132
|
+
override.returns(
|
|
2133
|
+
T::Array[
|
|
2134
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3::Provider::TaggedSymbol
|
|
2135
|
+
]
|
|
2136
|
+
)
|
|
2137
|
+
end
|
|
2138
|
+
def self.values
|
|
2139
|
+
end
|
|
2140
|
+
end
|
|
2141
|
+
end
|
|
2142
|
+
|
|
2143
|
+
sig do
|
|
2144
|
+
override.returns(
|
|
2145
|
+
T::Array[Revox::CallCreateParams::Assistant::LlmModel::Variants]
|
|
2146
|
+
)
|
|
2147
|
+
end
|
|
2148
|
+
def self.variants
|
|
2149
|
+
end
|
|
2150
|
+
end
|
|
2151
|
+
|
|
2152
|
+
class Position < Revox::Internal::Type::BaseModel
|
|
2153
|
+
OrHash =
|
|
2154
|
+
T.type_alias do
|
|
2155
|
+
T.any(
|
|
2156
|
+
Revox::CallCreateParams::Assistant::Position,
|
|
2157
|
+
Revox::Internal::AnyHash
|
|
2158
|
+
)
|
|
2159
|
+
end
|
|
2160
|
+
|
|
2161
|
+
sig { returns(Float) }
|
|
2162
|
+
attr_accessor :x
|
|
2163
|
+
|
|
2164
|
+
sig { returns(Float) }
|
|
2165
|
+
attr_accessor :y_
|
|
2166
|
+
|
|
2167
|
+
# Canvas position of this assistant's node in its multi-step flow editor.
|
|
2168
|
+
sig { params(x: Float, y_: Float).returns(T.attached_class) }
|
|
2169
|
+
def self.new(x:, y_:)
|
|
2170
|
+
end
|
|
2171
|
+
|
|
2172
|
+
sig { override.returns({ x: Float, y_: Float }) }
|
|
2173
|
+
def to_hash
|
|
2174
|
+
end
|
|
2175
|
+
end
|
|
2176
|
+
|
|
2177
|
+
class PromptFlow < Revox::Internal::Type::BaseModel
|
|
2178
|
+
OrHash =
|
|
2179
|
+
T.type_alias do
|
|
2180
|
+
T.any(
|
|
2181
|
+
Revox::CallCreateParams::Assistant::PromptFlow,
|
|
2182
|
+
Revox::Internal::AnyHash
|
|
2183
|
+
)
|
|
2184
|
+
end
|
|
2185
|
+
|
|
2186
|
+
sig do
|
|
2187
|
+
returns(
|
|
2188
|
+
T::Array[Revox::CallCreateParams::Assistant::PromptFlow::Edge]
|
|
2189
|
+
)
|
|
2190
|
+
end
|
|
2191
|
+
attr_accessor :edges
|
|
2192
|
+
|
|
2193
|
+
sig do
|
|
2194
|
+
returns(
|
|
2195
|
+
T::Array[Revox::CallCreateParams::Assistant::PromptFlow::Node]
|
|
2196
|
+
)
|
|
2197
|
+
end
|
|
2198
|
+
attr_accessor :nodes
|
|
2199
|
+
|
|
2200
|
+
# Visual prompt constructor data (nodes, edges, positions). Used by the UI to
|
|
2201
|
+
# re-open the visual editor. Does not affect call behavior — the flattened prompt
|
|
2202
|
+
# field is what the LLM receives.
|
|
2203
|
+
sig do
|
|
2204
|
+
params(
|
|
2205
|
+
edges:
|
|
2206
|
+
T::Array[
|
|
2207
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Edge::OrHash
|
|
2208
|
+
],
|
|
2209
|
+
nodes:
|
|
2210
|
+
T::Array[
|
|
2211
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::OrHash
|
|
2212
|
+
]
|
|
2213
|
+
).returns(T.attached_class)
|
|
2214
|
+
end
|
|
2215
|
+
def self.new(edges:, nodes:)
|
|
2216
|
+
end
|
|
2217
|
+
|
|
2218
|
+
sig do
|
|
2219
|
+
override.returns(
|
|
2220
|
+
{
|
|
2221
|
+
edges:
|
|
2222
|
+
T::Array[
|
|
2223
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Edge
|
|
2224
|
+
],
|
|
2225
|
+
nodes:
|
|
2226
|
+
T::Array[Revox::CallCreateParams::Assistant::PromptFlow::Node]
|
|
2227
|
+
}
|
|
2228
|
+
)
|
|
2229
|
+
end
|
|
2230
|
+
def to_hash
|
|
2231
|
+
end
|
|
2232
|
+
|
|
2233
|
+
class Edge < Revox::Internal::Type::BaseModel
|
|
2234
|
+
OrHash =
|
|
2235
|
+
T.type_alias do
|
|
2236
|
+
T.any(
|
|
2237
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Edge,
|
|
2238
|
+
Revox::Internal::AnyHash
|
|
2239
|
+
)
|
|
2240
|
+
end
|
|
2241
|
+
|
|
2242
|
+
sig { returns(String) }
|
|
2243
|
+
attr_accessor :id
|
|
2244
|
+
|
|
2245
|
+
sig { returns(String) }
|
|
2246
|
+
attr_accessor :source
|
|
2247
|
+
|
|
2248
|
+
sig { returns(String) }
|
|
2249
|
+
attr_accessor :target
|
|
2250
|
+
|
|
2251
|
+
sig do
|
|
2252
|
+
params(id: String, source: String, target: String).returns(
|
|
2253
|
+
T.attached_class
|
|
2254
|
+
)
|
|
2255
|
+
end
|
|
2256
|
+
def self.new(id:, source:, target:)
|
|
2257
|
+
end
|
|
2258
|
+
|
|
2259
|
+
sig do
|
|
2260
|
+
override.returns({ id: String, source: String, target: String })
|
|
2261
|
+
end
|
|
2262
|
+
def to_hash
|
|
2263
|
+
end
|
|
2264
|
+
end
|
|
2265
|
+
|
|
2266
|
+
class Node < Revox::Internal::Type::BaseModel
|
|
2267
|
+
OrHash =
|
|
2268
|
+
T.type_alias do
|
|
2269
|
+
T.any(
|
|
2270
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node,
|
|
2271
|
+
Revox::Internal::AnyHash
|
|
2272
|
+
)
|
|
2273
|
+
end
|
|
2274
|
+
|
|
2275
|
+
sig { returns(String) }
|
|
2276
|
+
attr_accessor :id
|
|
2277
|
+
|
|
2278
|
+
sig do
|
|
2279
|
+
returns(
|
|
2280
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Data
|
|
2281
|
+
)
|
|
2282
|
+
end
|
|
2283
|
+
attr_reader :data
|
|
2284
|
+
|
|
2285
|
+
sig do
|
|
2286
|
+
params(
|
|
2287
|
+
data:
|
|
2288
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Data::OrHash
|
|
2289
|
+
).void
|
|
2290
|
+
end
|
|
2291
|
+
attr_writer :data
|
|
2292
|
+
|
|
2293
|
+
sig do
|
|
2294
|
+
returns(
|
|
2295
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Position
|
|
2296
|
+
)
|
|
2297
|
+
end
|
|
2298
|
+
attr_reader :position
|
|
2299
|
+
|
|
2300
|
+
sig do
|
|
2301
|
+
params(
|
|
2302
|
+
position:
|
|
2303
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Position::OrHash
|
|
2304
|
+
).void
|
|
2305
|
+
end
|
|
2306
|
+
attr_writer :position
|
|
2307
|
+
|
|
2308
|
+
sig { returns(Symbol) }
|
|
2309
|
+
attr_accessor :type
|
|
2310
|
+
|
|
2311
|
+
sig do
|
|
2312
|
+
params(
|
|
2313
|
+
id: String,
|
|
2314
|
+
data:
|
|
2315
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Data::OrHash,
|
|
2316
|
+
position:
|
|
2317
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Position::OrHash,
|
|
2318
|
+
type: Symbol
|
|
2319
|
+
).returns(T.attached_class)
|
|
2320
|
+
end
|
|
2321
|
+
def self.new(id:, data:, position:, type: :promptBlock)
|
|
2322
|
+
end
|
|
2323
|
+
|
|
2324
|
+
sig do
|
|
2325
|
+
override.returns(
|
|
2326
|
+
{
|
|
2327
|
+
id: String,
|
|
2328
|
+
data:
|
|
2329
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Data,
|
|
2330
|
+
position:
|
|
2331
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Position,
|
|
2332
|
+
type: Symbol
|
|
2333
|
+
}
|
|
2334
|
+
)
|
|
2335
|
+
end
|
|
2336
|
+
def to_hash
|
|
2337
|
+
end
|
|
2338
|
+
|
|
2339
|
+
class Data < Revox::Internal::Type::BaseModel
|
|
2340
|
+
OrHash =
|
|
2341
|
+
T.type_alias do
|
|
2342
|
+
T.any(
|
|
2343
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Data,
|
|
2344
|
+
Revox::Internal::AnyHash
|
|
2345
|
+
)
|
|
2346
|
+
end
|
|
2347
|
+
|
|
2348
|
+
sig { returns(String) }
|
|
2349
|
+
attr_accessor :body
|
|
2350
|
+
|
|
2351
|
+
sig { returns(String) }
|
|
2352
|
+
attr_accessor :title
|
|
2353
|
+
|
|
2354
|
+
sig do
|
|
2355
|
+
params(body: String, title: String).returns(T.attached_class)
|
|
2356
|
+
end
|
|
2357
|
+
def self.new(body:, title:)
|
|
2358
|
+
end
|
|
2359
|
+
|
|
2360
|
+
sig { override.returns({ body: String, title: String }) }
|
|
2361
|
+
def to_hash
|
|
2362
|
+
end
|
|
2363
|
+
end
|
|
2364
|
+
|
|
2365
|
+
class Position < Revox::Internal::Type::BaseModel
|
|
2366
|
+
OrHash =
|
|
2367
|
+
T.type_alias do
|
|
2368
|
+
T.any(
|
|
2369
|
+
Revox::CallCreateParams::Assistant::PromptFlow::Node::Position,
|
|
2370
|
+
Revox::Internal::AnyHash
|
|
2371
|
+
)
|
|
2372
|
+
end
|
|
2373
|
+
|
|
2374
|
+
sig { returns(Float) }
|
|
2375
|
+
attr_accessor :x
|
|
2376
|
+
|
|
2377
|
+
sig { returns(Float) }
|
|
2378
|
+
attr_accessor :y_
|
|
2379
|
+
|
|
2380
|
+
sig { params(x: Float, y_: Float).returns(T.attached_class) }
|
|
2381
|
+
def self.new(x:, y_:)
|
|
2382
|
+
end
|
|
2383
|
+
|
|
2384
|
+
sig { override.returns({ x: Float, y_: Float }) }
|
|
2385
|
+
def to_hash
|
|
2386
|
+
end
|
|
2387
|
+
end
|
|
2388
|
+
end
|
|
2389
|
+
end
|
|
2390
|
+
|
|
2391
|
+
class Slack < Revox::Internal::Type::BaseModel
|
|
2392
|
+
OrHash =
|
|
2393
|
+
T.type_alias do
|
|
2394
|
+
T.any(
|
|
2395
|
+
Revox::CallCreateParams::Assistant::Slack,
|
|
2396
|
+
Revox::Internal::AnyHash
|
|
2397
|
+
)
|
|
2398
|
+
end
|
|
2399
|
+
|
|
2400
|
+
# The Slack channel ID where the notification will be posted.
|
|
2401
|
+
sig { returns(String) }
|
|
2402
|
+
attr_accessor :channel_id
|
|
2403
|
+
|
|
2404
|
+
# The Nango connection ID linking the org's Slack workspace to Revox.
|
|
2405
|
+
sig { returns(String) }
|
|
2406
|
+
attr_accessor :connection_id
|
|
2407
|
+
|
|
2408
|
+
# Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
|
|
2409
|
+
# Use 'none' to notify when outcome is null.
|
|
2410
|
+
sig do
|
|
2411
|
+
returns(
|
|
2412
|
+
T::Array[
|
|
2413
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::OrSymbol
|
|
2414
|
+
]
|
|
2415
|
+
)
|
|
2416
|
+
end
|
|
2417
|
+
attr_accessor :outcomes
|
|
2418
|
+
|
|
2419
|
+
# Human-readable Slack channel name, cached for display in the UI.
|
|
2420
|
+
sig { returns(T.nilable(String)) }
|
|
2421
|
+
attr_accessor :channel_name
|
|
2422
|
+
|
|
2423
|
+
# Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
2424
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
|
|
2425
|
+
# {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
|
|
2426
|
+
# prompt_variables and structured_output keys. When null/empty a default template
|
|
2427
|
+
# is used.
|
|
2428
|
+
sig { returns(T.nilable(String)) }
|
|
2429
|
+
attr_accessor :template
|
|
2430
|
+
|
|
2431
|
+
# Slack notification config. When set, posts a message to the chosen channel after
|
|
2432
|
+
# a call ends with one of the configured outcomes.
|
|
2433
|
+
sig do
|
|
2434
|
+
params(
|
|
2435
|
+
channel_id: String,
|
|
2436
|
+
connection_id: String,
|
|
2437
|
+
outcomes:
|
|
2438
|
+
T::Array[
|
|
2439
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::OrSymbol
|
|
2440
|
+
],
|
|
2441
|
+
channel_name: T.nilable(String),
|
|
2442
|
+
template: T.nilable(String)
|
|
2443
|
+
).returns(T.attached_class)
|
|
2444
|
+
end
|
|
2445
|
+
def self.new(
|
|
2446
|
+
# The Slack channel ID where the notification will be posted.
|
|
2447
|
+
channel_id:,
|
|
2448
|
+
# The Nango connection ID linking the org's Slack workspace to Revox.
|
|
2449
|
+
connection_id:,
|
|
2450
|
+
# Which call outcomes trigger a Slack notification (e.g. ['interested', 'none']).
|
|
2451
|
+
# Use 'none' to notify when outcome is null.
|
|
2452
|
+
outcomes:,
|
|
2453
|
+
# Human-readable Slack channel name, cached for display in the UI.
|
|
2454
|
+
channel_name: nil,
|
|
2455
|
+
# Optional message template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
2456
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{first_name}},
|
|
2457
|
+
# {{last_name}}, {{email}}, {{company}}, {{contact_name}}, {{contact_line}}, plus
|
|
2458
|
+
# prompt_variables and structured_output keys. When null/empty a default template
|
|
2459
|
+
# is used.
|
|
2460
|
+
template: nil
|
|
2461
|
+
)
|
|
2462
|
+
end
|
|
2463
|
+
|
|
2464
|
+
sig do
|
|
2465
|
+
override.returns(
|
|
2466
|
+
{
|
|
2467
|
+
channel_id: String,
|
|
2468
|
+
connection_id: String,
|
|
2469
|
+
outcomes:
|
|
2470
|
+
T::Array[
|
|
2471
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::OrSymbol
|
|
2472
|
+
],
|
|
2473
|
+
channel_name: T.nilable(String),
|
|
2474
|
+
template: T.nilable(String)
|
|
2475
|
+
}
|
|
2476
|
+
)
|
|
2477
|
+
end
|
|
2478
|
+
def to_hash
|
|
2479
|
+
end
|
|
2480
|
+
|
|
2481
|
+
module Outcome
|
|
2482
|
+
extend Revox::Internal::Type::Enum
|
|
2483
|
+
|
|
2484
|
+
TaggedSymbol =
|
|
2485
|
+
T.type_alias do
|
|
2486
|
+
T.all(
|
|
2487
|
+
Symbol,
|
|
2488
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome
|
|
2489
|
+
)
|
|
2490
|
+
end
|
|
2491
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2492
|
+
|
|
2493
|
+
NOT_INTERESTED =
|
|
2494
|
+
T.let(
|
|
2495
|
+
:not_interested,
|
|
2496
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2497
|
+
)
|
|
2498
|
+
INTERESTED =
|
|
2499
|
+
T.let(
|
|
2500
|
+
:interested,
|
|
2501
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2502
|
+
)
|
|
2503
|
+
COMPLETED =
|
|
2504
|
+
T.let(
|
|
2505
|
+
:completed,
|
|
2506
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2507
|
+
)
|
|
2508
|
+
REQUESTED_CALLBACK_LATER =
|
|
2509
|
+
T.let(
|
|
2510
|
+
:requested_callback_later,
|
|
2511
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2512
|
+
)
|
|
2513
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
2514
|
+
T.let(
|
|
2515
|
+
:requested_callback_new_number,
|
|
2516
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2517
|
+
)
|
|
2518
|
+
DO_NOT_CONTACT =
|
|
2519
|
+
T.let(
|
|
2520
|
+
:do_not_contact,
|
|
2521
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2522
|
+
)
|
|
2523
|
+
AI_AVERSE =
|
|
2524
|
+
T.let(
|
|
2525
|
+
:ai_averse,
|
|
2526
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2527
|
+
)
|
|
2528
|
+
NONE =
|
|
2529
|
+
T.let(
|
|
2530
|
+
:none,
|
|
2531
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2532
|
+
)
|
|
2533
|
+
|
|
2534
|
+
sig do
|
|
2535
|
+
override.returns(
|
|
2536
|
+
T::Array[
|
|
2537
|
+
Revox::CallCreateParams::Assistant::Slack::Outcome::TaggedSymbol
|
|
2538
|
+
]
|
|
2539
|
+
)
|
|
2540
|
+
end
|
|
2541
|
+
def self.values
|
|
2542
|
+
end
|
|
2543
|
+
end
|
|
2544
|
+
end
|
|
2545
|
+
|
|
2546
|
+
class StructuredOutputConfig < Revox::Internal::Type::BaseModel
|
|
2547
|
+
OrHash =
|
|
2548
|
+
T.type_alias do
|
|
2549
|
+
T.any(
|
|
2550
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig,
|
|
2551
|
+
Revox::Internal::AnyHash
|
|
2552
|
+
)
|
|
2553
|
+
end
|
|
2554
|
+
|
|
2555
|
+
sig { returns(String) }
|
|
2556
|
+
attr_accessor :name
|
|
2557
|
+
|
|
2558
|
+
sig { returns(T::Boolean) }
|
|
2559
|
+
attr_accessor :required
|
|
2560
|
+
|
|
2561
|
+
sig do
|
|
2562
|
+
returns(
|
|
2563
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::OrSymbol
|
|
2564
|
+
)
|
|
2565
|
+
end
|
|
2566
|
+
attr_accessor :type
|
|
2567
|
+
|
|
2568
|
+
sig { returns(T.nilable(String)) }
|
|
2569
|
+
attr_reader :description
|
|
2570
|
+
|
|
2571
|
+
sig { params(description: String).void }
|
|
2572
|
+
attr_writer :description
|
|
2573
|
+
|
|
2574
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
2575
|
+
attr_reader :enum_options
|
|
2576
|
+
|
|
2577
|
+
sig { params(enum_options: T::Array[String]).void }
|
|
2578
|
+
attr_writer :enum_options
|
|
2579
|
+
|
|
2580
|
+
sig do
|
|
2581
|
+
params(
|
|
2582
|
+
name: String,
|
|
2583
|
+
required: T::Boolean,
|
|
2584
|
+
type:
|
|
2585
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::OrSymbol,
|
|
2586
|
+
description: String,
|
|
2587
|
+
enum_options: T::Array[String]
|
|
2588
|
+
).returns(T.attached_class)
|
|
2589
|
+
end
|
|
2590
|
+
def self.new(
|
|
2591
|
+
name:,
|
|
2592
|
+
required:,
|
|
2593
|
+
type:,
|
|
2594
|
+
description: nil,
|
|
2595
|
+
enum_options: nil
|
|
2596
|
+
)
|
|
2597
|
+
end
|
|
2598
|
+
|
|
2599
|
+
sig do
|
|
2600
|
+
override.returns(
|
|
2601
|
+
{
|
|
2602
|
+
name: String,
|
|
2603
|
+
required: T::Boolean,
|
|
2604
|
+
type:
|
|
2605
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::OrSymbol,
|
|
2606
|
+
description: String,
|
|
2607
|
+
enum_options: T::Array[String]
|
|
2608
|
+
}
|
|
2609
|
+
)
|
|
2610
|
+
end
|
|
2611
|
+
def to_hash
|
|
2612
|
+
end
|
|
2613
|
+
|
|
2614
|
+
module Type
|
|
2615
|
+
extend Revox::Internal::Type::Enum
|
|
2616
|
+
|
|
2617
|
+
TaggedSymbol =
|
|
2618
|
+
T.type_alias do
|
|
2619
|
+
T.all(
|
|
2620
|
+
Symbol,
|
|
2621
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type
|
|
2622
|
+
)
|
|
2623
|
+
end
|
|
2624
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2625
|
+
|
|
2626
|
+
STRING =
|
|
2627
|
+
T.let(
|
|
2628
|
+
:string,
|
|
2629
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
2630
|
+
)
|
|
2631
|
+
NUMBER =
|
|
2632
|
+
T.let(
|
|
2633
|
+
:number,
|
|
2634
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
2635
|
+
)
|
|
2636
|
+
BOOLEAN =
|
|
2637
|
+
T.let(
|
|
2638
|
+
:boolean,
|
|
2639
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
2640
|
+
)
|
|
2641
|
+
ENUM =
|
|
2642
|
+
T.let(
|
|
2643
|
+
:enum,
|
|
2644
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
2645
|
+
)
|
|
2646
|
+
DATE =
|
|
2647
|
+
T.let(
|
|
2648
|
+
:date,
|
|
2649
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
2650
|
+
)
|
|
2651
|
+
DATETIME =
|
|
2652
|
+
T.let(
|
|
2653
|
+
:datetime,
|
|
2654
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
2655
|
+
)
|
|
2656
|
+
|
|
2657
|
+
sig do
|
|
2658
|
+
override.returns(
|
|
2659
|
+
T::Array[
|
|
2660
|
+
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
2661
|
+
]
|
|
2662
|
+
)
|
|
2663
|
+
end
|
|
2664
|
+
def self.values
|
|
2665
|
+
end
|
|
2666
|
+
end
|
|
2667
|
+
end
|
|
2668
|
+
|
|
2669
|
+
class SttContext < Revox::Internal::Type::BaseModel
|
|
2670
|
+
OrHash =
|
|
2671
|
+
T.type_alias do
|
|
2672
|
+
T.any(
|
|
2673
|
+
Revox::CallCreateParams::Assistant::SttContext,
|
|
2674
|
+
Revox::Internal::AnyHash
|
|
2675
|
+
)
|
|
2676
|
+
end
|
|
2677
|
+
|
|
2678
|
+
sig do
|
|
2679
|
+
returns(
|
|
2680
|
+
T::Array[Revox::CallCreateParams::Assistant::SttContext::General]
|
|
2681
|
+
)
|
|
2682
|
+
end
|
|
2683
|
+
attr_accessor :general
|
|
2684
|
+
|
|
2685
|
+
sig { returns(T::Array[String]) }
|
|
2686
|
+
attr_accessor :terms
|
|
2687
|
+
|
|
2688
|
+
# Assistant-level speech-to-text context: structured `general` key/value pairs
|
|
2689
|
+
# plus a list of domain `terms`. Prompt-derived context is merged in without
|
|
2690
|
+
# replacing existing entries.
|
|
2691
|
+
sig do
|
|
2692
|
+
params(
|
|
2693
|
+
general:
|
|
2694
|
+
T::Array[
|
|
2695
|
+
Revox::CallCreateParams::Assistant::SttContext::General::OrHash
|
|
2696
|
+
],
|
|
2697
|
+
terms: T::Array[String]
|
|
2698
|
+
).returns(T.attached_class)
|
|
2699
|
+
end
|
|
2700
|
+
def self.new(general:, terms:)
|
|
2701
|
+
end
|
|
2702
|
+
|
|
2703
|
+
sig do
|
|
2704
|
+
override.returns(
|
|
2705
|
+
{
|
|
2706
|
+
general:
|
|
2707
|
+
T::Array[
|
|
2708
|
+
Revox::CallCreateParams::Assistant::SttContext::General
|
|
2709
|
+
],
|
|
2710
|
+
terms: T::Array[String]
|
|
2711
|
+
}
|
|
2712
|
+
)
|
|
2713
|
+
end
|
|
2714
|
+
def to_hash
|
|
2715
|
+
end
|
|
2716
|
+
|
|
2717
|
+
class General < Revox::Internal::Type::BaseModel
|
|
2718
|
+
OrHash =
|
|
2719
|
+
T.type_alias do
|
|
2720
|
+
T.any(
|
|
2721
|
+
Revox::CallCreateParams::Assistant::SttContext::General,
|
|
2722
|
+
Revox::Internal::AnyHash
|
|
2723
|
+
)
|
|
2724
|
+
end
|
|
2725
|
+
|
|
2726
|
+
sig { returns(String) }
|
|
2727
|
+
attr_accessor :key
|
|
2728
|
+
|
|
2729
|
+
sig { returns(String) }
|
|
2730
|
+
attr_accessor :value
|
|
2731
|
+
|
|
2732
|
+
sig { params(key: String, value: String).returns(T.attached_class) }
|
|
2733
|
+
def self.new(key:, value:)
|
|
2734
|
+
end
|
|
2735
|
+
|
|
2736
|
+
sig { override.returns({ key: String, value: String }) }
|
|
2737
|
+
def to_hash
|
|
2738
|
+
end
|
|
2739
|
+
end
|
|
2740
|
+
end
|
|
2741
|
+
|
|
2742
|
+
# Transcriber (speech-to-text) model. Defaults to the newest Soniox realtime model
|
|
2743
|
+
# when omitted.
|
|
2744
|
+
module SttModel
|
|
2745
|
+
extend Revox::Internal::Type::Enum
|
|
2746
|
+
|
|
2747
|
+
TaggedSymbol =
|
|
2748
|
+
T.type_alias do
|
|
2749
|
+
T.all(Symbol, Revox::CallCreateParams::Assistant::SttModel)
|
|
2750
|
+
end
|
|
2751
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2752
|
+
|
|
2753
|
+
STT_RT_V4 =
|
|
2754
|
+
T.let(
|
|
2755
|
+
:"stt-rt-v4",
|
|
2756
|
+
Revox::CallCreateParams::Assistant::SttModel::TaggedSymbol
|
|
2757
|
+
)
|
|
2758
|
+
STT_RT_V5 =
|
|
2759
|
+
T.let(
|
|
2760
|
+
:"stt-rt-v5",
|
|
2761
|
+
Revox::CallCreateParams::Assistant::SttModel::TaggedSymbol
|
|
2762
|
+
)
|
|
2763
|
+
|
|
2764
|
+
sig do
|
|
2765
|
+
override.returns(
|
|
2766
|
+
T::Array[
|
|
2767
|
+
Revox::CallCreateParams::Assistant::SttModel::TaggedSymbol
|
|
2768
|
+
]
|
|
2769
|
+
)
|
|
2770
|
+
end
|
|
2771
|
+
def self.values
|
|
2772
|
+
end
|
|
2773
|
+
end
|
|
2774
|
+
|
|
2775
|
+
# Audio clip to play while the agent is processing a response. One of the built-in
|
|
2776
|
+
# LiveKit audio clips; null/omitted disables it.
|
|
2777
|
+
module ThinkingSound
|
|
2778
|
+
extend Revox::Internal::Type::Enum
|
|
2779
|
+
|
|
2780
|
+
TaggedSymbol =
|
|
2781
|
+
T.type_alias do
|
|
2782
|
+
T.all(Symbol, Revox::CallCreateParams::Assistant::ThinkingSound)
|
|
2783
|
+
end
|
|
2784
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2785
|
+
|
|
2786
|
+
CITY_AMBIENCE_OGG =
|
|
2787
|
+
T.let(
|
|
2788
|
+
:"city-ambience.ogg",
|
|
2789
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2790
|
+
)
|
|
2791
|
+
FOREST_AMBIENCE_OGG =
|
|
2792
|
+
T.let(
|
|
2793
|
+
:"forest-ambience.ogg",
|
|
2794
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2795
|
+
)
|
|
2796
|
+
OFFICE_AMBIENCE_OGG =
|
|
2797
|
+
T.let(
|
|
2798
|
+
:"office-ambience.ogg",
|
|
2799
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2800
|
+
)
|
|
2801
|
+
CROWDED_ROOM_OGG =
|
|
2802
|
+
T.let(
|
|
2803
|
+
:"crowded-room.ogg",
|
|
2804
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2805
|
+
)
|
|
2806
|
+
KEYBOARD_TYPING_OGG =
|
|
2807
|
+
T.let(
|
|
2808
|
+
:"keyboard-typing.ogg",
|
|
2809
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2810
|
+
)
|
|
2811
|
+
KEYBOARD_TYPING2_OGG =
|
|
2812
|
+
T.let(
|
|
2813
|
+
:"keyboard-typing2.ogg",
|
|
2814
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2815
|
+
)
|
|
2816
|
+
HOLD_MUSIC_OGG =
|
|
2817
|
+
T.let(
|
|
2818
|
+
:"hold_music.ogg",
|
|
2819
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
850
2820
|
)
|
|
851
|
-
end
|
|
852
2821
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}
|
|
860
|
-
)
|
|
861
|
-
end
|
|
862
|
-
def to_hash
|
|
863
|
-
end
|
|
2822
|
+
sig do
|
|
2823
|
+
override.returns(
|
|
2824
|
+
T::Array[
|
|
2825
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2826
|
+
]
|
|
2827
|
+
)
|
|
864
2828
|
end
|
|
2829
|
+
def self.values
|
|
2830
|
+
end
|
|
2831
|
+
end
|
|
2832
|
+
|
|
2833
|
+
# Assistant kind. 'standalone' (default) is a normal assistant, 'multi-step'
|
|
2834
|
+
# orchestrates a flow of sub-assistants, 'sub-assistant' is a step inside a
|
|
2835
|
+
# multi-step flow (hidden from the assistants list). Flow transitions are managed
|
|
2836
|
+
# via the /assistants/:id/edges endpoints, not on the assistant itself.
|
|
2837
|
+
module Type
|
|
2838
|
+
extend Revox::Internal::Type::Enum
|
|
2839
|
+
|
|
2840
|
+
TaggedSymbol =
|
|
2841
|
+
T.type_alias do
|
|
2842
|
+
T.all(Symbol, Revox::CallCreateParams::Assistant::Type)
|
|
2843
|
+
end
|
|
2844
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
2845
|
+
|
|
2846
|
+
STANDALONE =
|
|
2847
|
+
T.let(
|
|
2848
|
+
:standalone,
|
|
2849
|
+
Revox::CallCreateParams::Assistant::Type::TaggedSymbol
|
|
2850
|
+
)
|
|
2851
|
+
MULTI_STEP =
|
|
2852
|
+
T.let(
|
|
2853
|
+
:"multi-step",
|
|
2854
|
+
Revox::CallCreateParams::Assistant::Type::TaggedSymbol
|
|
2855
|
+
)
|
|
2856
|
+
SUB_ASSISTANT =
|
|
2857
|
+
T.let(
|
|
2858
|
+
:"sub-assistant",
|
|
2859
|
+
Revox::CallCreateParams::Assistant::Type::TaggedSymbol
|
|
2860
|
+
)
|
|
865
2861
|
|
|
866
2862
|
sig do
|
|
867
2863
|
override.returns(
|
|
868
|
-
T::Array[Revox::CallCreateParams::Assistant::
|
|
2864
|
+
T::Array[Revox::CallCreateParams::Assistant::Type::TaggedSymbol]
|
|
869
2865
|
)
|
|
870
2866
|
end
|
|
871
|
-
def self.
|
|
2867
|
+
def self.values
|
|
872
2868
|
end
|
|
873
2869
|
end
|
|
874
2870
|
|
|
875
|
-
class
|
|
2871
|
+
class Voice < Revox::Internal::Type::BaseModel
|
|
876
2872
|
OrHash =
|
|
877
2873
|
T.type_alias do
|
|
878
2874
|
T.any(
|
|
879
|
-
Revox::CallCreateParams::Assistant::
|
|
2875
|
+
Revox::CallCreateParams::Assistant::Voice,
|
|
880
2876
|
Revox::Internal::AnyHash
|
|
881
2877
|
)
|
|
882
2878
|
end
|
|
883
2879
|
|
|
2880
|
+
# The ID of the voice.
|
|
884
2881
|
sig { returns(String) }
|
|
885
|
-
attr_accessor :
|
|
2882
|
+
attr_accessor :id
|
|
886
2883
|
|
|
887
|
-
|
|
888
|
-
|
|
2884
|
+
# The provider of the voice.
|
|
2885
|
+
sig do
|
|
2886
|
+
returns(
|
|
2887
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::OrSymbol
|
|
2888
|
+
)
|
|
2889
|
+
end
|
|
2890
|
+
attr_accessor :provider
|
|
889
2891
|
|
|
2892
|
+
# Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
|
|
2893
|
+
# for other providers.
|
|
890
2894
|
sig do
|
|
891
2895
|
returns(
|
|
892
|
-
|
|
2896
|
+
T.nilable(
|
|
2897
|
+
Revox::CallCreateParams::Assistant::Voice::Model::OrSymbol
|
|
2898
|
+
)
|
|
893
2899
|
)
|
|
894
2900
|
end
|
|
895
|
-
|
|
2901
|
+
attr_reader :model
|
|
896
2902
|
|
|
897
|
-
sig
|
|
898
|
-
|
|
2903
|
+
sig do
|
|
2904
|
+
params(
|
|
2905
|
+
model: Revox::CallCreateParams::Assistant::Voice::Model::OrSymbol
|
|
2906
|
+
).void
|
|
2907
|
+
end
|
|
2908
|
+
attr_writer :model
|
|
899
2909
|
|
|
900
|
-
|
|
901
|
-
|
|
2910
|
+
# The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
|
|
2911
|
+
# 0.7–1.2. Default is 1.0.
|
|
2912
|
+
sig { returns(T.nilable(Float)) }
|
|
2913
|
+
attr_reader :speed
|
|
902
2914
|
|
|
903
|
-
sig {
|
|
904
|
-
|
|
2915
|
+
sig { params(speed: Float).void }
|
|
2916
|
+
attr_writer :speed
|
|
905
2917
|
|
|
906
|
-
|
|
907
|
-
|
|
2918
|
+
# Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
|
|
2919
|
+
# providers.
|
|
2920
|
+
sig { returns(T.nilable(Float)) }
|
|
2921
|
+
attr_reader :volume
|
|
908
2922
|
|
|
2923
|
+
sig { params(volume: Float).void }
|
|
2924
|
+
attr_writer :volume
|
|
2925
|
+
|
|
2926
|
+
# The voice to use for the call. You can get the list of voices using the /voices
|
|
2927
|
+
# endpoint
|
|
909
2928
|
sig do
|
|
910
2929
|
params(
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
2930
|
+
id: String,
|
|
2931
|
+
provider:
|
|
2932
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::OrSymbol,
|
|
2933
|
+
model: Revox::CallCreateParams::Assistant::Voice::Model::OrSymbol,
|
|
2934
|
+
speed: Float,
|
|
2935
|
+
volume: Float
|
|
917
2936
|
).returns(T.attached_class)
|
|
918
2937
|
end
|
|
919
2938
|
def self.new(
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
2939
|
+
# The ID of the voice.
|
|
2940
|
+
id:,
|
|
2941
|
+
# The provider of the voice.
|
|
2942
|
+
provider:,
|
|
2943
|
+
# Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
|
|
2944
|
+
# for other providers.
|
|
2945
|
+
model: nil,
|
|
2946
|
+
# The speed of the voice. Range depends on provider: Cartesia 0.6–1.5, ElevenLabs
|
|
2947
|
+
# 0.7–1.2. Default is 1.0.
|
|
2948
|
+
speed: nil,
|
|
2949
|
+
# Volume of the voice (Cartesia only). 0.5–2.0, default 1.0. Ignored for other
|
|
2950
|
+
# providers.
|
|
2951
|
+
volume: nil
|
|
925
2952
|
)
|
|
926
2953
|
end
|
|
927
2954
|
|
|
928
2955
|
sig do
|
|
929
2956
|
override.returns(
|
|
930
2957
|
{
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
2958
|
+
id: String,
|
|
2959
|
+
provider:
|
|
2960
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::OrSymbol,
|
|
2961
|
+
model:
|
|
2962
|
+
Revox::CallCreateParams::Assistant::Voice::Model::OrSymbol,
|
|
2963
|
+
speed: Float,
|
|
2964
|
+
volume: Float
|
|
937
2965
|
}
|
|
938
2966
|
)
|
|
939
2967
|
end
|
|
940
2968
|
def to_hash
|
|
941
2969
|
end
|
|
942
2970
|
|
|
943
|
-
|
|
2971
|
+
# The provider of the voice.
|
|
2972
|
+
module Provider
|
|
944
2973
|
extend Revox::Internal::Type::Enum
|
|
945
2974
|
|
|
946
2975
|
TaggedSymbol =
|
|
947
2976
|
T.type_alias do
|
|
948
2977
|
T.all(
|
|
949
2978
|
Symbol,
|
|
950
|
-
Revox::CallCreateParams::Assistant::
|
|
2979
|
+
Revox::CallCreateParams::Assistant::Voice::Provider
|
|
951
2980
|
)
|
|
952
2981
|
end
|
|
953
2982
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
954
2983
|
|
|
955
|
-
|
|
956
|
-
T.let(
|
|
957
|
-
:string,
|
|
958
|
-
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
959
|
-
)
|
|
960
|
-
NUMBER =
|
|
2984
|
+
CARTESIA =
|
|
961
2985
|
T.let(
|
|
962
|
-
:
|
|
963
|
-
Revox::CallCreateParams::Assistant::
|
|
2986
|
+
:cartesia,
|
|
2987
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
|
|
964
2988
|
)
|
|
965
|
-
|
|
2989
|
+
ELEVENLABS =
|
|
966
2990
|
T.let(
|
|
967
|
-
:
|
|
968
|
-
Revox::CallCreateParams::Assistant::
|
|
2991
|
+
:elevenlabs,
|
|
2992
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
|
|
969
2993
|
)
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
2994
|
+
|
|
2995
|
+
sig do
|
|
2996
|
+
override.returns(
|
|
2997
|
+
T::Array[
|
|
2998
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
|
|
2999
|
+
]
|
|
974
3000
|
)
|
|
975
|
-
|
|
3001
|
+
end
|
|
3002
|
+
def self.values
|
|
3003
|
+
end
|
|
3004
|
+
end
|
|
3005
|
+
|
|
3006
|
+
# Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
|
|
3007
|
+
# for other providers.
|
|
3008
|
+
module Model
|
|
3009
|
+
extend Revox::Internal::Type::Enum
|
|
3010
|
+
|
|
3011
|
+
TaggedSymbol =
|
|
3012
|
+
T.type_alias do
|
|
3013
|
+
T.all(Symbol, Revox::CallCreateParams::Assistant::Voice::Model)
|
|
3014
|
+
end
|
|
3015
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
3016
|
+
|
|
3017
|
+
SONIC_3 =
|
|
976
3018
|
T.let(
|
|
977
|
-
:
|
|
978
|
-
Revox::CallCreateParams::Assistant::
|
|
3019
|
+
:"sonic-3",
|
|
3020
|
+
Revox::CallCreateParams::Assistant::Voice::Model::TaggedSymbol
|
|
979
3021
|
)
|
|
980
|
-
|
|
3022
|
+
SONIC_3_5 =
|
|
981
3023
|
T.let(
|
|
982
|
-
:
|
|
983
|
-
Revox::CallCreateParams::Assistant::
|
|
3024
|
+
:"sonic-3.5",
|
|
3025
|
+
Revox::CallCreateParams::Assistant::Voice::Model::TaggedSymbol
|
|
984
3026
|
)
|
|
985
3027
|
|
|
986
3028
|
sig do
|
|
987
3029
|
override.returns(
|
|
988
3030
|
T::Array[
|
|
989
|
-
Revox::CallCreateParams::Assistant::
|
|
3031
|
+
Revox::CallCreateParams::Assistant::Voice::Model::TaggedSymbol
|
|
990
3032
|
]
|
|
991
3033
|
)
|
|
992
3034
|
end
|
|
@@ -995,97 +3037,210 @@ module Revox
|
|
|
995
3037
|
end
|
|
996
3038
|
end
|
|
997
3039
|
|
|
998
|
-
class
|
|
3040
|
+
class Zoho < Revox::Internal::Type::BaseModel
|
|
999
3041
|
OrHash =
|
|
1000
3042
|
T.type_alias do
|
|
1001
3043
|
T.any(
|
|
1002
|
-
Revox::CallCreateParams::Assistant::
|
|
3044
|
+
Revox::CallCreateParams::Assistant::Zoho,
|
|
1003
3045
|
Revox::Internal::AnyHash
|
|
1004
3046
|
)
|
|
1005
3047
|
end
|
|
1006
3048
|
|
|
1007
|
-
# The ID
|
|
3049
|
+
# The Nango connection ID linking the org's Zoho CRM account to Revox.
|
|
1008
3050
|
sig { returns(String) }
|
|
1009
|
-
attr_accessor :
|
|
3051
|
+
attr_accessor :connection_id
|
|
1010
3052
|
|
|
1011
|
-
#
|
|
3053
|
+
# Maps extracted call fields (structured_output / prompt variables) onto Zoho
|
|
3054
|
+
# field API names on the upserted record.
|
|
1012
3055
|
sig do
|
|
1013
3056
|
returns(
|
|
1014
|
-
Revox::CallCreateParams::Assistant::
|
|
3057
|
+
T::Array[Revox::CallCreateParams::Assistant::Zoho::FieldMapping]
|
|
1015
3058
|
)
|
|
1016
3059
|
end
|
|
1017
|
-
attr_accessor :
|
|
3060
|
+
attr_accessor :field_mapping
|
|
1018
3061
|
|
|
1019
|
-
#
|
|
1020
|
-
#
|
|
1021
|
-
sig { returns(T
|
|
1022
|
-
|
|
3062
|
+
# When true, also log the call as a record in Zoho's Calls module (related to the
|
|
3063
|
+
# upserted prospect via Who_Id).
|
|
3064
|
+
sig { returns(T::Boolean) }
|
|
3065
|
+
attr_accessor :log_call_activity
|
|
1023
3066
|
|
|
1024
|
-
|
|
1025
|
-
|
|
3067
|
+
# Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
|
|
3068
|
+
sig { returns(String) }
|
|
3069
|
+
attr_accessor :module_
|
|
1026
3070
|
|
|
1027
|
-
#
|
|
1028
|
-
#
|
|
3071
|
+
# Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
|
|
3072
|
+
# 'none' to push when outcome is null.
|
|
3073
|
+
sig do
|
|
3074
|
+
returns(
|
|
3075
|
+
T::Array[
|
|
3076
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::OrSymbol
|
|
3077
|
+
]
|
|
3078
|
+
)
|
|
3079
|
+
end
|
|
3080
|
+
attr_accessor :outcomes
|
|
3081
|
+
|
|
3082
|
+
# Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
3083
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
|
|
3084
|
+
# prompt_variables and structured_output keys. When null/empty a default note
|
|
3085
|
+
# (outcome + summary + auto-listed extracted fields) is used.
|
|
3086
|
+
sig { returns(T.nilable(String)) }
|
|
3087
|
+
attr_accessor :template
|
|
3088
|
+
|
|
3089
|
+
# Zoho CRM integration config. When set, upserts the prospect (keyed on phone)
|
|
3090
|
+
# into the chosen module and attaches a Note with the call summary after a call
|
|
3091
|
+
# ends with one of the configured outcomes.
|
|
1029
3092
|
sig do
|
|
1030
3093
|
params(
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
3094
|
+
connection_id: String,
|
|
3095
|
+
field_mapping:
|
|
3096
|
+
T::Array[
|
|
3097
|
+
Revox::CallCreateParams::Assistant::Zoho::FieldMapping::OrHash
|
|
3098
|
+
],
|
|
3099
|
+
log_call_activity: T::Boolean,
|
|
3100
|
+
module_: String,
|
|
3101
|
+
outcomes:
|
|
3102
|
+
T::Array[
|
|
3103
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::OrSymbol
|
|
3104
|
+
],
|
|
3105
|
+
template: T.nilable(String)
|
|
1035
3106
|
).returns(T.attached_class)
|
|
1036
3107
|
end
|
|
1037
3108
|
def self.new(
|
|
1038
|
-
# The ID
|
|
1039
|
-
|
|
1040
|
-
#
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
#
|
|
1044
|
-
|
|
3109
|
+
# The Nango connection ID linking the org's Zoho CRM account to Revox.
|
|
3110
|
+
connection_id:,
|
|
3111
|
+
# Maps extracted call fields (structured_output / prompt variables) onto Zoho
|
|
3112
|
+
# field API names on the upserted record.
|
|
3113
|
+
field_mapping:,
|
|
3114
|
+
# When true, also log the call as a record in Zoho's Calls module (related to the
|
|
3115
|
+
# upserted prospect via Who_Id).
|
|
3116
|
+
log_call_activity:,
|
|
3117
|
+
# Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
|
|
3118
|
+
module_:,
|
|
3119
|
+
# Which call outcomes trigger the Zoho push (e.g. ['interested', 'none']). Use
|
|
3120
|
+
# 'none' to push when outcome is null.
|
|
3121
|
+
outcomes:,
|
|
3122
|
+
# Optional Note body template. Supports {{summary}}, {{outcome}}, {{phone}},
|
|
3123
|
+
# {{call_url}}, {{assistant_name}}, {{campaign_name}}, {{transcript}}, plus
|
|
3124
|
+
# prompt_variables and structured_output keys. When null/empty a default note
|
|
3125
|
+
# (outcome + summary + auto-listed extracted fields) is used.
|
|
3126
|
+
template: nil
|
|
1045
3127
|
)
|
|
1046
3128
|
end
|
|
1047
3129
|
|
|
1048
3130
|
sig do
|
|
1049
3131
|
override.returns(
|
|
1050
3132
|
{
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
3133
|
+
connection_id: String,
|
|
3134
|
+
field_mapping:
|
|
3135
|
+
T::Array[
|
|
3136
|
+
Revox::CallCreateParams::Assistant::Zoho::FieldMapping
|
|
3137
|
+
],
|
|
3138
|
+
log_call_activity: T::Boolean,
|
|
3139
|
+
module_: String,
|
|
3140
|
+
outcomes:
|
|
3141
|
+
T::Array[
|
|
3142
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::OrSymbol
|
|
3143
|
+
],
|
|
3144
|
+
template: T.nilable(String)
|
|
1055
3145
|
}
|
|
1056
3146
|
)
|
|
1057
3147
|
end
|
|
1058
3148
|
def to_hash
|
|
1059
3149
|
end
|
|
1060
3150
|
|
|
1061
|
-
|
|
1062
|
-
|
|
3151
|
+
class FieldMapping < Revox::Internal::Type::BaseModel
|
|
3152
|
+
OrHash =
|
|
3153
|
+
T.type_alias do
|
|
3154
|
+
T.any(
|
|
3155
|
+
Revox::CallCreateParams::Assistant::Zoho::FieldMapping,
|
|
3156
|
+
Revox::Internal::AnyHash
|
|
3157
|
+
)
|
|
3158
|
+
end
|
|
3159
|
+
|
|
3160
|
+
# Source key to read from the call: a structured_output field name, falling back
|
|
3161
|
+
# to a prompt variable of the same name.
|
|
3162
|
+
sig { returns(String) }
|
|
3163
|
+
attr_accessor :source
|
|
3164
|
+
|
|
3165
|
+
# Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
|
|
3166
|
+
# or a custom 'Budget\_\_c').
|
|
3167
|
+
sig { returns(String) }
|
|
3168
|
+
attr_accessor :zoho_field
|
|
3169
|
+
|
|
3170
|
+
sig do
|
|
3171
|
+
params(source: String, zoho_field: String).returns(
|
|
3172
|
+
T.attached_class
|
|
3173
|
+
)
|
|
3174
|
+
end
|
|
3175
|
+
def self.new(
|
|
3176
|
+
# Source key to read from the call: a structured_output field name, falling back
|
|
3177
|
+
# to a prompt variable of the same name.
|
|
3178
|
+
source:,
|
|
3179
|
+
# Destination Zoho field API name on the upserted record (e.g. 'Email', 'Company',
|
|
3180
|
+
# or a custom 'Budget\_\_c').
|
|
3181
|
+
zoho_field:
|
|
3182
|
+
)
|
|
3183
|
+
end
|
|
3184
|
+
|
|
3185
|
+
sig { override.returns({ source: String, zoho_field: String }) }
|
|
3186
|
+
def to_hash
|
|
3187
|
+
end
|
|
3188
|
+
end
|
|
3189
|
+
|
|
3190
|
+
module Outcome
|
|
1063
3191
|
extend Revox::Internal::Type::Enum
|
|
1064
3192
|
|
|
1065
3193
|
TaggedSymbol =
|
|
1066
3194
|
T.type_alias do
|
|
1067
|
-
T.all(
|
|
1068
|
-
Symbol,
|
|
1069
|
-
Revox::CallCreateParams::Assistant::Voice::Provider
|
|
1070
|
-
)
|
|
3195
|
+
T.all(Symbol, Revox::CallCreateParams::Assistant::Zoho::Outcome)
|
|
1071
3196
|
end
|
|
1072
3197
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1073
3198
|
|
|
1074
|
-
|
|
3199
|
+
NOT_INTERESTED =
|
|
1075
3200
|
T.let(
|
|
1076
|
-
:
|
|
1077
|
-
Revox::CallCreateParams::Assistant::
|
|
3201
|
+
:not_interested,
|
|
3202
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
1078
3203
|
)
|
|
1079
|
-
|
|
3204
|
+
INTERESTED =
|
|
1080
3205
|
T.let(
|
|
1081
|
-
:
|
|
1082
|
-
Revox::CallCreateParams::Assistant::
|
|
3206
|
+
:interested,
|
|
3207
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
3208
|
+
)
|
|
3209
|
+
COMPLETED =
|
|
3210
|
+
T.let(
|
|
3211
|
+
:completed,
|
|
3212
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
3213
|
+
)
|
|
3214
|
+
REQUESTED_CALLBACK_LATER =
|
|
3215
|
+
T.let(
|
|
3216
|
+
:requested_callback_later,
|
|
3217
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
3218
|
+
)
|
|
3219
|
+
REQUESTED_CALLBACK_NEW_NUMBER =
|
|
3220
|
+
T.let(
|
|
3221
|
+
:requested_callback_new_number,
|
|
3222
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
3223
|
+
)
|
|
3224
|
+
DO_NOT_CONTACT =
|
|
3225
|
+
T.let(
|
|
3226
|
+
:do_not_contact,
|
|
3227
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
3228
|
+
)
|
|
3229
|
+
AI_AVERSE =
|
|
3230
|
+
T.let(
|
|
3231
|
+
:ai_averse,
|
|
3232
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
3233
|
+
)
|
|
3234
|
+
NONE =
|
|
3235
|
+
T.let(
|
|
3236
|
+
:none,
|
|
3237
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
1083
3238
|
)
|
|
1084
3239
|
|
|
1085
3240
|
sig do
|
|
1086
3241
|
override.returns(
|
|
1087
3242
|
T::Array[
|
|
1088
|
-
Revox::CallCreateParams::Assistant::
|
|
3243
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
1089
3244
|
]
|
|
1090
3245
|
)
|
|
1091
3246
|
end
|