@happyrobot-ai/sdk 0.1.40 → 0.1.42
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
|
@@ -14,6 +14,12 @@ export interface CreateVoiceAgentOptions {
|
|
|
14
14
|
initialMessage?: string;
|
|
15
15
|
/** Whether caller speech can interrupt the initial message. Defaults to false. */
|
|
16
16
|
initialMessageUninterruptible?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Milliseconds to wait before speaking the initial message. Defaults to 0 (no
|
|
19
|
+
* wait). If the other party speaks first, the wait ends early and the initial
|
|
20
|
+
* message becomes the agent's first turn.
|
|
21
|
+
*/
|
|
22
|
+
initialMessageDelayMs?: number;
|
|
17
23
|
/** LLM model override (TemplatedValue format). */
|
|
18
24
|
model?: {
|
|
19
25
|
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, initialMessageUninterruptible, model, publish = false, environment = "production", folderId, } = options;
|
|
21
|
+
const { name, template = "voice-agent", prompt, initialMessage, initialMessageUninterruptible, initialMessageDelayMs, 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,
|
|
@@ -31,6 +31,7 @@ async function createVoiceAgent(client, options) {
|
|
|
31
31
|
prompt_md: prompt,
|
|
32
32
|
initial_message: initialMessage,
|
|
33
33
|
initial_message_uninterruptible: initialMessageUninterruptible,
|
|
34
|
+
initial_message_delay_ms: initialMessageDelayMs,
|
|
34
35
|
model,
|
|
35
36
|
},
|
|
36
37
|
},
|
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@ export interface AuditRemarkDetail {
|
|
|
31
31
|
correction: string | null;
|
|
32
32
|
correction_reason: string | null;
|
|
33
33
|
org_id: string;
|
|
34
|
+
is_e2e_test: boolean;
|
|
34
35
|
user_feedback?: AuditRemarkUserFeedback | null;
|
|
35
36
|
}
|
|
36
37
|
/** A remark as returned by the workflow-wide listing (no use_case/node/category). */
|