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.
Files changed (102) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +130 -38
  2. package/.mock/definition/empathic-voice/chat.yml +9 -2
  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/README.md +30 -25
  11. package/api/resources/customModels/resources/datasets/client/Client.js +9 -9
  12. package/api/resources/customModels/resources/files/client/Client.js +7 -7
  13. package/api/resources/customModels/resources/jobs/client/Client.js +2 -2
  14. package/api/resources/customModels/resources/models/client/Client.js +6 -6
  15. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +2 -2
  16. package/api/resources/empathicVoice/resources/chats/client/Client.js +6 -3
  17. package/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +4 -0
  18. package/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  19. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -4
  20. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -4
  21. package/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  22. package/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  23. package/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
  24. package/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -0
  25. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -0
  26. package/api/resources/empathicVoice/types/AudioInput.d.ts +1 -0
  27. package/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
  28. package/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -0
  29. package/api/resources/empathicVoice/types/ChatMetadata.d.ts +1 -0
  30. package/api/resources/empathicVoice/types/Inference.d.ts +1 -0
  31. package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -0
  32. package/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -0
  33. package/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -4
  34. package/api/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
  35. package/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +1 -1
  36. package/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -0
  37. package/api/resources/empathicVoice/types/Tool.d.ts +2 -0
  38. package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -0
  39. package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +5 -0
  40. package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +1 -0
  41. package/api/resources/empathicVoice/types/UserInput.d.ts +1 -0
  42. package/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
  43. package/api/resources/empathicVoice/types/UserMessage.d.ts +1 -0
  44. package/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -0
  45. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  46. package/dist/api/resources/customModels/resources/datasets/client/Client.js +9 -9
  47. package/dist/api/resources/customModels/resources/files/client/Client.js +7 -7
  48. package/dist/api/resources/customModels/resources/jobs/client/Client.js +2 -2
  49. package/dist/api/resources/customModels/resources/models/client/Client.js +6 -6
  50. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +2 -2
  51. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +6 -3
  52. package/dist/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +4 -0
  53. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +9 -9
  54. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -4
  55. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -4
  56. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +9 -9
  57. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +9 -9
  58. package/dist/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
  59. package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -0
  60. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -0
  61. package/dist/api/resources/empathicVoice/types/AudioInput.d.ts +1 -0
  62. package/dist/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
  63. package/dist/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -0
  64. package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +1 -0
  65. package/dist/api/resources/empathicVoice/types/Inference.d.ts +1 -0
  66. package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -0
  67. package/dist/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -0
  68. package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +2 -4
  69. package/dist/api/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
  70. package/dist/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +1 -1
  71. package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -0
  72. package/dist/api/resources/empathicVoice/types/Tool.d.ts +2 -0
  73. package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -0
  74. package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +5 -0
  75. package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +1 -0
  76. package/dist/api/resources/empathicVoice/types/UserInput.d.ts +1 -0
  77. package/dist/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
  78. package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +1 -0
  79. package/dist/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -0
  80. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  81. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -2
  82. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -2
  83. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -2
  84. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -2
  85. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
  86. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -2
  87. package/dist/wrapper/HumeClient.d.ts +1 -1
  88. package/dist/wrapper/empathicVoice/EmpathicVoiceClient.d.ts +1 -1
  89. package/dist/wrapper/empathicVoice/chat/ChatClient.d.ts +1 -3
  90. package/dist/wrapper/empathicVoice/chat/ChatClient.js +2 -5
  91. package/package.json +1 -1
  92. package/reference.md +4893 -0
  93. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -2
  94. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -2
  95. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -2
  96. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -2
  97. package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -2
  98. package/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -2
  99. package/wrapper/HumeClient.d.ts +1 -1
  100. package/wrapper/empathicVoice/EmpathicVoiceClient.d.ts +1 -1
  101. package/wrapper/empathicVoice/chat/ChatClient.d.ts +1 -3
  102. package/wrapper/empathicVoice/chat/ChatClient.js +2 -5
@@ -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
  });
@@ -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
- clientSecret?: string;
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
- clientSecret?: string;
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
- clientSecret?: core.Supplier<string | undefined>;
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 clientSecret = yield core.Supplier.get(this._options.clientSecret);
99
- const authString = `${apiKey}:${clientSecret}`;
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",