hume 0.6.1 → 0.6.3
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/api/resources/empathicVoice/client/StreamSocket.d.ts +9 -1
- package/api/resources/empathicVoice/client/StreamSocket.js +17 -1
- package/dist/api/resources/empathicVoice/client/StreamSocket.d.ts +9 -1
- package/dist/api/resources/empathicVoice/client/StreamSocket.js +17 -1
- package/dist/wrapper/empathicVoice/chat/ChatClient.d.ts +4 -0
- package/dist/wrapper/empathicVoice/chat/ChatClient.js +6 -0
- package/package.json +1 -1
- package/wrapper/empathicVoice/chat/ChatClient.d.ts +4 -0
- package/wrapper/empathicVoice/chat/ChatClient.js +6 -0
|
@@ -16,9 +16,17 @@ export declare class StreamSocket {
|
|
|
16
16
|
*/
|
|
17
17
|
sendSessionSettings(message: Omit<Hume.empathicVoice.SessionSettings, "type">): Promise<void>;
|
|
18
18
|
/**
|
|
19
|
-
* Send
|
|
19
|
+
* Send assistant input
|
|
20
20
|
*/
|
|
21
21
|
sendAssistantInput(message: Omit<Hume.empathicVoice.AssistantInput, "type">): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Send pause assistant message
|
|
24
|
+
*/
|
|
25
|
+
pauseAssistant(message: Omit<Hume.empathicVoice.PauseAssistantMessage, "type">): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Send resume assistant message
|
|
28
|
+
*/
|
|
29
|
+
resumeAssistant(message: Omit<Hume.empathicVoice.ResumeAssistantMessage, "type">): Promise<void>;
|
|
22
30
|
/**
|
|
23
31
|
* Send text input
|
|
24
32
|
*/
|
|
@@ -55,13 +55,29 @@ class StreamSocket {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Send
|
|
58
|
+
* Send assistant input
|
|
59
59
|
*/
|
|
60
60
|
sendAssistantInput(message) {
|
|
61
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
yield this.sendJson(Object.assign({ type: "assistant_input" }, message));
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Send pause assistant message
|
|
67
|
+
*/
|
|
68
|
+
pauseAssistant(message) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
yield this.sendJson(Object.assign({ type: "pause_assistant_message" }, message));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Send resume assistant message
|
|
75
|
+
*/
|
|
76
|
+
resumeAssistant(message) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
yield this.sendJson(Object.assign({ type: "resume_assistant_message" }, message));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
65
81
|
/**
|
|
66
82
|
* Send text input
|
|
67
83
|
*/
|
|
@@ -16,9 +16,17 @@ export declare class StreamSocket {
|
|
|
16
16
|
*/
|
|
17
17
|
sendSessionSettings(message: Omit<Hume.empathicVoice.SessionSettings, "type">): Promise<void>;
|
|
18
18
|
/**
|
|
19
|
-
* Send
|
|
19
|
+
* Send assistant input
|
|
20
20
|
*/
|
|
21
21
|
sendAssistantInput(message: Omit<Hume.empathicVoice.AssistantInput, "type">): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Send pause assistant message
|
|
24
|
+
*/
|
|
25
|
+
pauseAssistant(message: Omit<Hume.empathicVoice.PauseAssistantMessage, "type">): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Send resume assistant message
|
|
28
|
+
*/
|
|
29
|
+
resumeAssistant(message: Omit<Hume.empathicVoice.ResumeAssistantMessage, "type">): Promise<void>;
|
|
22
30
|
/**
|
|
23
31
|
* Send text input
|
|
24
32
|
*/
|
|
@@ -55,13 +55,29 @@ class StreamSocket {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Send
|
|
58
|
+
* Send assistant input
|
|
59
59
|
*/
|
|
60
60
|
sendAssistantInput(message) {
|
|
61
61
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
yield this.sendJson(Object.assign({ type: "assistant_input" }, message));
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Send pause assistant message
|
|
67
|
+
*/
|
|
68
|
+
pauseAssistant(message) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
yield this.sendJson(Object.assign({ type: "pause_assistant_message" }, message));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Send resume assistant message
|
|
75
|
+
*/
|
|
76
|
+
resumeAssistant(message) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
yield this.sendJson(Object.assign({ type: "resume_assistant_message" }, message));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
65
81
|
/**
|
|
66
82
|
* Send text input
|
|
67
83
|
*/
|
|
@@ -10,6 +10,10 @@ export declare namespace ChatClient {
|
|
|
10
10
|
configId?: string;
|
|
11
11
|
/** The version of the configuration. */
|
|
12
12
|
configVersion?: string;
|
|
13
|
+
/** The ID of a chat group, used to resume a previous chat. */
|
|
14
|
+
resumedChatGroupId?: string;
|
|
15
|
+
/** List chats in ascending order. */
|
|
16
|
+
ascendingOrder?: boolean;
|
|
13
17
|
onOpen?: () => void;
|
|
14
18
|
onMessage?: (message: Hume.empathicVoice.SubscribeEvent) => void;
|
|
15
19
|
onError?: (error: Hume.empathicVoice.WebSocketError) => void;
|
|
@@ -57,6 +57,12 @@ class ChatClient {
|
|
|
57
57
|
if (args.configVersion != null) {
|
|
58
58
|
queryParams["config_version"] = args.configVersion;
|
|
59
59
|
}
|
|
60
|
+
if (args.resumedChatGroupId != null) {
|
|
61
|
+
queryParams["resumed_chat_group_id"] = args.resumedChatGroupId;
|
|
62
|
+
}
|
|
63
|
+
if (args.ascendingOrder != null) {
|
|
64
|
+
queryParams["ascending_order"] = args.ascendingOrder.toString();
|
|
65
|
+
}
|
|
60
66
|
const websocket = yield core.connect(`wss://api.hume.ai/v0/evi/chat?${qs_1.default.stringify(queryParams)}`);
|
|
61
67
|
websocket.addEventListener("open", () => {
|
|
62
68
|
var _a;
|
package/package.json
CHANGED
|
@@ -10,6 +10,10 @@ export declare namespace ChatClient {
|
|
|
10
10
|
configId?: string;
|
|
11
11
|
/** The version of the configuration. */
|
|
12
12
|
configVersion?: string;
|
|
13
|
+
/** The ID of a chat group, used to resume a previous chat. */
|
|
14
|
+
resumedChatGroupId?: string;
|
|
15
|
+
/** List chats in ascending order. */
|
|
16
|
+
ascendingOrder?: boolean;
|
|
13
17
|
onOpen?: () => void;
|
|
14
18
|
onMessage?: (message: Hume.empathicVoice.SubscribeEvent) => void;
|
|
15
19
|
onError?: (error: Hume.empathicVoice.WebSocketError) => void;
|
|
@@ -57,6 +57,12 @@ class ChatClient {
|
|
|
57
57
|
if (args.configVersion != null) {
|
|
58
58
|
queryParams["config_version"] = args.configVersion;
|
|
59
59
|
}
|
|
60
|
+
if (args.resumedChatGroupId != null) {
|
|
61
|
+
queryParams["resumed_chat_group_id"] = args.resumedChatGroupId;
|
|
62
|
+
}
|
|
63
|
+
if (args.ascendingOrder != null) {
|
|
64
|
+
queryParams["ascending_order"] = args.ascendingOrder.toString();
|
|
65
|
+
}
|
|
60
66
|
const websocket = yield core.connect(`wss://api.hume.ai/v0/evi/chat?${qs_1.default.stringify(queryParams)}`);
|
|
61
67
|
websocket.addEventListener("open", () => {
|
|
62
68
|
var _a;
|