@happyrobot-ai/sdk 0.1.41 → 0.1.43
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
|
@@ -20,11 +20,11 @@ export declare class AuditRemarksResource {
|
|
|
20
20
|
* Cursor-paginated; optionally filter by northstar, grade, or status.
|
|
21
21
|
*/
|
|
22
22
|
listByWorkflow(workflowId: string, query?: ListWorkflowAuditRemarksQuery): Promise<ListWorkflowAuditRemarksResponse>;
|
|
23
|
-
/** Get the current
|
|
23
|
+
/** Get the current caller's feedback for an audit remark, or null if none exists. */
|
|
24
24
|
getFeedback(auditRemarkId: string): Promise<AuditRemarkFeedback | null>;
|
|
25
25
|
/** Submit a thumbs up/down for an audit remark. */
|
|
26
26
|
submitFeedback(auditRemarkId: string, body: SubmitAuditRemarkFeedbackBody): Promise<AuditRemarkFeedback>;
|
|
27
|
-
/** Delete the current
|
|
27
|
+
/** Delete the current caller's feedback for an audit remark. */
|
|
28
28
|
deleteFeedback(auditRemarkId: string): Promise<{
|
|
29
29
|
success: true;
|
|
30
30
|
}>;
|
|
@@ -34,7 +34,7 @@ class AuditRemarksResource {
|
|
|
34
34
|
query: query,
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
/** Get the current
|
|
37
|
+
/** Get the current caller's feedback for an audit remark, or null if none exists. */
|
|
38
38
|
async getFeedback(auditRemarkId) {
|
|
39
39
|
return this.http.request({
|
|
40
40
|
method: "GET",
|
|
@@ -49,7 +49,7 @@ class AuditRemarksResource {
|
|
|
49
49
|
body,
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
/** Delete the current
|
|
52
|
+
/** Delete the current caller's feedback for an audit remark. */
|
|
53
53
|
async deleteFeedback(auditRemarkId) {
|
|
54
54
|
return this.http.request({
|
|
55
55
|
method: "DELETE",
|
|
@@ -72,7 +72,8 @@ export interface AuditRemarkFeedback {
|
|
|
72
72
|
comment: string | null;
|
|
73
73
|
audit_remark_id: string;
|
|
74
74
|
northstar_id: string;
|
|
75
|
-
created_by: string;
|
|
75
|
+
created_by: string | null;
|
|
76
|
+
created_by_api_key: string | null;
|
|
76
77
|
created_at: string;
|
|
77
78
|
}
|
|
78
79
|
export interface SubmitAuditRemarkFeedbackBody {
|