hume 0.6.3 → 0.7.0
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 +9 -2
- 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/README.md +30 -25
- 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/dist/wrapper/HumeClient.d.ts +1 -1
- package/dist/wrapper/empathicVoice/EmpathicVoiceClient.d.ts +1 -1
- package/dist/wrapper/empathicVoice/chat/ChatClient.d.ts +1 -3
- package/dist/wrapper/empathicVoice/chat/ChatClient.js +2 -5
- 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
- package/wrapper/HumeClient.d.ts +1 -1
- package/wrapper/empathicVoice/EmpathicVoiceClient.d.ts +1 -1
- package/wrapper/empathicVoice/chat/ChatClient.d.ts +1 -3
- package/wrapper/empathicVoice/chat/ChatClient.js +2 -5
package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts
CHANGED
|
@@ -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/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
|
});
|
package/wrapper/HumeClient.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { EmpathicVoice } from "./empathicVoice/EmpathicVoiceClient";
|
|
|
3
3
|
import { ExpressionMeasurement } from "./expressionMeasurement/ExpressionMeasurementClient";
|
|
4
4
|
export declare namespace HumeClient {
|
|
5
5
|
interface Options extends FernClient.Options {
|
|
6
|
-
|
|
6
|
+
secretKey?: string;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
export declare class HumeClient extends FernClient {
|
|
@@ -2,7 +2,7 @@ import { EmpathicVoice as FernClient } from "../../api/resources/empathicVoice/c
|
|
|
2
2
|
import { ChatClient } from "./chat/ChatClient";
|
|
3
3
|
export declare namespace EmpathicVoice {
|
|
4
4
|
interface Options extends FernClient.Options {
|
|
5
|
-
|
|
5
|
+
secretKey?: string;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
export declare class EmpathicVoice extends FernClient {
|
|
@@ -3,7 +3,7 @@ import * as core from "../../../core";
|
|
|
3
3
|
export declare namespace ChatClient {
|
|
4
4
|
interface Options {
|
|
5
5
|
apiKey?: core.Supplier<string | undefined>;
|
|
6
|
-
|
|
6
|
+
secretKey?: core.Supplier<string | undefined>;
|
|
7
7
|
}
|
|
8
8
|
interface ConnectArgs {
|
|
9
9
|
/** The ID of the configuration. */
|
|
@@ -12,8 +12,6 @@ export declare namespace ChatClient {
|
|
|
12
12
|
configVersion?: string;
|
|
13
13
|
/** The ID of a chat group, used to resume a previous chat. */
|
|
14
14
|
resumedChatGroupId?: string;
|
|
15
|
-
/** List chats in ascending order. */
|
|
16
|
-
ascendingOrder?: boolean;
|
|
17
15
|
onOpen?: () => void;
|
|
18
16
|
onMessage?: (message: Hume.empathicVoice.SubscribeEvent) => void;
|
|
19
17
|
onError?: (error: Hume.empathicVoice.WebSocketError) => void;
|
|
@@ -60,9 +60,6 @@ class ChatClient {
|
|
|
60
60
|
if (args.resumedChatGroupId != null) {
|
|
61
61
|
queryParams["resumed_chat_group_id"] = args.resumedChatGroupId;
|
|
62
62
|
}
|
|
63
|
-
if (args.ascendingOrder != null) {
|
|
64
|
-
queryParams["ascending_order"] = args.ascendingOrder.toString();
|
|
65
|
-
}
|
|
66
63
|
const websocket = yield core.connect(`wss://api.hume.ai/v0/evi/chat?${qs_1.default.stringify(queryParams)}`);
|
|
67
64
|
websocket.addEventListener("open", () => {
|
|
68
65
|
var _a;
|
|
@@ -95,8 +92,8 @@ class ChatClient {
|
|
|
95
92
|
fetchAccessToken() {
|
|
96
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
94
|
const apiKey = yield core.Supplier.get(this._options.apiKey);
|
|
98
|
-
const
|
|
99
|
-
const authString = `${apiKey}:${
|
|
95
|
+
const secretKey = yield core.Supplier.get(this._options.secretKey);
|
|
96
|
+
const authString = `${apiKey}:${secretKey}`;
|
|
100
97
|
const encoded = (0, base64Encode_1.base64Encode)(authString);
|
|
101
98
|
const response = yield core.fetcher({
|
|
102
99
|
url: "https://api.hume.ai/oauth2-cc/token",
|