@blockrun/franklin 3.21.5 → 3.21.6
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.
- package/dist/tools/voice.js +16 -0
- package/package.json +1 -1
package/dist/tools/voice.js
CHANGED
|
@@ -240,6 +240,18 @@ export const voiceCallCapability = {
|
|
|
240
240
|
type: 'boolean',
|
|
241
241
|
description: 'If true, AI waits for the recipient to speak first before talking.',
|
|
242
242
|
},
|
|
243
|
+
voicemail_action: {
|
|
244
|
+
type: 'string',
|
|
245
|
+
enum: ['hangup', 'leave_message', 'ignore'],
|
|
246
|
+
description: 'What to do if voicemail is detected. Default (omitted): hang up without a message. ' +
|
|
247
|
+
'"leave_message" speaks voicemail_message once then hangs up (voicemail_message required). ' +
|
|
248
|
+
'"ignore" skips detection and treats the call as live — only use when sure a human answers.',
|
|
249
|
+
},
|
|
250
|
+
voicemail_message: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
description: 'The message to leave when voicemail_action is "leave_message" (≤1000 chars). ' +
|
|
253
|
+
'Voicemail is one-way — this is spoken once as a monologue, there is no back-and-forth.',
|
|
254
|
+
},
|
|
243
255
|
},
|
|
244
256
|
required: ['to', 'from', 'task'],
|
|
245
257
|
},
|
|
@@ -269,6 +281,10 @@ export const voiceCallCapability = {
|
|
|
269
281
|
body.first_sentence = input.first_sentence;
|
|
270
282
|
if (typeof input.wait_for_greeting === 'boolean')
|
|
271
283
|
body.wait_for_greeting = input.wait_for_greeting;
|
|
284
|
+
if (typeof input.voicemail_action === 'string')
|
|
285
|
+
body.voicemail_action = input.voicemail_action;
|
|
286
|
+
if (typeof input.voicemail_message === 'string')
|
|
287
|
+
body.voicemail_message = input.voicemail_message;
|
|
272
288
|
try {
|
|
273
289
|
const res = await postWithPayment('/v1/voice/call', body, ctx, { tool: 'VoiceCall', priceUsd: 0.54 });
|
|
274
290
|
const callId = (res.call_id || res.id);
|
package/package.json
CHANGED