revox 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +71 -0
- data/README.md +39 -14
- data/lib/revox/client.rb +15 -1
- data/lib/revox/internal/transport/base_client.rb +5 -0
- data/lib/revox/internal/util.rb +22 -7
- data/lib/revox/models/assistant_create_params.rb +1038 -13
- data/lib/revox/models/assistant_create_response.rb +1071 -11
- data/lib/revox/models/assistant_list_response.rb +1070 -11
- data/lib/revox/models/assistant_retrieve_response.rb +1066 -11
- data/lib/revox/models/assistant_update_params.rb +1038 -13
- data/lib/revox/models/assistant_update_response.rb +1097 -12
- data/lib/revox/models/call_create_params.rb +1065 -13
- data/lib/revox/models/call_create_response.rb +1813 -101
- data/lib/revox/models/call_retrieve_response.rb +1815 -101
- data/lib/revox/models/campaign_create_params.rb +67 -2
- data/lib/revox/models/campaign_create_response.rb +1314 -59
- data/lib/revox/models/campaign_get_rows_params.rb +1 -46
- data/lib/revox/models/campaign_get_rows_response.rb +1837 -129
- data/lib/revox/models/campaign_list_response.rb +1312 -59
- data/lib/revox/models/campaign_retrieve_response.rb +1312 -56
- data/lib/revox/models/users/me_retrieve_response.rb +13 -1
- data/lib/revox/models/users/me_update_response.rb +13 -1
- data/lib/revox/models/voice_list_response.rb +55 -1
- data/lib/revox/models/voice_preview_params.rb +49 -1
- data/lib/revox/models.rb +0 -2
- data/lib/revox/resources/assistants.rb +116 -8
- data/lib/revox/resources/call.rb +0 -29
- data/lib/revox/resources/campaigns.rb +12 -17
- data/lib/revox/resources/voices.rb +16 -10
- data/lib/revox/version.rb +1 -1
- data/lib/revox.rb +0 -2
- data/rbi/revox/internal/util.rbi +8 -0
- data/rbi/revox/models/assistant_create_params.rbi +2138 -103
- data/rbi/revox/models/assistant_create_response.rbi +2454 -199
- data/rbi/revox/models/assistant_list_response.rbi +2448 -195
- data/rbi/revox/models/assistant_retrieve_response.rbi +2401 -210
- data/rbi/revox/models/assistant_update_params.rbi +2138 -103
- data/rbi/revox/models/assistant_update_response.rbi +2504 -198
- data/rbi/revox/models/call_create_params.rbi +2382 -225
- data/rbi/revox/models/call_create_response.rbi +4104 -384
- data/rbi/revox/models/call_retrieve_response.rbi +4104 -382
- data/rbi/revox/models/campaign_create_params.rbi +136 -0
- data/rbi/revox/models/campaign_create_response.rbi +2911 -231
- data/rbi/revox/models/campaign_get_rows_params.rbi +2 -82
- data/rbi/revox/models/campaign_get_rows_response.rbi +4135 -410
- data/rbi/revox/models/campaign_list_response.rbi +2904 -230
- data/rbi/revox/models/campaign_retrieve_response.rbi +2911 -231
- data/rbi/revox/models/users/me_retrieve_response.rbi +13 -3
- data/rbi/revox/models/users/me_update_response.rbi +13 -3
- data/rbi/revox/models/voice_list_response.rbi +105 -3
- data/rbi/revox/models/voice_preview_params.rbi +69 -0
- data/rbi/revox/models.rbi +0 -2
- data/rbi/revox/resources/assistants.rbi +284 -8
- data/rbi/revox/resources/call.rbi +0 -21
- data/rbi/revox/resources/campaigns.rbi +12 -19
- data/rbi/revox/resources/voices.rbi +17 -9
- data/sig/revox/internal/util.rbs +4 -0
- data/sig/revox/models/assistant_create_params.rbs +844 -11
- data/sig/revox/models/assistant_create_response.rbs +860 -3
- data/sig/revox/models/assistant_list_response.rbs +860 -3
- data/sig/revox/models/assistant_retrieve_response.rbs +859 -3
- data/sig/revox/models/assistant_update_params.rbs +844 -11
- data/sig/revox/models/assistant_update_response.rbs +886 -6
- data/sig/revox/models/call_create_params.rbs +847 -13
- data/sig/revox/models/call_create_response.rbs +1514 -34
- data/sig/revox/models/call_retrieve_response.rbs +1514 -34
- data/sig/revox/models/campaign_create_params.rbs +54 -0
- data/sig/revox/models/campaign_create_response.rbs +1034 -6
- data/sig/revox/models/campaign_get_rows_params.rbs +2 -64
- data/sig/revox/models/campaign_get_rows_response.rbs +1522 -54
- data/sig/revox/models/campaign_list_response.rbs +1034 -6
- data/sig/revox/models/campaign_retrieve_response.rbs +1034 -6
- data/sig/revox/models/users/me_retrieve_response.rbs +8 -3
- data/sig/revox/models/users/me_update_response.rbs +8 -3
- data/sig/revox/models/voice_list_response.rbs +45 -3
- data/sig/revox/models/voice_preview_params.rbs +42 -1
- data/sig/revox/models.rbs +0 -2
- data/sig/revox/resources/assistants.rbs +56 -2
- data/sig/revox/resources/call.rbs +0 -7
- data/sig/revox/resources/campaigns.rbs +2 -5
- data/sig/revox/resources/voices.rbs +4 -0
- metadata +2 -8
- data/lib/revox/models/call_list_params.rb +0 -52
- data/lib/revox/models/call_list_response.rb +0 -259
- data/rbi/revox/models/call_list_params.rbi +0 -94
- data/rbi/revox/models/call_list_response.rbi +0 -563
- data/sig/revox/models/call_list_params.rbs +0 -63
- data/sig/revox/models/call_list_response.rbs +0 -226
|
@@ -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,12 +182,20 @@ 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
|
|
|
170
195
|
sig do
|
|
171
196
|
params(
|
|
172
|
-
calendly:
|
|
197
|
+
calendly:
|
|
198
|
+
T.nilable(Revox::CallCreateParams::Assistant::Calendly::OrHash)
|
|
173
199
|
).void
|
|
174
200
|
end
|
|
175
201
|
attr_writer :calendly
|
|
@@ -191,6 +217,58 @@ module Revox
|
|
|
191
217
|
end
|
|
192
218
|
attr_writer :call_retry_config
|
|
193
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
|
+
|
|
194
272
|
# Optional message to say when the agent decides to end the call.
|
|
195
273
|
sig { returns(T.nilable(String)) }
|
|
196
274
|
attr_reader :end_of_call_sentence
|
|
@@ -250,6 +328,23 @@ module Revox
|
|
|
250
328
|
end
|
|
251
329
|
attr_writer :first_sentence_mode
|
|
252
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
|
+
|
|
253
348
|
# Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
|
|
254
349
|
# skip turns to navigate phone menus.
|
|
255
350
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -263,7 +358,9 @@ module Revox
|
|
|
263
358
|
T.nilable(
|
|
264
359
|
T.any(
|
|
265
360
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
|
|
266
|
-
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1
|
|
361
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1,
|
|
362
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2,
|
|
363
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3
|
|
267
364
|
)
|
|
268
365
|
)
|
|
269
366
|
)
|
|
@@ -275,12 +372,19 @@ module Revox
|
|
|
275
372
|
llm_model:
|
|
276
373
|
T.any(
|
|
277
374
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::OrHash,
|
|
278
|
-
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
|
|
279
378
|
)
|
|
280
379
|
).void
|
|
281
380
|
end
|
|
282
381
|
attr_writer :llm_model
|
|
283
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
|
+
|
|
284
388
|
# The maximum duration of the call in seconds. This is the maximum time the call
|
|
285
389
|
# will be allowed to run.
|
|
286
390
|
sig { returns(T.nilable(Float)) }
|
|
@@ -289,6 +393,66 @@ module Revox
|
|
|
289
393
|
sig { params(max_call_duration_secs: Float).void }
|
|
290
394
|
attr_writer :max_call_duration_secs
|
|
291
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
|
+
|
|
292
456
|
# The structured output config to use for the call. This is used to extract the
|
|
293
457
|
# data from the call (like email, name, company name, etc.).
|
|
294
458
|
sig do
|
|
@@ -312,11 +476,89 @@ module Revox
|
|
|
312
476
|
end
|
|
313
477
|
attr_writer :structured_output_config
|
|
314
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
|
+
|
|
315
543
|
# Phone number to transfer calls to when users request to speak to a human agent
|
|
316
544
|
# in E.164 format (e.g. +1234567890).
|
|
317
545
|
sig { returns(T.nilable(String)) }
|
|
318
546
|
attr_accessor :transfer_phone_number
|
|
319
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
|
+
|
|
320
562
|
# The voice to use for the call. You can get the list of voices using the /voices
|
|
321
563
|
# endpoint
|
|
322
564
|
sig { returns(T.nilable(Revox::CallCreateParams::Assistant::Voice)) }
|
|
@@ -332,6 +574,17 @@ module Revox
|
|
|
332
574
|
sig { returns(T.nilable(String)) }
|
|
333
575
|
attr_accessor :voicemail_message
|
|
334
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
|
+
|
|
335
588
|
# The webhook URL to call when the call is completed.
|
|
336
589
|
sig { returns(T.nilable(String)) }
|
|
337
590
|
attr_reader :webhook_url
|
|
@@ -339,18 +592,54 @@ module Revox
|
|
|
339
592
|
sig { params(webhook_url: String).void }
|
|
340
593
|
attr_writer :webhook_url
|
|
341
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
|
+
|
|
342
608
|
# You can provide a custom assistant configuration here. If you don't provide an
|
|
343
609
|
# assistant_id, this assistant object will be used for this call.
|
|
344
610
|
sig do
|
|
345
611
|
params(
|
|
346
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),
|
|
347
620
|
background_sound:
|
|
348
621
|
T.nilable(
|
|
349
622
|
Revox::CallCreateParams::Assistant::BackgroundSound::OrSymbol
|
|
350
623
|
),
|
|
351
|
-
|
|
624
|
+
background_sound_volume: Float,
|
|
625
|
+
calendly:
|
|
626
|
+
T.nilable(Revox::CallCreateParams::Assistant::Calendly::OrHash),
|
|
352
627
|
call_retry_config:
|
|
353
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
|
+
),
|
|
354
643
|
end_of_call_sentence: String,
|
|
355
644
|
faq_items:
|
|
356
645
|
T::Array[Revox::CallCreateParams::Assistant::FaqItem::OrHash],
|
|
@@ -358,33 +647,87 @@ module Revox
|
|
|
358
647
|
first_sentence_delay_ms: Integer,
|
|
359
648
|
first_sentence_mode:
|
|
360
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
|
+
),
|
|
361
655
|
ivr_navigation_enabled: T::Boolean,
|
|
362
656
|
llm_model:
|
|
363
657
|
T.any(
|
|
364
658
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0::OrHash,
|
|
365
|
-
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
|
|
366
662
|
),
|
|
663
|
+
logo_url: T.nilable(String),
|
|
367
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),
|
|
368
673
|
structured_output_config:
|
|
369
674
|
T::Array[
|
|
370
675
|
Revox::CallCreateParams::Assistant::StructuredOutputConfig::OrHash
|
|
371
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,
|
|
372
687
|
transfer_phone_number: T.nilable(String),
|
|
688
|
+
type: Revox::CallCreateParams::Assistant::Type::OrSymbol,
|
|
373
689
|
voice: Revox::CallCreateParams::Assistant::Voice::OrHash,
|
|
374
690
|
voicemail_message: T.nilable(String),
|
|
375
|
-
|
|
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)
|
|
376
695
|
).returns(T.attached_class)
|
|
377
696
|
end
|
|
378
697
|
def self.new(
|
|
379
698
|
# The prompt to use for the call. This will be given to the LLM (gpt-4.1)
|
|
380
699
|
prompt:,
|
|
381
|
-
#
|
|
382
|
-
#
|
|
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.
|
|
383
708
|
background_sound: nil,
|
|
709
|
+
# Volume of the ambient background sound (0 = silent, 1 = max).
|
|
710
|
+
background_sound_volume: nil,
|
|
384
711
|
calendly: nil,
|
|
385
712
|
# Configuration for call retry behavior including time windows, delays, and max
|
|
386
713
|
# iterations. If not provided, defaults will be used.
|
|
387
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,
|
|
388
731
|
# Optional message to say when the agent decides to end the call.
|
|
389
732
|
end_of_call_sentence: nil,
|
|
390
733
|
# FAQ items to associate with this assistant. When provided, replaces all existing
|
|
@@ -399,27 +742,92 @@ module Revox
|
|
|
399
742
|
# first_sentence will be spoken exactly as provided. "none" means the agent will
|
|
400
743
|
# not speak first and will wait for the user.
|
|
401
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,
|
|
402
752
|
# Enable IVR navigation tools. When enabled, the assistant can send DTMF tones and
|
|
403
753
|
# skip turns to navigate phone menus.
|
|
404
754
|
ivr_navigation_enabled: nil,
|
|
405
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,
|
|
406
759
|
# The maximum duration of the call in seconds. This is the maximum time the call
|
|
407
760
|
# will be allowed to run.
|
|
408
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,
|
|
409
782
|
# The structured output config to use for the call. This is used to extract the
|
|
410
783
|
# data from the call (like email, name, company name, etc.).
|
|
411
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,
|
|
412
804
|
# Phone number to transfer calls to when users request to speak to a human agent
|
|
413
805
|
# in E.164 format (e.g. +1234567890).
|
|
414
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,
|
|
415
812
|
# The voice to use for the call. You can get the list of voices using the /voices
|
|
416
813
|
# endpoint
|
|
417
814
|
voice: nil,
|
|
418
815
|
# If set, when voicemail is detected the agent will speak this message then hang
|
|
419
816
|
# up; if null, hang up immediately.
|
|
420
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,
|
|
421
825
|
# The webhook URL to call when the call is completed.
|
|
422
|
-
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
|
|
423
831
|
)
|
|
424
832
|
end
|
|
425
833
|
|
|
@@ -427,42 +835,156 @@ module Revox
|
|
|
427
835
|
override.returns(
|
|
428
836
|
{
|
|
429
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),
|
|
430
845
|
background_sound:
|
|
431
846
|
T.nilable(
|
|
432
847
|
Revox::CallCreateParams::Assistant::BackgroundSound::OrSymbol
|
|
433
848
|
),
|
|
434
|
-
|
|
849
|
+
background_sound_volume: Float,
|
|
850
|
+
calendly: T.nilable(Revox::CallCreateParams::Assistant::Calendly),
|
|
435
851
|
call_retry_config:
|
|
436
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
|
+
),
|
|
437
867
|
end_of_call_sentence: String,
|
|
438
868
|
faq_items: T::Array[Revox::CallCreateParams::Assistant::FaqItem],
|
|
439
869
|
first_sentence: String,
|
|
440
870
|
first_sentence_delay_ms: Integer,
|
|
441
871
|
first_sentence_mode:
|
|
442
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
|
+
),
|
|
443
878
|
ivr_navigation_enabled: T::Boolean,
|
|
444
879
|
llm_model:
|
|
445
880
|
T.any(
|
|
446
881
|
Revox::CallCreateParams::Assistant::LlmModel::UnionMember0,
|
|
447
|
-
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1
|
|
882
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember1,
|
|
883
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember2,
|
|
884
|
+
Revox::CallCreateParams::Assistant::LlmModel::UnionMember3
|
|
448
885
|
),
|
|
886
|
+
logo_url: T.nilable(String),
|
|
449
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),
|
|
450
895
|
structured_output_config:
|
|
451
896
|
T::Array[
|
|
452
897
|
Revox::CallCreateParams::Assistant::StructuredOutputConfig
|
|
453
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,
|
|
454
909
|
transfer_phone_number: T.nilable(String),
|
|
910
|
+
type: Revox::CallCreateParams::Assistant::Type::OrSymbol,
|
|
455
911
|
voice: Revox::CallCreateParams::Assistant::Voice,
|
|
456
912
|
voicemail_message: T.nilable(String),
|
|
457
|
-
|
|
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)
|
|
458
917
|
}
|
|
459
918
|
)
|
|
460
919
|
end
|
|
461
920
|
def to_hash
|
|
462
921
|
end
|
|
463
922
|
|
|
464
|
-
|
|
465
|
-
|
|
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.
|
|
466
988
|
module BackgroundSound
|
|
467
989
|
extend Revox::Internal::Type::Enum
|
|
468
990
|
|
|
@@ -537,6 +1059,24 @@ module Revox
|
|
|
537
1059
|
)
|
|
538
1060
|
end
|
|
539
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
|
+
|
|
540
1080
|
sig do
|
|
541
1081
|
returns(
|
|
542
1082
|
T::Array[
|
|
@@ -560,6 +1100,11 @@ module Revox
|
|
|
560
1100
|
# iterations. If not provided, defaults will be used.
|
|
561
1101
|
sig do
|
|
562
1102
|
params(
|
|
1103
|
+
allowed_days:
|
|
1104
|
+
T::Array[
|
|
1105
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::OrSymbol
|
|
1106
|
+
],
|
|
1107
|
+
call_twice_in_a_row: T::Boolean,
|
|
563
1108
|
calling_windows:
|
|
564
1109
|
T::Array[
|
|
565
1110
|
Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow::OrHash
|
|
@@ -569,6 +1114,14 @@ module Revox
|
|
|
569
1114
|
).returns(T.attached_class)
|
|
570
1115
|
end
|
|
571
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:,
|
|
572
1125
|
calling_windows:,
|
|
573
1126
|
# Maximum number of call retry attempts. Default: 3.
|
|
574
1127
|
max_retry_attempts:,
|
|
@@ -582,6 +1135,11 @@ module Revox
|
|
|
582
1135
|
sig do
|
|
583
1136
|
override.returns(
|
|
584
1137
|
{
|
|
1138
|
+
allowed_days:
|
|
1139
|
+
T::Array[
|
|
1140
|
+
Revox::CallCreateParams::Assistant::CallRetryConfig::AllowedDay::OrSymbol
|
|
1141
|
+
],
|
|
1142
|
+
call_twice_in_a_row: T::Boolean,
|
|
585
1143
|
calling_windows:
|
|
586
1144
|
T::Array[
|
|
587
1145
|
Revox::CallCreateParams::Assistant::CallRetryConfig::CallingWindow
|
|
@@ -594,6 +1152,65 @@ module Revox
|
|
|
594
1152
|
def to_hash
|
|
595
1153
|
end
|
|
596
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
|
+
|
|
597
1214
|
class CallingWindow < Revox::Internal::Type::BaseModel
|
|
598
1215
|
OrHash =
|
|
599
1216
|
T.type_alias do
|
|
@@ -654,154 +1271,285 @@ module Revox
|
|
|
654
1271
|
end
|
|
655
1272
|
end
|
|
656
1273
|
|
|
657
|
-
class
|
|
1274
|
+
class CustomTool < Revox::Internal::Type::BaseModel
|
|
658
1275
|
OrHash =
|
|
659
1276
|
T.type_alias do
|
|
660
1277
|
T.any(
|
|
661
|
-
Revox::CallCreateParams::Assistant::
|
|
1278
|
+
Revox::CallCreateParams::Assistant::CustomTool,
|
|
662
1279
|
Revox::Internal::AnyHash
|
|
663
1280
|
)
|
|
664
1281
|
end
|
|
665
1282
|
|
|
666
|
-
|
|
667
|
-
|
|
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
|
|
668
1287
|
|
|
1288
|
+
# Human-readable description of what the tool does, used by the LLM to decide when
|
|
1289
|
+
# to call it
|
|
669
1290
|
sig { returns(String) }
|
|
670
|
-
attr_accessor :
|
|
1291
|
+
attr_accessor :description
|
|
671
1292
|
|
|
1293
|
+
# HTTP headers to include in the request. Values support {{variable}} placeholders
|
|
672
1294
|
sig do
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
1295
|
+
returns(
|
|
1296
|
+
T::Array[Revox::CallCreateParams::Assistant::CustomTool::Header]
|
|
1297
|
+
)
|
|
676
1298
|
end
|
|
1299
|
+
attr_accessor :headers
|
|
677
1300
|
|
|
678
|
-
|
|
679
|
-
|
|
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
|
+
)
|
|
680
1309
|
end
|
|
681
|
-
|
|
1310
|
+
attr_accessor :input_schema
|
|
682
1311
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
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_
|
|
689
1319
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
Symbol,
|
|
694
|
-
Revox::CallCreateParams::Assistant::FirstSentenceMode
|
|
695
|
-
)
|
|
696
|
-
end
|
|
697
|
-
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
|
|
698
1323
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
:static,
|
|
707
|
-
Revox::CallCreateParams::Assistant::FirstSentenceMode::TaggedSymbol
|
|
708
|
-
)
|
|
709
|
-
NONE =
|
|
710
|
-
T.let(
|
|
711
|
-
:none,
|
|
712
|
-
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
|
+
]
|
|
713
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
|
|
714
1386
|
|
|
715
1387
|
sig do
|
|
716
1388
|
override.returns(
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
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
|
+
}
|
|
720
1409
|
)
|
|
721
1410
|
end
|
|
722
|
-
def
|
|
1411
|
+
def to_hash
|
|
723
1412
|
end
|
|
724
|
-
end
|
|
725
1413
|
|
|
726
|
-
|
|
727
|
-
|
|
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
|
|
728
1422
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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:)
|
|
735
1431
|
end
|
|
736
1432
|
|
|
737
|
-
|
|
1433
|
+
sig { override.returns({ key: String, value: String }) }
|
|
1434
|
+
def to_hash
|
|
1435
|
+
end
|
|
1436
|
+
end
|
|
1437
|
+
|
|
1438
|
+
class InputSchema < Revox::Internal::Type::BaseModel
|
|
738
1439
|
OrHash =
|
|
739
1440
|
T.type_alias do
|
|
740
1441
|
T.any(
|
|
741
|
-
Revox::CallCreateParams::Assistant::
|
|
1442
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema,
|
|
742
1443
|
Revox::Internal::AnyHash
|
|
743
1444
|
)
|
|
744
1445
|
end
|
|
745
1446
|
|
|
1447
|
+
sig { returns(String) }
|
|
1448
|
+
attr_accessor :name
|
|
1449
|
+
|
|
1450
|
+
sig { returns(T::Boolean) }
|
|
1451
|
+
attr_accessor :required
|
|
1452
|
+
|
|
746
1453
|
sig do
|
|
747
1454
|
returns(
|
|
748
|
-
Revox::CallCreateParams::Assistant::
|
|
1455
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::OrSymbol
|
|
749
1456
|
)
|
|
750
1457
|
end
|
|
751
|
-
attr_accessor :name
|
|
752
|
-
|
|
753
|
-
sig { returns(Symbol) }
|
|
754
1458
|
attr_accessor :type
|
|
755
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
|
+
|
|
756
1472
|
sig do
|
|
757
1473
|
params(
|
|
758
|
-
name:
|
|
759
|
-
|
|
760
|
-
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]
|
|
761
1480
|
).returns(T.attached_class)
|
|
762
1481
|
end
|
|
763
|
-
def self.new(
|
|
1482
|
+
def self.new(
|
|
1483
|
+
name:,
|
|
1484
|
+
required:,
|
|
1485
|
+
type:,
|
|
1486
|
+
description: nil,
|
|
1487
|
+
enum_options: nil
|
|
1488
|
+
)
|
|
764
1489
|
end
|
|
765
1490
|
|
|
766
1491
|
sig do
|
|
767
1492
|
override.returns(
|
|
768
1493
|
{
|
|
769
|
-
name:
|
|
770
|
-
|
|
771
|
-
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]
|
|
772
1500
|
}
|
|
773
1501
|
)
|
|
774
1502
|
end
|
|
775
1503
|
def to_hash
|
|
776
1504
|
end
|
|
777
1505
|
|
|
778
|
-
module
|
|
1506
|
+
module Type
|
|
779
1507
|
extend Revox::Internal::Type::Enum
|
|
780
1508
|
|
|
781
1509
|
TaggedSymbol =
|
|
782
1510
|
T.type_alias do
|
|
783
1511
|
T.all(
|
|
784
1512
|
Symbol,
|
|
785
|
-
Revox::CallCreateParams::Assistant::
|
|
1513
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type
|
|
786
1514
|
)
|
|
787
1515
|
end
|
|
788
1516
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
789
1517
|
|
|
790
|
-
|
|
1518
|
+
STRING =
|
|
791
1519
|
T.let(
|
|
792
|
-
:
|
|
793
|
-
Revox::CallCreateParams::Assistant::
|
|
1520
|
+
:string,
|
|
1521
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
794
1522
|
)
|
|
795
|
-
|
|
1523
|
+
NUMBER =
|
|
796
1524
|
T.let(
|
|
797
|
-
:
|
|
798
|
-
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
|
|
799
1547
|
)
|
|
800
1548
|
|
|
801
1549
|
sig do
|
|
802
1550
|
override.returns(
|
|
803
1551
|
T::Array[
|
|
804
|
-
Revox::CallCreateParams::Assistant::
|
|
1552
|
+
Revox::CallCreateParams::Assistant::CustomTool::InputSchema::Type::TaggedSymbol
|
|
805
1553
|
]
|
|
806
1554
|
)
|
|
807
1555
|
end
|
|
@@ -810,181 +1558,1477 @@ module Revox
|
|
|
810
1558
|
end
|
|
811
1559
|
end
|
|
812
1560
|
|
|
813
|
-
|
|
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
|
|
814
1612
|
OrHash =
|
|
815
1613
|
T.type_alias do
|
|
816
1614
|
T.any(
|
|
817
|
-
Revox::CallCreateParams::Assistant::
|
|
1615
|
+
Revox::CallCreateParams::Assistant::CustomTool::QueryParam,
|
|
818
1616
|
Revox::Internal::AnyHash
|
|
819
1617
|
)
|
|
820
1618
|
end
|
|
821
1619
|
|
|
822
|
-
# The model ID to use from OpenRouter. eg: openai/gpt-4.1
|
|
823
1620
|
sig { returns(String) }
|
|
824
|
-
attr_accessor :
|
|
1621
|
+
attr_accessor :key
|
|
825
1622
|
|
|
826
|
-
# The provider to use from OpenRouter. eg: nebius, openai, azure, etc.
|
|
827
1623
|
sig { returns(String) }
|
|
828
|
-
attr_accessor :
|
|
1624
|
+
attr_accessor :value
|
|
829
1625
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
1626
|
+
sig { params(key: String, value: String).returns(T.attached_class) }
|
|
1627
|
+
def self.new(key:, value:)
|
|
1628
|
+
end
|
|
833
1629
|
|
|
834
|
-
sig
|
|
835
|
-
|
|
836
|
-
openrouter_model_id: String,
|
|
837
|
-
openrouter_provider: String,
|
|
838
|
-
type: Symbol
|
|
839
|
-
).returns(T.attached_class)
|
|
1630
|
+
sig { override.returns({ key: String, value: String }) }
|
|
1631
|
+
def to_hash
|
|
840
1632
|
end
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
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
|
|
848
2820
|
)
|
|
849
|
-
end
|
|
850
2821
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
}
|
|
858
|
-
)
|
|
859
|
-
end
|
|
860
|
-
def to_hash
|
|
861
|
-
end
|
|
2822
|
+
sig do
|
|
2823
|
+
override.returns(
|
|
2824
|
+
T::Array[
|
|
2825
|
+
Revox::CallCreateParams::Assistant::ThinkingSound::TaggedSymbol
|
|
2826
|
+
]
|
|
2827
|
+
)
|
|
862
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
|
+
)
|
|
863
2861
|
|
|
864
2862
|
sig do
|
|
865
2863
|
override.returns(
|
|
866
|
-
T::Array[Revox::CallCreateParams::Assistant::
|
|
2864
|
+
T::Array[Revox::CallCreateParams::Assistant::Type::TaggedSymbol]
|
|
867
2865
|
)
|
|
868
2866
|
end
|
|
869
|
-
def self.
|
|
2867
|
+
def self.values
|
|
870
2868
|
end
|
|
871
2869
|
end
|
|
872
2870
|
|
|
873
|
-
class
|
|
2871
|
+
class Voice < Revox::Internal::Type::BaseModel
|
|
874
2872
|
OrHash =
|
|
875
2873
|
T.type_alias do
|
|
876
2874
|
T.any(
|
|
877
|
-
Revox::CallCreateParams::Assistant::
|
|
2875
|
+
Revox::CallCreateParams::Assistant::Voice,
|
|
878
2876
|
Revox::Internal::AnyHash
|
|
879
2877
|
)
|
|
880
2878
|
end
|
|
881
2879
|
|
|
2880
|
+
# The ID of the voice.
|
|
882
2881
|
sig { returns(String) }
|
|
883
|
-
attr_accessor :
|
|
2882
|
+
attr_accessor :id
|
|
884
2883
|
|
|
885
|
-
|
|
886
|
-
|
|
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
|
|
887
2891
|
|
|
2892
|
+
# Cartesia TTS model (Cartesia only). Defaults to sonic-3 when omitted. Ignored
|
|
2893
|
+
# for other providers.
|
|
888
2894
|
sig do
|
|
889
2895
|
returns(
|
|
890
|
-
|
|
2896
|
+
T.nilable(
|
|
2897
|
+
Revox::CallCreateParams::Assistant::Voice::Model::OrSymbol
|
|
2898
|
+
)
|
|
891
2899
|
)
|
|
892
2900
|
end
|
|
893
|
-
|
|
2901
|
+
attr_reader :model
|
|
894
2902
|
|
|
895
|
-
sig
|
|
896
|
-
|
|
2903
|
+
sig do
|
|
2904
|
+
params(
|
|
2905
|
+
model: Revox::CallCreateParams::Assistant::Voice::Model::OrSymbol
|
|
2906
|
+
).void
|
|
2907
|
+
end
|
|
2908
|
+
attr_writer :model
|
|
897
2909
|
|
|
898
|
-
|
|
899
|
-
|
|
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
|
|
900
2914
|
|
|
901
|
-
sig {
|
|
902
|
-
|
|
2915
|
+
sig { params(speed: Float).void }
|
|
2916
|
+
attr_writer :speed
|
|
903
2917
|
|
|
904
|
-
|
|
905
|
-
|
|
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
|
|
906
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
|
|
907
2928
|
sig do
|
|
908
2929
|
params(
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
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
|
|
915
2936
|
).returns(T.attached_class)
|
|
916
2937
|
end
|
|
917
2938
|
def self.new(
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
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
|
|
923
2952
|
)
|
|
924
2953
|
end
|
|
925
2954
|
|
|
926
2955
|
sig do
|
|
927
2956
|
override.returns(
|
|
928
2957
|
{
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
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
|
|
935
2965
|
}
|
|
936
2966
|
)
|
|
937
2967
|
end
|
|
938
2968
|
def to_hash
|
|
939
2969
|
end
|
|
940
2970
|
|
|
941
|
-
|
|
2971
|
+
# The provider of the voice.
|
|
2972
|
+
module Provider
|
|
942
2973
|
extend Revox::Internal::Type::Enum
|
|
943
2974
|
|
|
944
2975
|
TaggedSymbol =
|
|
945
2976
|
T.type_alias do
|
|
946
2977
|
T.all(
|
|
947
2978
|
Symbol,
|
|
948
|
-
Revox::CallCreateParams::Assistant::
|
|
2979
|
+
Revox::CallCreateParams::Assistant::Voice::Provider
|
|
949
2980
|
)
|
|
950
2981
|
end
|
|
951
2982
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
952
2983
|
|
|
953
|
-
|
|
954
|
-
T.let(
|
|
955
|
-
:string,
|
|
956
|
-
Revox::CallCreateParams::Assistant::StructuredOutputConfig::Type::TaggedSymbol
|
|
957
|
-
)
|
|
958
|
-
NUMBER =
|
|
2984
|
+
CARTESIA =
|
|
959
2985
|
T.let(
|
|
960
|
-
:
|
|
961
|
-
Revox::CallCreateParams::Assistant::
|
|
2986
|
+
:cartesia,
|
|
2987
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
|
|
962
2988
|
)
|
|
963
|
-
|
|
2989
|
+
ELEVENLABS =
|
|
964
2990
|
T.let(
|
|
965
|
-
:
|
|
966
|
-
Revox::CallCreateParams::Assistant::
|
|
2991
|
+
:elevenlabs,
|
|
2992
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
|
|
967
2993
|
)
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
2994
|
+
|
|
2995
|
+
sig do
|
|
2996
|
+
override.returns(
|
|
2997
|
+
T::Array[
|
|
2998
|
+
Revox::CallCreateParams::Assistant::Voice::Provider::TaggedSymbol
|
|
2999
|
+
]
|
|
972
3000
|
)
|
|
973
|
-
|
|
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 =
|
|
974
3018
|
T.let(
|
|
975
|
-
:
|
|
976
|
-
Revox::CallCreateParams::Assistant::
|
|
3019
|
+
:"sonic-3",
|
|
3020
|
+
Revox::CallCreateParams::Assistant::Voice::Model::TaggedSymbol
|
|
977
3021
|
)
|
|
978
|
-
|
|
3022
|
+
SONIC_3_5 =
|
|
979
3023
|
T.let(
|
|
980
|
-
:
|
|
981
|
-
Revox::CallCreateParams::Assistant::
|
|
3024
|
+
:"sonic-3.5",
|
|
3025
|
+
Revox::CallCreateParams::Assistant::Voice::Model::TaggedSymbol
|
|
982
3026
|
)
|
|
983
3027
|
|
|
984
3028
|
sig do
|
|
985
3029
|
override.returns(
|
|
986
3030
|
T::Array[
|
|
987
|
-
Revox::CallCreateParams::Assistant::
|
|
3031
|
+
Revox::CallCreateParams::Assistant::Voice::Model::TaggedSymbol
|
|
988
3032
|
]
|
|
989
3033
|
)
|
|
990
3034
|
end
|
|
@@ -993,97 +3037,210 @@ module Revox
|
|
|
993
3037
|
end
|
|
994
3038
|
end
|
|
995
3039
|
|
|
996
|
-
class
|
|
3040
|
+
class Zoho < Revox::Internal::Type::BaseModel
|
|
997
3041
|
OrHash =
|
|
998
3042
|
T.type_alias do
|
|
999
3043
|
T.any(
|
|
1000
|
-
Revox::CallCreateParams::Assistant::
|
|
3044
|
+
Revox::CallCreateParams::Assistant::Zoho,
|
|
1001
3045
|
Revox::Internal::AnyHash
|
|
1002
3046
|
)
|
|
1003
3047
|
end
|
|
1004
3048
|
|
|
1005
|
-
# The ID
|
|
3049
|
+
# The Nango connection ID linking the org's Zoho CRM account to Revox.
|
|
1006
3050
|
sig { returns(String) }
|
|
1007
|
-
attr_accessor :
|
|
3051
|
+
attr_accessor :connection_id
|
|
1008
3052
|
|
|
1009
|
-
#
|
|
3053
|
+
# Maps extracted call fields (structured_output / prompt variables) onto Zoho
|
|
3054
|
+
# field API names on the upserted record.
|
|
1010
3055
|
sig do
|
|
1011
3056
|
returns(
|
|
1012
|
-
Revox::CallCreateParams::Assistant::
|
|
3057
|
+
T::Array[Revox::CallCreateParams::Assistant::Zoho::FieldMapping]
|
|
1013
3058
|
)
|
|
1014
3059
|
end
|
|
1015
|
-
attr_accessor :
|
|
3060
|
+
attr_accessor :field_mapping
|
|
1016
3061
|
|
|
1017
|
-
#
|
|
1018
|
-
#
|
|
1019
|
-
sig { returns(T
|
|
1020
|
-
|
|
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
|
|
1021
3066
|
|
|
1022
|
-
|
|
1023
|
-
|
|
3067
|
+
# Zoho module the prospect record is upserted into (e.g. 'Leads' or 'Contacts').
|
|
3068
|
+
sig { returns(String) }
|
|
3069
|
+
attr_accessor :module_
|
|
1024
3070
|
|
|
1025
|
-
#
|
|
1026
|
-
#
|
|
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.
|
|
1027
3092
|
sig do
|
|
1028
3093
|
params(
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
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)
|
|
1033
3106
|
).returns(T.attached_class)
|
|
1034
3107
|
end
|
|
1035
3108
|
def self.new(
|
|
1036
|
-
# The ID
|
|
1037
|
-
|
|
1038
|
-
#
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
#
|
|
1042
|
-
|
|
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
|
|
1043
3127
|
)
|
|
1044
3128
|
end
|
|
1045
3129
|
|
|
1046
3130
|
sig do
|
|
1047
3131
|
override.returns(
|
|
1048
3132
|
{
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
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)
|
|
1053
3145
|
}
|
|
1054
3146
|
)
|
|
1055
3147
|
end
|
|
1056
3148
|
def to_hash
|
|
1057
3149
|
end
|
|
1058
3150
|
|
|
1059
|
-
|
|
1060
|
-
|
|
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
|
|
1061
3191
|
extend Revox::Internal::Type::Enum
|
|
1062
3192
|
|
|
1063
3193
|
TaggedSymbol =
|
|
1064
3194
|
T.type_alias do
|
|
1065
|
-
T.all(
|
|
1066
|
-
Symbol,
|
|
1067
|
-
Revox::CallCreateParams::Assistant::Voice::Provider
|
|
1068
|
-
)
|
|
3195
|
+
T.all(Symbol, Revox::CallCreateParams::Assistant::Zoho::Outcome)
|
|
1069
3196
|
end
|
|
1070
3197
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1071
3198
|
|
|
1072
|
-
|
|
3199
|
+
NOT_INTERESTED =
|
|
1073
3200
|
T.let(
|
|
1074
|
-
:
|
|
1075
|
-
Revox::CallCreateParams::Assistant::
|
|
3201
|
+
:not_interested,
|
|
3202
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
1076
3203
|
)
|
|
1077
|
-
|
|
3204
|
+
INTERESTED =
|
|
1078
3205
|
T.let(
|
|
1079
|
-
:
|
|
1080
|
-
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
|
|
1081
3238
|
)
|
|
1082
3239
|
|
|
1083
3240
|
sig do
|
|
1084
3241
|
override.returns(
|
|
1085
3242
|
T::Array[
|
|
1086
|
-
Revox::CallCreateParams::Assistant::
|
|
3243
|
+
Revox::CallCreateParams::Assistant::Zoho::Outcome::TaggedSymbol
|
|
1087
3244
|
]
|
|
1088
3245
|
)
|
|
1089
3246
|
end
|