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.
- package/.mock/definition/empathic-voice/__package__.yml +130 -38
- package/.mock/definition/empathic-voice/chat.yml +1 -1
- package/.mock/definition/empathic-voice/chatGroups.yml +2 -2
- package/.mock/definition/empathic-voice/chats.yml +5 -2
- package/.mock/definition/empathic-voice/configs.yml +93 -77
- package/.mock/definition/empathic-voice/prompts.yml +9 -9
- package/.mock/definition/empathic-voice/tools.yml +9 -9
- package/.mock/definition/expression-measurement/batch.yml +0 -15
- package/.mock/fern.config.json +1 -1
- package/api/resources/customModels/resources/datasets/client/Client.js +9 -9
- package/api/resources/customModels/resources/files/client/Client.js +7 -7
- package/api/resources/customModels/resources/jobs/client/Client.js +2 -2
- package/api/resources/customModels/resources/models/client/Client.js +6 -6
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +2 -2
- package/api/resources/empathicVoice/resources/chats/client/Client.js +6 -3
- package/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +4 -0
- package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -4
- package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -4
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
- package/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -0
- package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -0
- package/api/resources/empathicVoice/types/AudioInput.d.ts +1 -0
- package/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
- package/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -0
- package/api/resources/empathicVoice/types/ChatMetadata.d.ts +1 -0
- package/api/resources/empathicVoice/types/Inference.d.ts +1 -0
- package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -0
- package/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -0
- package/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -4
- package/api/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
- package/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +1 -1
- package/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -0
- package/api/resources/empathicVoice/types/Tool.d.ts +2 -0
- package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -0
- package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +5 -0
- package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +1 -0
- package/api/resources/empathicVoice/types/UserInput.d.ts +1 -0
- package/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
- package/api/resources/empathicVoice/types/UserMessage.d.ts +1 -0
- package/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/dist/api/resources/customModels/resources/datasets/client/Client.js +9 -9
- package/dist/api/resources/customModels/resources/files/client/Client.js +7 -7
- package/dist/api/resources/customModels/resources/jobs/client/Client.js +2 -2
- package/dist/api/resources/customModels/resources/models/client/Client.js +6 -6
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +2 -2
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +6 -3
- package/dist/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +4 -0
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -4
- package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -4
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
- package/dist/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/AudioInput.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -0
- package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/Inference.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -4
- package/dist/api/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -0
- package/dist/api/resources/empathicVoice/types/Tool.d.ts +2 -0
- package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +5 -0
- package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/UserInput.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +1 -0
- package/dist/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
- package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -2
- package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -2
- package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
- package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -2
- package/package.json +1 -1
- package/reference.md +4893 -0
- package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -2
- package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -2
- package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -2
- package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -2
- package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
- 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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";
|
|
@@ -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
|
-
|
|
25
|
-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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?:
|
|
21
|
-
builtin_tools?:
|
|
20
|
+
tools?: PostedUserDefinedToolSpec.Raw | null;
|
|
21
|
+
builtin_tools?: PostedBuiltinTool.Raw | null;
|
|
22
22
|
}
|
|
23
23
|
}
|
package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js
CHANGED
|
@@ -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:
|
|
43
|
-
builtinTools: core.serialization.property("builtin_tools",
|
|
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?:
|
|
20
|
-
builtin_tools?:
|
|
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:
|
|
42
|
-
builtinTools: core.serialization.property("builtin_tools",
|
|
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?:
|
|
25
|
-
builtin_tools?:
|
|
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:
|
|
47
|
-
builtinTools: core.serialization.property("builtin_tools",
|
|
46
|
+
tools: ReturnUserDefinedTool_1.ReturnUserDefinedTool.optional(),
|
|
47
|
+
builtinTools: core.serialization.property("builtin_tools", ReturnBuiltinTool_1.ReturnBuiltinTool.optional()),
|
|
48
48
|
});
|