@happyrobot-ai/sdk 0.1.23 → 0.1.24
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/helpers/voice-agent.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export interface CreateVoiceAgentOptions {
|
|
|
12
12
|
prompt?: string;
|
|
13
13
|
/** Agent initial message. */
|
|
14
14
|
initialMessage?: string;
|
|
15
|
+
/** Whether caller speech can interrupt the initial message. Defaults to false. */
|
|
16
|
+
initialMessageUninterruptible?: boolean;
|
|
15
17
|
/** LLM model override (TemplatedValue format). */
|
|
16
18
|
model?: {
|
|
17
19
|
type: "static";
|
package/helpers/voice-agent.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.createVoiceAgent = createVoiceAgent;
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
async function createVoiceAgent(client, options) {
|
|
21
|
-
const { name, template = "voice-agent", prompt, initialMessage, model, publish = false, environment = "production", folderId, } = options;
|
|
21
|
+
const { name, template = "voice-agent", prompt, initialMessage, initialMessageUninterruptible, model, publish = false, environment = "production", folderId, } = options;
|
|
22
22
|
// 1. Create workflow from template
|
|
23
23
|
const workflow = await client.workflows.create({
|
|
24
24
|
name,
|
|
@@ -30,6 +30,7 @@ async function createVoiceAgent(client, options) {
|
|
|
30
30
|
prompt: {
|
|
31
31
|
prompt_md: prompt,
|
|
32
32
|
initial_message: initialMessage,
|
|
33
|
+
initial_message_uninterruptible: initialMessageUninterruptible,
|
|
33
34
|
model,
|
|
34
35
|
},
|
|
35
36
|
},
|