hume 0.6.1 → 0.6.2

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.
@@ -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 session settings
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 session settings
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 session settings
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 session settings
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,8 @@ 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;
13
15
  onOpen?: () => void;
14
16
  onMessage?: (message: Hume.empathicVoice.SubscribeEvent) => void;
15
17
  onError?: (error: Hume.empathicVoice.WebSocketError) => void;
@@ -57,6 +57,9 @@ 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
+ }
60
63
  const websocket = yield core.connect(`wss://api.hume.ai/v0/evi/chat?${qs_1.default.stringify(queryParams)}`);
61
64
  websocket.addEventListener("open", () => {
62
65
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hume",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "private": false,
5
5
  "repository": "https://github.com/HumeAI/hume-typescript-sdk",
6
6
  "main": "./index.js",
@@ -10,6 +10,8 @@ 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;
13
15
  onOpen?: () => void;
14
16
  onMessage?: (message: Hume.empathicVoice.SubscribeEvent) => void;
15
17
  onError?: (error: Hume.empathicVoice.WebSocketError) => void;
@@ -57,6 +57,9 @@ 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
+ }
60
63
  const websocket = yield core.connect(`wss://api.hume.ai/v0/evi/chat?${qs_1.default.stringify(queryParams)}`);
61
64
  websocket.addEventListener("open", () => {
62
65
  var _a;