hume 0.6.2 → 0.6.4

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.
Files changed (93) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +130 -38
  2. package/.mock/definition/empathic-voice/chat.yml +1 -1
  3. package/.mock/definition/empathic-voice/chatGroups.yml +2 -2
  4. package/.mock/definition/empathic-voice/chats.yml +5 -2
  5. package/.mock/definition/empathic-voice/configs.yml +93 -77
  6. package/.mock/definition/empathic-voice/prompts.yml +9 -9
  7. package/.mock/definition/empathic-voice/tools.yml +9 -9
  8. package/.mock/definition/expression-measurement/batch.yml +0 -15
  9. package/.mock/fern.config.json +1 -1
  10. package/api/resources/customModels/resources/datasets/client/Client.js +9 -9
  11. package/api/resources/customModels/resources/files/client/Client.js +7 -7
  12. package/api/resources/customModels/resources/jobs/client/Client.js +2 -2
  13. package/api/resources/customModels/resources/models/client/Client.js +6 -6
  14. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +2 -2
  15. package/api/resources/empathicVoice/resources/chats/client/Client.js +6 -3
  16. package/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +4 -0
  17. package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  18. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -4
  19. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -4
  20. package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  21. package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  22. package/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
  23. package/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -0
  24. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -0
  25. package/api/resources/empathicVoice/types/AudioInput.d.ts +1 -0
  26. package/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
  27. package/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -0
  28. package/api/resources/empathicVoice/types/ChatMetadata.d.ts +1 -0
  29. package/api/resources/empathicVoice/types/Inference.d.ts +1 -0
  30. package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -0
  31. package/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -0
  32. package/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -4
  33. package/api/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
  34. package/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +1 -1
  35. package/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -0
  36. package/api/resources/empathicVoice/types/Tool.d.ts +2 -0
  37. package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -0
  38. package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +5 -0
  39. package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +1 -0
  40. package/api/resources/empathicVoice/types/UserInput.d.ts +1 -0
  41. package/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
  42. package/api/resources/empathicVoice/types/UserMessage.d.ts +1 -0
  43. package/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -0
  44. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  45. package/dist/api/resources/customModels/resources/datasets/client/Client.js +9 -9
  46. package/dist/api/resources/customModels/resources/files/client/Client.js +7 -7
  47. package/dist/api/resources/customModels/resources/jobs/client/Client.js +2 -2
  48. package/dist/api/resources/customModels/resources/models/client/Client.js +6 -6
  49. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +2 -2
  50. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +6 -3
  51. package/dist/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +4 -0
  52. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  53. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -4
  54. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -4
  55. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  56. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  57. package/dist/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
  58. package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -0
  59. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -0
  60. package/dist/api/resources/empathicVoice/types/AudioInput.d.ts +1 -0
  61. package/dist/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
  62. package/dist/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -0
  63. package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +1 -0
  64. package/dist/api/resources/empathicVoice/types/Inference.d.ts +1 -0
  65. package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -0
  66. package/dist/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -0
  67. package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -4
  68. package/dist/api/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
  69. package/dist/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +1 -1
  70. package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -0
  71. package/dist/api/resources/empathicVoice/types/Tool.d.ts +2 -0
  72. package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -0
  73. package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +5 -0
  74. package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +1 -0
  75. package/dist/api/resources/empathicVoice/types/UserInput.d.ts +1 -0
  76. package/dist/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
  77. package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +1 -0
  78. package/dist/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -0
  79. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  80. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -2
  81. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -2
  82. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -2
  83. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -2
  84. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
  85. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -2
  86. package/package.json +1 -1
  87. package/reference.md +4893 -0
  88. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -2
  89. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -2
  90. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -2
  91. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -2
  92. package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
  93. package/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -2
@@ -75,7 +75,7 @@ class Tools {
75
75
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
76
76
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/tools"),
77
77
  method: "GET",
78
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
79
79
  contentType: "application/json",
80
80
  queryParameters: _queryParams,
81
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -131,7 +131,7 @@ class Tools {
131
131
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
132
132
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/tools"),
133
133
  method: "POST",
134
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
134
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
135
135
  contentType: "application/json",
136
136
  body: yield serializers.empathicVoice.PostedUserDefinedTool.jsonOrThrow(request, {
137
137
  unrecognizedObjectKeys: "strip",
@@ -195,7 +195,7 @@ class Tools {
195
195
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
196
196
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
197
197
  method: "GET",
198
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
198
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
199
199
  contentType: "application/json",
200
200
  queryParameters: _queryParams,
201
201
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -251,7 +251,7 @@ class Tools {
251
251
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
252
252
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
253
253
  method: "POST",
254
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
254
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
255
255
  contentType: "application/json",
256
256
  body: yield serializers.empathicVoice.PostedUserDefinedToolVersion.jsonOrThrow(request, {
257
257
  unrecognizedObjectKeys: "strip",
@@ -303,7 +303,7 @@ class Tools {
303
303
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
304
304
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
305
305
  method: "DELETE",
306
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
306
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
307
307
  contentType: "application/json",
308
308
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
309
309
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -349,7 +349,7 @@ class Tools {
349
349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
350
350
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
351
351
  method: "PATCH",
352
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
352
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
353
353
  contentType: "application/json",
354
354
  body: yield serializers.empathicVoice.PostedUserDefinedToolName.jsonOrThrow(request, {
355
355
  unrecognizedObjectKeys: "strip",
@@ -397,7 +397,7 @@ class Tools {
397
397
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
398
398
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
399
399
  method: "GET",
400
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
400
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
401
401
  contentType: "application/json",
402
402
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
403
403
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -447,7 +447,7 @@ class Tools {
447
447
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
448
448
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
449
449
  method: "DELETE",
450
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
450
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
451
451
  contentType: "application/json",
452
452
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
453
453
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -494,7 +494,7 @@ class Tools {
494
494
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
495
495
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
496
496
  method: "PATCH",
497
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
497
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
498
498
  contentType: "application/json",
499
499
  body: yield serializers.empathicVoice.PostedUserDefinedToolVersionDescription.jsonOrThrow(request, {
500
500
  unrecognizedObjectKeys: "strip",
@@ -5,6 +5,7 @@
5
5
  * When provided, the output is an assistant end message.
6
6
  */
7
7
  export interface AssistantEnd {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** The type of message sent through the socket; for an Assistant End message, this must be 'assistant_end'. */
10
11
  type: "assistant_end";
@@ -5,6 +5,7 @@
5
5
  * When provided, the input is spoken by EVI.
6
6
  */
7
7
  export interface AssistantInput {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** Text to be synthesized. */
10
11
  text: string;
@@ -6,6 +6,7 @@ import * as Hume from "../../../index";
6
6
  * When provided, the output is an assistant message.
7
7
  */
8
8
  export interface AssistantMessage {
9
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
9
10
  customSessionId?: string;
10
11
  /** Indicates if this message was constructed from a text input message. */
11
12
  fromText: boolean;
@@ -5,6 +5,7 @@
5
5
  * When provided, the input is audio.
6
6
  */
7
7
  export interface AudioInput {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** Base64 encoded audio input. */
10
11
  data: string;
@@ -5,6 +5,7 @@
5
5
  * When provided, the output is audio.
6
6
  */
7
7
  export interface AudioOutput {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** Base64 encoded audio output. */
10
11
  data: string;
@@ -3,9 +3,11 @@
3
3
  */
4
4
  import * as Hume from "../../../index";
5
5
  export interface ChatMessage {
6
+ /** Transcript of the message. */
6
7
  content?: string;
7
8
  /** Role of who is providing the message. */
8
9
  role: Hume.empathicVoice.Role;
10
+ /** Function call name and arguments. */
9
11
  toolCall?: Hume.empathicVoice.ToolCallMessage;
10
12
  /** Function call response from client. */
11
13
  toolResult?: Hume.empathicVoice.ChatMessageToolResult;
@@ -9,6 +9,7 @@ export interface ChatMetadata {
9
9
  chatGroupId: string;
10
10
  /** ID of the chat. */
11
11
  chatId: string;
12
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
12
13
  customSessionId?: string;
13
14
  /** The type of message sent through the socket; for a Chat Metadata message, this must be 'chat_metadata'. */
14
15
  type: "chat_metadata";
@@ -3,5 +3,6 @@
3
3
  */
4
4
  import * as Hume from "../../../index";
5
5
  export interface Inference {
6
+ /** Prosody model inference results. */
6
7
  prosody?: Hume.empathicVoice.ProsodyInference;
7
8
  }
@@ -5,6 +5,7 @@
5
5
  * Pause responses from EVI. Chat history is still saved and sent after resuming.
6
6
  */
7
7
  export interface PauseAssistantMessage {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** The type of message sent through the socket; for a Pause Assistant message, this must be 'pause_assistant_message'. */
10
11
  type?: "pause_assistant_message";
@@ -5,6 +5,7 @@
5
5
  * Resume responses from EVI. Chat history sent while paused will now be sent.
6
6
  */
7
7
  export interface ResumeAssistantMessage {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** The type of message sent through the socket; for a Resume Assistant message, this must be 'resume_assistant_message'. */
10
11
  type?: "resume_assistant_message";
@@ -21,8 +21,6 @@ export interface ReturnConfig {
21
21
  prompt?: Hume.empathicVoice.ReturnPrompt;
22
22
  voice?: Hume.empathicVoice.ReturnVoice;
23
23
  languageModel?: Hume.empathicVoice.ReturnLanguageModel;
24
- /** List of user-defined tools associated with this config. */
25
- tools?: (Hume.empathicVoice.ReturnUserDefinedTool | undefined)[];
26
- /** List of built-in tools associated with this config */
27
- builtinTools?: (Hume.empathicVoice.ReturnBuiltinTool | undefined)[];
24
+ tools?: Hume.empathicVoice.ReturnUserDefinedTool;
25
+ builtinTools?: Hume.empathicVoice.ReturnBuiltinTool;
28
26
  }
@@ -9,7 +9,7 @@ export interface ReturnPrompt {
9
9
  id: string;
10
10
  /** Version number for a Prompt. Version numbers should be integers. The combination of configId and version number is unique. */
11
11
  version: number;
12
- /** Inidicates whether this prompt is using a fixed version number or auto-updating to the latest version. Values from the VersionType enum. */
12
+ /** Indicates whether this prompt is using a fixed version number or auto-updating to the latest version. Values from the VersionType enum. */
13
13
  versionType: string;
14
14
  /** Description that is appended to a specific version of a Prompt. */
15
15
  versionDescription?: string;
@@ -11,7 +11,7 @@ export interface ReturnUserDefinedTool {
11
11
  id: string;
12
12
  /** Version number for a Tool. Version numbers should be integers. The combination of configId and version number is unique. */
13
13
  version: number;
14
- /** Inidicates whether this tool is using a fixed version number or auto-updating to the latest version. Values from the VersionType enum. */
14
+ /** Indicates whether this tool is using a fixed version number or auto-updating to the latest version. Values from the VersionType enum. */
15
15
  versionType: string;
16
16
  /** Description that is appended to a specific version of a Tool. */
17
17
  versionDescription?: string;
@@ -6,11 +6,17 @@ import * as Hume from "../../../index";
6
6
  * Settings for this chat session.
7
7
  */
8
8
  export interface SessionSettings {
9
+ /** Audio configuration. */
9
10
  audio?: Hume.empathicVoice.AudioConfiguration;
11
+ /** List of builtin tools to enable. */
10
12
  builtinTools?: Hume.empathicVoice.BuiltinToolConfig[];
13
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
11
14
  customSessionId?: string;
15
+ /** Third party API key for the language model used for non-Hume models. */
12
16
  languageModelApiKey?: string;
17
+ /** Instructions for how the system should respond to the user. Set to null to use the default system prompt. */
13
18
  systemPrompt?: string;
19
+ /** List of tools to enable. */
14
20
  tools?: Hume.empathicVoice.Tool[];
15
21
  /** The type of message sent through the socket; for a Session Settings message, this must be 'session_settings'. */
16
22
  type: "session_settings";
@@ -3,7 +3,9 @@
3
3
  */
4
4
  import * as Hume from "../../../index";
5
5
  export interface Tool {
6
+ /** Description of the function. */
6
7
  description?: string;
8
+ /** Fallback content of the tool, passed to the LLM if the function call response fails. */
7
9
  fallbackContent?: string;
8
10
  /** Name of the tool. */
9
11
  name: string;
@@ -6,6 +6,7 @@ import * as Hume from "../../../index";
6
6
  * When provided, the output is a tool call.
7
7
  */
8
8
  export interface ToolCallMessage {
9
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
9
10
  customSessionId?: string;
10
11
  /** Name of the tool called. */
11
12
  name: string;
@@ -6,14 +6,19 @@ import * as Hume from "../../../index";
6
6
  * When provided, the output is a function call error.
7
7
  */
8
8
  export interface ToolErrorMessage {
9
+ /** Error code. */
9
10
  code?: string;
11
+ /** The content passed to the LLM in place of the tool response. */
10
12
  content?: string;
13
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
11
14
  customSessionId?: string;
12
15
  /** Error message from the tool call, not exposed to the LLM or user. */
13
16
  error: string;
17
+ /** Error level. */
14
18
  level?: Hume.empathicVoice.ErrorLevel;
15
19
  /** ID of the tool call. */
16
20
  toolCallId: string;
21
+ /** Type of tool called, either 'builtin' or 'function'. */
17
22
  toolType?: Hume.empathicVoice.ToolType;
18
23
  /** The type of message sent through the socket; for a Tool Error message, this must be 'tool_error'. */
19
24
  type?: "tool_error";
@@ -8,6 +8,7 @@ import * as Hume from "../../../index";
8
8
  export interface ToolResponseMessage {
9
9
  /** Return value of the tool call. */
10
10
  content: string;
11
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
11
12
  customSessionId?: string;
12
13
  /** ID of the tool call. */
13
14
  toolCallId: string;
@@ -5,6 +5,7 @@
5
5
  * User text to insert into the conversation.
6
6
  */
7
7
  export interface UserInput {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** User text to insert into the conversation. */
10
11
  text: string;
@@ -5,6 +5,7 @@
5
5
  * When provided, the output is an interruption.
6
6
  */
7
7
  export interface UserInterruption {
8
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
9
  customSessionId?: string;
9
10
  /** Unix timestamp of the detected user interruption. */
10
11
  time: number;
@@ -6,6 +6,7 @@ import * as Hume from "../../../index";
6
6
  * When provided, the output is a user message.
7
7
  */
8
8
  export interface UserMessage {
9
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
9
10
  customSessionId?: string;
10
11
  /** Indicates if this message was constructed from a text input message. */
11
12
  fromText: boolean;
@@ -7,6 +7,7 @@
7
7
  export interface WebSocketError {
8
8
  /** Error code. */
9
9
  code: string;
10
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
10
11
  customSessionId?: string;
11
12
  /** Error message. */
12
13
  message: string;
@@ -96,7 +96,7 @@ class Batch {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs"),
98
98
  method: "GET",
99
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
99
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -151,7 +151,7 @@ class Batch {
151
151
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
152
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs"),
153
153
  method: "POST",
154
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
154
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
155
155
  contentType: "application/json",
156
156
  body: yield serializers.expressionMeasurement.InferenceBaseRequest.jsonOrThrow(request, {
157
157
  unrecognizedObjectKeys: "strip",
@@ -205,7 +205,7 @@ class Batch {
205
205
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
206
206
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/batch/jobs/${encodeURIComponent(id)}`),
207
207
  method: "GET",
208
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
208
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
209
209
  contentType: "application/json",
210
210
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
211
211
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -256,7 +256,7 @@ class Batch {
256
256
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
257
257
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/batch/jobs/${encodeURIComponent(id)}/predictions`),
258
258
  method: "GET",
259
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
259
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
260
260
  contentType: "application/json",
261
261
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
262
262
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -301,7 +301,7 @@ class Batch {
301
301
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
302
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/batch/jobs/${encodeURIComponent(id)}/artifacts`),
303
303
  method: "GET",
304
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
304
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
305
305
  contentType: "application/json",
306
306
  responseType: "streaming",
307
307
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -356,7 +356,7 @@ class Batch {
356
356
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
357
357
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs"),
358
358
  method: "POST",
359
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), (yield _maybeEncodedRequest.getHeaders())),
359
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), (yield _maybeEncodedRequest.getHeaders())),
360
360
  body: yield _maybeEncodedRequest.getBody(),
361
361
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
362
362
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -17,7 +17,7 @@ export declare namespace PostedConfig {
17
17
  prompt?: PostedPromptSpec.Raw | null;
18
18
  voice?: PostedVoice.Raw | null;
19
19
  language_model?: PostedLanguageModel.Raw | null;
20
- tools?: (PostedUserDefinedToolSpec.Raw | null | undefined)[] | null;
21
- builtin_tools?: (PostedBuiltinTool.Raw | null | undefined)[] | null;
20
+ tools?: PostedUserDefinedToolSpec.Raw | null;
21
+ builtin_tools?: PostedBuiltinTool.Raw | null;
22
22
  }
23
23
  }
@@ -39,6 +39,6 @@ exports.PostedConfig = core.serialization.object({
39
39
  prompt: PostedPromptSpec_1.PostedPromptSpec.optional(),
40
40
  voice: PostedVoice_1.PostedVoice.optional(),
41
41
  languageModel: core.serialization.property("language_model", PostedLanguageModel_1.PostedLanguageModel.optional()),
42
- tools: core.serialization.list(PostedUserDefinedToolSpec_1.PostedUserDefinedToolSpec.optional()).optional(),
43
- builtinTools: core.serialization.property("builtin_tools", core.serialization.list(PostedBuiltinTool_1.PostedBuiltinTool.optional()).optional()),
42
+ tools: PostedUserDefinedToolSpec_1.PostedUserDefinedToolSpec.optional(),
43
+ builtinTools: core.serialization.property("builtin_tools", PostedBuiltinTool_1.PostedBuiltinTool.optional()),
44
44
  });
@@ -16,7 +16,7 @@ export declare namespace PostedConfigVersion {
16
16
  prompt?: PostedPromptSpec.Raw | null;
17
17
  voice?: PostedVoice.Raw | null;
18
18
  language_model?: PostedLanguageModel.Raw | null;
19
- tools?: (PostedUserDefinedToolSpec.Raw | null | undefined)[] | null;
20
- builtin_tools?: (PostedBuiltinTool.Raw | null | undefined)[] | null;
19
+ tools?: PostedUserDefinedToolSpec.Raw | null;
20
+ builtin_tools?: PostedBuiltinTool.Raw | null;
21
21
  }
22
22
  }
@@ -38,6 +38,6 @@ exports.PostedConfigVersion = core.serialization.object({
38
38
  prompt: PostedPromptSpec_1.PostedPromptSpec.optional(),
39
39
  voice: PostedVoice_1.PostedVoice.optional(),
40
40
  languageModel: core.serialization.property("language_model", PostedLanguageModel_1.PostedLanguageModel.optional()),
41
- tools: core.serialization.list(PostedUserDefinedToolSpec_1.PostedUserDefinedToolSpec.optional()).optional(),
42
- builtinTools: core.serialization.property("builtin_tools", core.serialization.list(PostedBuiltinTool_1.PostedBuiltinTool.optional()).optional()),
41
+ tools: PostedUserDefinedToolSpec_1.PostedUserDefinedToolSpec.optional(),
42
+ builtinTools: core.serialization.property("builtin_tools", PostedBuiltinTool_1.PostedBuiltinTool.optional()),
43
43
  });
@@ -21,7 +21,7 @@ export declare namespace ReturnConfig {
21
21
  prompt?: ReturnPrompt.Raw | null;
22
22
  voice?: ReturnVoice.Raw | null;
23
23
  language_model?: ReturnLanguageModel.Raw | null;
24
- tools?: (ReturnUserDefinedTool.Raw | null | undefined)[] | null;
25
- builtin_tools?: (ReturnBuiltinTool.Raw | null | undefined)[] | null;
24
+ tools?: ReturnUserDefinedTool.Raw | null;
25
+ builtin_tools?: ReturnBuiltinTool.Raw | null;
26
26
  }
27
27
  }
@@ -43,6 +43,6 @@ exports.ReturnConfig = core.serialization.object({
43
43
  prompt: ReturnPrompt_1.ReturnPrompt.optional(),
44
44
  voice: ReturnVoice_1.ReturnVoice.optional(),
45
45
  languageModel: core.serialization.property("language_model", ReturnLanguageModel_1.ReturnLanguageModel.optional()),
46
- tools: core.serialization.list(ReturnUserDefinedTool_1.ReturnUserDefinedTool.optional()).optional(),
47
- builtinTools: core.serialization.property("builtin_tools", core.serialization.list(ReturnBuiltinTool_1.ReturnBuiltinTool.optional()).optional()),
46
+ tools: ReturnUserDefinedTool_1.ReturnUserDefinedTool.optional(),
47
+ builtinTools: core.serialization.property("builtin_tools", ReturnBuiltinTool_1.ReturnBuiltinTool.optional()),
48
48
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hume",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "private": false,
5
5
  "repository": "https://github.com/HumeAI/hume-typescript-sdk",
6
6
  "main": "./index.js",