diff --git a/.fern/metadata.json b/.fern/metadata.json index e4deccc3..9f8786cc 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -18,5 +18,5 @@ "shouldGenerateWebsocketClients": true, "namespaceExport": "Hume" }, - "sdkVersion": "0.15.11" + "sdkVersion": "0.15.12" } diff --git a/package.json b/package.json index a6047e66..15c7478e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hume", - "version": "0.15.11", + "version": "0.15.12", "private": false, "repository": { "type": "git", diff --git a/reference.md b/reference.md index 13d429a9..90a7fd70 100644 --- a/reference.md +++ b/reference.md @@ -369,7 +369,7 @@ for await (const item of response) {
-Lists voices you have saved in your account, or voices from the [Voice Library](https://app.hume.ai/voices). +Lists voices you have saved in your account, or voices from the [Voice Library](https://app.hume.ai/tts/voice-library).
@@ -648,6 +648,20 @@ await client.empathicVoice.controlPlane.send("chat_id", {
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of **Chat Groups**. +
+
+
+
+ #### 🔌 Usage
@@ -719,6 +733,20 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Fetches a **ChatGroup** by ID, including a paginated list of **Chats** associated with the **ChatGroup**. +
+
+
+
+ #### 🔌 Usage
@@ -748,7 +776,7 @@ await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19
-**id:** `string` — Identifier for a chat. Formatted as a UUID. +**id:** `string` — Identifier for a Chat Group. Formatted as a UUID.
@@ -780,6 +808,20 @@ await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). +
+
+
+
+ #### 🔌 Usage
@@ -809,7 +851,7 @@ await client.empathicVoice.chatGroups.getAudio("369846cf-6ad5-404d-905e-a8acb5cd
-**id:** `string` — Identifier for a chat. Formatted as a UUID. +**id:** `string` — Identifier for a Chat Group. Formatted as a UUID.
@@ -841,6 +883,20 @@ await client.empathicVoice.chatGroups.getAudio("369846cf-6ad5-404d-905e-a8acb5cd
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of **Chat** events associated with a **Chat Group**. +
+
+
+
+ #### 🔌 Usage
@@ -886,7 +942,7 @@ const response = page.response;
-**id:** `string` — Identifier for a chat. Formatted as a UUID. +**id:** `string` — Identifier for a Chat Group. Formatted as a UUID.
@@ -919,6 +975,20 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of **Chats**. +
+
+
+
+ #### 🔌 Usage
@@ -988,6 +1058,20 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of **Chat** events. +
+
+
+
+ #### 🔌 Usage
@@ -1033,7 +1117,7 @@ const response = page.response;
-**id:** `string` — Identifier for a chat. Formatted as a UUID. +**id:** `string` — Identifier for a Chat. Formatted as a UUID.
@@ -1065,6 +1149,20 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Fetches the audio of a previous **Chat**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). +
+
+
+
+ #### 🔌 Usage
@@ -1090,7 +1188,7 @@ await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"
-**id:** `string` — Identifier for a chat. Formatted as a UUID. +**id:** `string` — Identifier for a Chat. Formatted as a UUID.
@@ -1115,6 +1213,22 @@ await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of **Configs**. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1182,6 +1296,22 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Creates a **Config** which can be applied to EVI. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1261,6 +1391,22 @@ await client.empathicVoice.configs.createConfig({
+#### 📝 Description + +
+
+ +
+
+ +Fetches a list of a **Config's** versions. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1298,7 +1444,7 @@ const response = page.response;
-**id:** `string` — Identifier for a config. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1330,6 +1476,22 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Updates a **Config** by creating a new version of the **Config**. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1388,7 +1550,7 @@ await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**id:** `string` — Identifier for a config. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1420,6 +1582,22 @@ await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-
+#### 📝 Description + +
+
+ +
+
+ +Deletes a **Config** and its versions. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1445,7 +1623,7 @@ await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354
-**id:** `string` — Identifier for a config. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1469,6 +1647,22 @@ await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354
+#### 📝 Description + +
+
+ +
+
+ +Updates the name of a **Config**. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1496,7 +1690,7 @@ await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189
-**id:** `string` — Identifier for a config. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1528,6 +1722,22 @@ await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189
+#### 📝 Description + +
+
+ +
+
+ +Fetches a specified version of a **Config**. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1553,7 +1763,7 @@ await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189
-**id:** `string` — Identifier for a config. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1561,7 +1771,13 @@ await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189
-**version:** `number` — Version number for a config. Version numbers should be integers. +**version:** `number` + +Version number for a Config. + +Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
@@ -1585,6 +1801,22 @@ await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189
+#### 📝 Description + +
+
+ +
+
+ +Deletes a specified version of a **Config**. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1610,7 +1842,7 @@ await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**id:** `string` — Identifier for a config. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1618,7 +1850,13 @@ await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**version:** `number` — Version number for a config. Version numbers should be integers. +**version:** `number` + +Version number for a Config. + +Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
@@ -1642,6 +1880,22 @@ await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-
+#### 📝 Description + +
+
+ +
+
+ +Updates the description of a **Config**. + +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +
+
+
+
+ #### 🔌 Usage
@@ -1669,7 +1923,7 @@ await client.empathicVoice.configs.updateConfigDescription("1b60e1a0-cc59-424a-8
-**id:** `string` — Identifier for a config. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1677,7 +1931,13 @@ await client.empathicVoice.configs.updateConfigDescription("1b60e1a0-cc59-424a-8
-**version:** `number` — Version number for a config. Version numbers should be integers. +**version:** `number` + +Version number for a Config. + +Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
@@ -1710,6 +1970,22 @@ await client.empathicVoice.configs.updateConfigDescription("1b60e1a0-cc59-424a-8
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of **Prompts**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -1777,6 +2053,22 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Creates a **Prompt** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -1829,6 +2121,22 @@ await client.empathicVoice.prompts.createPrompt({
+#### 📝 Description + +
+
+ +
+
+ +Fetches a list of a **Prompt's** versions. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -1886,6 +2194,22 @@ await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-a
+#### 📝 Description + +
+
+ +
+
+ +Updates a **Prompt** by creating a new version of the **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -1914,7 +2238,7 @@ await client.empathicVoice.prompts.createPromptVersion("af699d45-2985-42cc-91b9-
-**id:** `string` — Identifier for a prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -1946,6 +2270,22 @@ await client.empathicVoice.prompts.createPromptVersion("af699d45-2985-42cc-91b9-
+#### 📝 Description + +
+
+ +
+
+ +Deletes a **Prompt** and its versions. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -1971,7 +2311,7 @@ await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da
-**id:** `string` — Identifier for a prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -1995,6 +2335,22 @@ await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da
+#### 📝 Description + +
+
+ +
+
+ +Updates the name of a **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -2022,7 +2378,7 @@ await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9
-**id:** `string` — Identifier for a prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -2054,6 +2410,22 @@ await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9
+#### 📝 Description + +
+
+ +
+
+ +Fetches a specified version of a **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -2079,7 +2451,7 @@ await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9
-**id:** `string` — Identifier for a prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -2087,7 +2459,13 @@ await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9
-**version:** `number` — Version number for a prompt. Version numbers should be integers. +**version:** `number` + +Version number for a Prompt. + +Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number.
@@ -2111,6 +2489,22 @@ await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9
+#### 📝 Description + +
+
+ +
+
+ +Deletes a specified version of a **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -2136,7 +2530,7 @@ await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-
-**id:** `string` — Identifier for a prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -2144,7 +2538,13 @@ await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-
-**version:** `number` — Version number for a prompt. Version numbers should be integers. +**version:** `number` + +Version number for a Prompt. + +Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number.
@@ -2168,6 +2568,22 @@ await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-
+#### 📝 Description + +
+
+ +
+
+ +Updates the description of a **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+
+
+ #### 🔌 Usage
@@ -2195,7 +2611,7 @@ await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-9
-**id:** `string` — Identifier for a prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -2203,7 +2619,13 @@ await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-9
-**version:** `number` — Version number for a prompt. Version numbers should be integers. +**version:** `number` + +Version number for a Prompt. + +Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number.
@@ -2236,6 +2658,22 @@ await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-9
+#### 📝 Description + +
+
+ +
+
+ +Fetches a paginated list of **Tools**. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2303,6 +2741,22 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Creates a **Tool** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2358,6 +2812,22 @@ await client.empathicVoice.tools.createTool({
+#### 📝 Description + +
+
+ +
+
+ +Fetches a list of a **Tool's** versions. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2427,6 +2897,22 @@ const response = page.response;
+#### 📝 Description + +
+
+ +
+
+ +Updates a **Tool** by creating a new version of the **Tool**. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2457,7 +2943,7 @@ await client.empathicVoice.tools.createToolVersion("00183a3f-79ba-413d-9f3b-6098
-**id:** `string` — Identifier for a tool. Formatted as a UUID. +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -2489,6 +2975,22 @@ await client.empathicVoice.tools.createToolVersion("00183a3f-79ba-413d-9f3b-6098
+#### 📝 Description + +
+
+ +
+
+ +Deletes a **Tool** and its versions. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2514,7 +3016,7 @@ await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268be
-**id:** `string` — Identifier for a tool. Formatted as a UUID. +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -2538,6 +3040,22 @@ await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268be
+#### 📝 Description + +
+
+ +
+
+ +Updates the name of a **Tool**. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2565,7 +3083,7 @@ await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-6098642
-**id:** `string` — Identifier for a tool. Formatted as a UUID. +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -2597,6 +3115,22 @@ await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-6098642
+#### 📝 Description + +
+
+ +
+
+ +Fetches a specified version of a **Tool**. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2622,7 +3156,7 @@ await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-6098642
-**id:** `string` — Identifier for a tool. Formatted as a UUID. +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -2630,7 +3164,13 @@ await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-6098642
-**version:** `number` — Version number for a tool. Version numbers should be integers. +**version:** `number` + +Version number for a Tool. + +Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
@@ -2654,6 +3194,22 @@ await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-6098642
+#### 📝 Description + +
+
+ +
+
+ +Deletes a specified version of a **Tool**. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2679,7 +3235,7 @@ await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-6098
-**id:** `string` — Identifier for a tool. Formatted as a UUID. +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -2687,7 +3243,13 @@ await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-6098
-**version:** `number` — Version number for a tool. Version numbers should be integers. +**version:** `number` + +Version number for a Tool. + +Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
@@ -2711,6 +3273,22 @@ await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-6098
+#### 📝 Description + +
+
+ +
+
+ +Updates the description of a specified **Tool** version. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+
+
+ #### 🔌 Usage
@@ -2738,7 +3316,7 @@ await client.empathicVoice.tools.updateToolDescription("00183a3f-79ba-413d-9f3b-
-**id:** `string` — Identifier for a tool. Formatted as a UUID. +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -2746,7 +3324,13 @@ await client.empathicVoice.tools.updateToolDescription("00183a3f-79ba-413d-9f3b-
-**version:** `number` — Version number for a tool. Version numbers should be integers. +**version:** `number` + +Version number for a Tool. + +Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
diff --git a/src/BaseClient.ts b/src/BaseClient.ts index 5909b913..2b20a5ea 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -52,8 +52,8 @@ export function normalizeClientOptions; -- /** Specify a custom URL to connect the client to. */ -- baseUrl?: core.Supplier; -- apiKey?: core.Supplier; -- /** Additional headers to include in requests. */ -- headers?: Record | null | undefined>; -- } -+ export type Options = BaseClientOptions; - - export interface ConnectArgs { -- accessToken?: string | undefined; -- configId?: string | undefined; -- configVersion?: string | number | undefined; -- eventLimit?: number | undefined; -- resumedChatGroupId?: string | undefined; -- verboseTranscription?: boolean | undefined; -- allowConnection?: boolean | undefined; -- /** @deprecated Use sessionSettings.voiceId instead */ -- voiceId?: string | undefined; -- apiKey?: string | undefined; -- sessionSettings?: Hume.empathicVoice.ConnectSessionSettings; -- /** Extra query parameters sent at WebSocket connection */ -- queryParams?: Record; -+ accessToken?: string; -+ allowConnection?: boolean; -+ configId?: string; -+ configVersion?: number; -+ eventLimit?: number; -+ resumedChatGroupId?: string; -+ verboseTranscription?: boolean; -+ apiKey?: string; -+ sessionSettings: Hume.empathicVoice.ConnectSessionSettings; - /** Arbitrary headers to send with the websocket connect request. */ - headers?: Record; - /** Enable debug mode on the websocket. Defaults to false. */ -@@ -41,97 +31,49 @@ export declare namespace ChatClient { - } - - export class ChatClient { -- protected readonly _options: ChatClient.Options; -+ protected readonly _options: NormalizedClientOptions; - -- constructor(_options: ChatClient.Options = {}) { -- this._options = _options; -+ constructor(options: ChatClient.Options = {}) { -+ this._options = normalizeClientOptions(options); - } - -- public connect(args: ChatClient.ConnectArgs = {}): ChatSocket { -+ public async connect(args: ChatClient.ConnectArgs): Promise { - const { - accessToken, -+ allowConnection, - configId, - configVersion, - eventLimit, - resumedChatGroupId, - verboseTranscription, -- voiceId, - apiKey, - sessionSettings, -- queryParams, - headers, - debug, - reconnectAttempts, -- allowConnection, - } = args; -- const _queryParams: Record = {}; -- -- if (accessToken != null) { -- _queryParams["access_token"] = accessToken; -- } -- -- if (configId != null) { -- _queryParams["config_id"] = configId; -- } -- -- if (configVersion != null) { -- _queryParams["config_version"] = -- typeof configVersion === "number" ? configVersion.toString() : configVersion; -- } -- -- if (eventLimit != null) { -- _queryParams["event_limit"] = eventLimit.toString(); -- } -- -- if (resumedChatGroupId != null) { -- _queryParams["resumed_chat_group_id"] = resumedChatGroupId; -- } -- -- if (verboseTranscription != null) { -- _queryParams["verbose_transcription"] = verboseTranscription.toString(); -- } -- -- if (voiceId != null) { -- _queryParams["voice_id"] = voiceId; -- } -- -- if (apiKey != null) { -- _queryParams["api_key"] = apiKey; -- } -- -- if (allowConnection != null) { -- _queryParams["allow_connection"] = allowConnection === true ? "true" : "false"; -- } -- -- if (sessionSettings != null) { -- _queryParams["session_settings"] = serializers.empathicVoice.ConnectSessionSettings.jsonOrThrow( -- sessionSettings, -- { -- unrecognizedObjectKeys: "passthrough", -- allowUnrecognizedUnionMembers: true, -- allowUnrecognizedEnumValues: true, -- omitUndefined: true, -- breadcrumbsPrefix: ["request", "sessionSettings"], -- }, -- ); -- } -- -- // Merge in any additional query parameters -- if (queryParams != null) { -- for (const [name, value] of Object.entries(queryParams)) { -- _queryParams[name] = value; -- } -- } -- -- let _headers: Record = mergeHeaders( -- mergeOnlyDefinedHeaders({ ...this._getCustomAuthorizationHeaders() }), -- headers, -- ); -- -+ const _queryParams: Record = { -+ access_token: accessToken, -+ allow_connection: allowConnection, -+ config_id: configId, -+ config_version: configVersion, -+ event_limit: eventLimit, -+ resumed_chat_group_id: resumedChatGroupId, -+ verbose_transcription: verboseTranscription, -+ api_key: apiKey, -+ session_settings: serializers.empathicVoice.ConnectSessionSettings.jsonOrThrow(sessionSettings, { -+ unrecognizedObjectKeys: "passthrough", -+ allowUnrecognizedUnionMembers: true, -+ allowUnrecognizedEnumValues: true, -+ omitUndefined: true, -+ breadcrumbsPrefix: ["request", "sessionSettings"], -+ }), -+ }; -+ const _headers: Record = { ...headers }; - const socket = new core.ReconnectingWebSocket({ - url: core.url.join( -- core.Supplier.get(this._options["baseUrl"]) ?? -- (core.Supplier.get(this._options["environment"]) ?? environments.HumeEnvironment.Prod).evi, -+ (await core.Supplier.get(this._options.baseUrl)) ?? -+ ((await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Prod).evi, - "/chat", - ), - protocols: [], -@@ -141,13 +83,4 @@ export class ChatClient { - }); - return new ChatSocket({ socket }); - } -- -- protected _getCustomAuthorizationHeaders(): Record { -- const apiKeyValue = core.Supplier.get(this._options.apiKey); -- // This `authHeaderValue` is manually added as if you don't provide it it will -- // be omitted from the headers which means it won't reach the logic in ws.ts that -- // extracts values from the headers and adds them to query parameters. -- const authHeaderValue = core.Supplier.get(this._options.headers?.authorization); -- return { "X-Hume-Api-Key": apiKeyValue, Authorization: authHeaderValue }; -- } - } diff --git a/src/api/resources/empathicVoice/resources/chat/client/Socket.ts.diff b/src/api/resources/empathicVoice/resources/chat/client/Socket.ts.diff deleted file mode 100644 index 7c0bd3a4..00000000 --- a/src/api/resources/empathicVoice/resources/chat/client/Socket.ts.diff +++ /dev/null @@ -1,139 +0,0 @@ -diff --git a/src/api/resources/empathicVoice/resources/chat/client/Socket.ts b/src/api/resources/empathicVoice/resources/chat/client/Socket.ts -index a55c7b5..0f2f2a5 100644 ---- a/src/api/resources/empathicVoice/resources/chat/client/Socket.ts -+++ b/src/api/resources/empathicVoice/resources/chat/client/Socket.ts -@@ -1,17 +1,17 @@ --/** THIS FILE IS MANUALLY MAINTAINED: see .fernignore */ -+// This file was auto-generated by Fern from our API Definition. - - import * as core from "../../../../../../core/index.js"; --import * as Hume from "../../../../../index.js"; --import { PublishEvent } from "../../../../../../serialization/resources/empathicVoice/resources/chat/types/PublishEvent.js"; - import { fromJson } from "../../../../../../core/json.js"; - import * as serializers from "../../../../../../serialization/index.js"; -+import { PublishEvent } from "../../../../../../serialization/resources/empathicVoice/resources/chat/types/PublishEvent.js"; -+import type * as Hume from "../../../../../index.js"; - - export declare namespace ChatSocket { - export interface Args { - socket: core.ReconnectingWebSocket; - } - -- export type Response = Hume.empathicVoice.SubscribeEvent & { receivedAt: Date }; -+ export type Response = Hume.empathicVoice.SubscribeEvent; - type EventHandlers = { - open?: () => void; - message?: (message: Response) => void; -@@ -37,10 +37,7 @@ export class ChatSocket { - omitUndefined: true, - }); - if (parsedResponse.ok) { -- this.eventHandlers.message?.({ -- ...parsedResponse.value, -- receivedAt: new Date(), -- }); -+ this.eventHandlers.message?.(parsedResponse.value); - } else { - this.eventHandlers.error?.(new Error("Received unknown message type")); - } -@@ -92,86 +89,6 @@ export class ChatSocket { - this.socket.send(JSON.stringify(jsonPayload)); - } - -- /** -- * Send audio input -- */ -- public sendAudioInput(message: Omit): void { -- this.sendPublish({ -- type: "audio_input", -- ...message, -- }); -- } -- -- /** -- * Send session settings -- */ -- public sendSessionSettings(message: Omit = {}): void { -- this.sendPublish({ -- type: "session_settings", -- ...message, -- }); -- } -- -- /** -- * Send assistant input -- */ -- public sendAssistantInput(message: Omit): void { -- this.sendPublish({ -- type: "assistant_input", -- ...message, -- }); -- } -- -- /** -- * Send pause assistant message -- */ -- public pauseAssistant(message: Omit = {}): void { -- this.sendPublish({ -- type: "pause_assistant_message", -- ...message, -- }); -- } -- -- /** -- * Send resume assistant message -- */ -- public resumeAssistant(message: Omit = {}): void { -- this.sendPublish({ -- type: "resume_assistant_message", -- ...message, -- }); -- } -- -- /** -- * Send tool response message -- */ -- public sendToolResponseMessage(message: Omit): void { -- this.sendPublish({ -- type: "tool_response", -- ...message, -- }); -- } -- -- /** -- * Send tool error message -- */ -- public sendToolErrorMessage(message: Omit): void { -- this.sendPublish({ -- type: "tool_error", -- ...message, -- }); -- } -- -- /** -- * Send text input -- */ -- public sendUserInput(text: string): void { -- this.sendPublish({ -- type: "user_input", -- text, -- }); -- } -- - /** Connect to the websocket and register event handlers. */ - public connect(): ChatSocket { - this.socket.reconnect(); -@@ -213,13 +130,6 @@ export class ChatSocket { - }); - } - -- /** -- * @deprecated Use waitForOpen() instead -- */ -- public async tillSocketOpen(): Promise { -- return this.waitForOpen(); -- } -- - /** Asserts that the websocket is open. */ - private assertSocketIsOpen(): void { - if (!this.socket) { diff --git a/src/api/resources/empathicVoice/resources/chat/client/index.ts.diff b/src/api/resources/empathicVoice/resources/chat/client/index.ts.diff deleted file mode 100644 index a49e563e..00000000 --- a/src/api/resources/empathicVoice/resources/chat/client/index.ts.diff +++ /dev/null @@ -1,9 +0,0 @@ -diff --git a/src/api/resources/empathicVoice/resources/chat/client/index.ts b/src/api/resources/empathicVoice/resources/chat/client/index.ts -index ff59f82..cb0ff5c 100644 ---- a/src/api/resources/empathicVoice/resources/chat/client/index.ts -+++ b/src/api/resources/empathicVoice/resources/chat/client/index.ts -@@ -1,3 +1 @@ --/** THIS FILE IS MANUALLY MAINTAINED: see .fernignore */ --export { ChatSocket } from "./Socket.js"; --export { ChatClient as Chat } from "./Client.js"; -+export {}; diff --git a/src/api/resources/empathicVoice/resources/chat/index.ts.diff b/src/api/resources/empathicVoice/resources/chat/index.ts.diff deleted file mode 100644 index e1f02d67..00000000 --- a/src/api/resources/empathicVoice/resources/chat/index.ts.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/api/resources/empathicVoice/resources/chat/index.ts b/src/api/resources/empathicVoice/resources/chat/index.ts -index a2f33dc..d9adb1a 100644 ---- a/src/api/resources/empathicVoice/resources/chat/index.ts -+++ b/src/api/resources/empathicVoice/resources/chat/index.ts -@@ -1,7 +1,2 @@ --export * from "./types/index.js"; - export * from "./client/index.js"; --/** -- * @deprecated Use `Hume.empathicVoice.SubscribeEvent` instead. -- * This type alias will be removed in a future version. -- */ --export type { SubscribeEvent } from "./types/SubscribeEvent.js"; -+export * from "./types/index.js"; diff --git a/src/api/resources/empathicVoice/resources/chatGroups/client/Client.ts b/src/api/resources/empathicVoice/resources/chatGroups/client/Client.ts index 0e8ed9f1..c370d15b 100644 --- a/src/api/resources/empathicVoice/resources/chatGroups/client/Client.ts +++ b/src/api/resources/empathicVoice/resources/chatGroups/client/Client.ts @@ -24,6 +24,8 @@ export class ChatGroupsClient { } /** + * Fetches a paginated list of **Chat Groups**. + * * @param {Hume.empathicVoice.ChatGroupsListChatGroupsRequest} request * @param {ChatGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -125,7 +127,9 @@ export class ChatGroupsClient { } /** - * @param {string} id - Identifier for a chat. Formatted as a UUID. + * Fetches a **ChatGroup** by ID, including a paginated list of **Chats** associated with the **ChatGroup**. + * + * @param {string} id - Identifier for a Chat Group. Formatted as a UUID. * @param {Hume.empathicVoice.ChatGroupsGetChatGroupRequest} request * @param {ChatGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -218,7 +222,9 @@ export class ChatGroupsClient { } /** - * @param {string} id - Identifier for a chat. Formatted as a UUID. + * Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). + * + * @param {string} id - Identifier for a Chat Group. Formatted as a UUID. * @param {Hume.empathicVoice.ChatGroupsGetAudioRequest} request * @param {ChatGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -315,7 +321,9 @@ export class ChatGroupsClient { } /** - * @param {string} id - Identifier for a chat. Formatted as a UUID. + * Fetches a paginated list of **Chat** events associated with a **Chat Group**. + * + * @param {string} id - Identifier for a Chat Group. Formatted as a UUID. * @param {Hume.empathicVoice.ChatGroupsListChatGroupEventsRequest} request * @param {ChatGroupsClient.RequestOptions} requestOptions - Request-specific configuration. * diff --git a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.ts b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.ts index e6992caf..079882d5 100644 --- a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.ts +++ b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.ts @@ -21,6 +21,6 @@ export interface ChatGroupsGetAudioRequest { * For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. */ pageSize?: number; - /** Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true. */ + /** Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. */ ascendingOrder?: boolean; } diff --git a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.ts b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.ts index ef2a7274..01a33b63 100644 --- a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.ts +++ b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.ts @@ -23,6 +23,6 @@ export interface ChatGroupsGetChatGroupRequest { * This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. */ pageNumber?: number; - /** Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true. */ + /** Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. */ ascendingOrder?: boolean; } diff --git a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.ts b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.ts index 334abe9e..ff10d0b8 100644 --- a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.ts +++ b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.ts @@ -21,6 +21,6 @@ export interface ChatGroupsListChatGroupEventsRequest { * This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. */ pageNumber?: number; - /** Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true. */ + /** Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. */ ascendingOrder?: boolean; } diff --git a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.ts b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.ts index 509d47b9..c7cf7aec 100644 --- a/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.ts +++ b/src/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.ts @@ -22,8 +22,12 @@ export interface ChatGroupsListChatGroupsRequest { * For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. */ pageSize?: number; - /** Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true. */ + /** Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. */ ascendingOrder?: boolean; - /** Filter chatgroups to only include chats that used this config in their most recent chat. */ + /** + * The unique identifier for an EVI configuration. + * + * Filter Chat Groups to only include Chats that used this `config_id` in their most recent Chat. + */ configId?: string; } diff --git a/src/api/resources/empathicVoice/resources/chats/client/Client.ts b/src/api/resources/empathicVoice/resources/chats/client/Client.ts index 78165457..43fcab76 100644 --- a/src/api/resources/empathicVoice/resources/chats/client/Client.ts +++ b/src/api/resources/empathicVoice/resources/chats/client/Client.ts @@ -24,6 +24,8 @@ export class ChatsClient { } /** + * Fetches a paginated list of **Chats**. + * * @param {Hume.empathicVoice.ChatsListChatsRequest} request * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -125,7 +127,9 @@ export class ChatsClient { } /** - * @param {string} id - Identifier for a chat. Formatted as a UUID. + * Fetches a paginated list of **Chat** events. + * + * @param {string} id - Identifier for a Chat. Formatted as a UUID. * @param {Hume.empathicVoice.ChatsListChatEventsRequest} request * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -226,7 +230,9 @@ export class ChatsClient { } /** - * @param {string} id - Identifier for a chat. Formatted as a UUID. + * Fetches the audio of a previous **Chat**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). + * + * @param {string} id - Identifier for a Chat. Formatted as a UUID. * @param {ChatsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} diff --git a/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.ts b/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.ts index b04b2643..0ee4383b 100644 --- a/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.ts +++ b/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.ts @@ -21,6 +21,6 @@ export interface ChatsListChatEventsRequest { * This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. */ pageNumber?: number; - /** Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true. */ + /** Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. */ ascendingOrder?: boolean; } diff --git a/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.ts b/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.ts index 5895d8b6..0133f5c9 100644 --- a/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.ts +++ b/src/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.ts @@ -21,7 +21,7 @@ export interface ChatsListChatsRequest { * For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. */ pageSize?: number; - /** Boolean to indicate if the results should be paginated in chronological order or reverse-chronological order. Defaults to true. */ + /** Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. */ ascendingOrder?: boolean; /** Filter to only include chats that used this config. */ configId?: string; diff --git a/src/api/resources/empathicVoice/resources/configs/client/Client.ts b/src/api/resources/empathicVoice/resources/configs/client/Client.ts index f8e65ff7..e24ee711 100644 --- a/src/api/resources/empathicVoice/resources/configs/client/Client.ts +++ b/src/api/resources/empathicVoice/resources/configs/client/Client.ts @@ -24,6 +24,10 @@ export class ConfigsClient { } /** + * Fetches a paginated list of **Configs**. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * * @param {Hume.empathicVoice.ConfigsListConfigsRequest} request * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -123,6 +127,10 @@ export class ConfigsClient { } /** + * Creates a **Config** which can be applied to EVI. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * * @param {Hume.empathicVoice.PostedConfig} request * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -238,7 +246,11 @@ export class ConfigsClient { } /** - * @param {string} id - Identifier for a config. Formatted as a UUID. + * Fetches a list of a **Config's** versions. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * + * @param {string} id - Identifier for a Config. Formatted as a UUID. * @param {Hume.empathicVoice.ConfigsListConfigVersionsRequest} request * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -335,7 +347,11 @@ export class ConfigsClient { } /** - * @param {string} id - Identifier for a config. Formatted as a UUID. + * Updates a **Config** by creating a new version of the **Config**. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * + * @param {string} id - Identifier for a Config. Formatted as a UUID. * @param {Hume.empathicVoice.PostedConfigVersion} request * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -456,7 +472,11 @@ export class ConfigsClient { } /** - * @param {string} id - Identifier for a config. Formatted as a UUID. + * Deletes a **Config** and its versions. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * + * @param {string} id - Identifier for a Config. Formatted as a UUID. * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -523,7 +543,11 @@ export class ConfigsClient { } /** - * @param {string} id - Identifier for a config. Formatted as a UUID. + * Updates the name of a **Config**. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * + * @param {string} id - Identifier for a Config. Formatted as a UUID. * @param {Hume.empathicVoice.PostedConfigName} request * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -605,8 +629,16 @@ export class ConfigsClient { } /** - * @param {string} id - Identifier for a config. Formatted as a UUID. - * @param {number} version - Version number for a config. Version numbers should be integers. + * Fetches a specified version of a **Config**. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * + * @param {string} id - Identifier for a Config. Formatted as a UUID. + * @param {number} version - Version number for a Config. + * + * Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number. * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -692,8 +724,16 @@ export class ConfigsClient { } /** - * @param {string} id - Identifier for a config. Formatted as a UUID. - * @param {number} version - Version number for a config. Version numbers should be integers. + * Deletes a specified version of a **Config**. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * + * @param {string} id - Identifier for a Config. Formatted as a UUID. + * @param {number} version - Version number for a Config. + * + * Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number. * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -770,8 +810,16 @@ export class ConfigsClient { } /** - * @param {string} id - Identifier for a config. Formatted as a UUID. - * @param {number} version - Version number for a config. Version numbers should be integers. + * Updates the description of a **Config**. + * + * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). + * + * @param {string} id - Identifier for a Config. Formatted as a UUID. + * @param {number} version - Version number for a Config. + * + * Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number. * @param {Hume.empathicVoice.PostedConfigVersionDescription} request * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration. * diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.ts index 24bfe173..90e3ad62 100644 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.ts +++ b/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.ts @@ -17,6 +17,6 @@ export interface ConfigsListConfigVersionsRequest { * For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. */ pageSize?: number; - /** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false. */ + /** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each config. To include all versions of each config in the list, set `restrict_to_most_recent` to false. */ restrictToMostRecent?: boolean; } diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigsRequest.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigsRequest.ts index bb17701e..475e15bb 100644 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigsRequest.ts +++ b/src/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigsRequest.ts @@ -20,7 +20,7 @@ export interface ConfigsListConfigsRequest { * For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. */ pageSize?: number; - /** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false. */ + /** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each config. To include all versions of each config in the list, set `restrict_to_most_recent` to false. */ restrictToMostRecent?: boolean; /** Filter to only include configs with this name. */ name?: string; diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.ts index d47c4769..b88ffeb6 100644 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.ts +++ b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.ts @@ -41,7 +41,7 @@ export interface PostedConfig { builtinTools?: (Hume.empathicVoice.PostedBuiltinTool | undefined)[]; ellmModel?: Hume.empathicVoice.PostedEllmModel; eventMessages?: Hume.empathicVoice.PostedEventMessageSpecs; - /** The version of the EVI used with this config. */ + /** EVI version to use. Only versions `3` and `4-mini` are supported. */ eviVersion: string; languageModel?: Hume.empathicVoice.PostedLanguageModel; /** Name applied to all versions of a particular Config. */ @@ -51,8 +51,9 @@ export interface PostedConfig { timeouts?: Hume.empathicVoice.PostedTimeoutSpecs; /** Tool specification for a Config. */ tools?: (Hume.empathicVoice.PostedUserDefinedToolSpec | undefined)[]; - /** Description that is appended to a specific version of a Config. */ + /** An optional description of the Config version. */ versionDescription?: string; + /** A voice specification associated with this Config. */ voice?: Hume.empathicVoice.VoiceRef; /** Webhook config specifications for each subscriber. */ webhooks?: (Hume.empathicVoice.PostedWebhookSpec | undefined)[]; diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.ts index 94c988a3..b590473a 100644 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.ts +++ b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.ts @@ -44,7 +44,7 @@ export interface PostedConfigVersion { builtinTools?: (Hume.empathicVoice.PostedBuiltinTool | undefined)[]; ellmModel?: Hume.empathicVoice.PostedEllmModel; eventMessages?: Hume.empathicVoice.PostedEventMessageSpecs; - /** The version of the EVI used with this config. */ + /** EVI version to use. Only versions `3` and `4-mini` are supported. */ eviVersion: string; languageModel?: Hume.empathicVoice.PostedLanguageModel; nudges?: Hume.empathicVoice.PostedNudgeSpec; @@ -52,7 +52,7 @@ export interface PostedConfigVersion { timeouts?: Hume.empathicVoice.PostedTimeoutSpecs; /** Tool specification for a Config. */ tools?: (Hume.empathicVoice.PostedUserDefinedToolSpec | undefined)[]; - /** Description that is appended to a specific version of a Config. */ + /** An optional description of the Config version. */ versionDescription?: string; voice?: Hume.empathicVoice.VoiceRef; /** Webhook config specifications for each subscriber. */ diff --git a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts index b52300b8..3f7265bb 100644 --- a/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts +++ b/src/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.ts @@ -7,6 +7,6 @@ * } */ export interface PostedConfigVersionDescription { - /** Description that is appended to a specific version of a Config. */ + /** An optional description of the Config version. */ versionDescription?: string; } diff --git a/src/api/resources/empathicVoice/resources/controlPlane/client/Client.ts.diff b/src/api/resources/empathicVoice/resources/controlPlane/client/Client.ts.diff deleted file mode 100644 index 1562b83b..00000000 --- a/src/api/resources/empathicVoice/resources/controlPlane/client/Client.ts.diff +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/src/api/resources/empathicVoice/resources/controlPlane/client/Client.ts b/src/api/resources/empathicVoice/resources/controlPlane/client/Client.ts -index 0eec869..b5d6ea0 100644 ---- a/src/api/resources/empathicVoice/resources/controlPlane/client/Client.ts -+++ b/src/api/resources/empathicVoice/resources/controlPlane/client/Client.ts -@@ -1,7 +1,8 @@ - // This file was auto-generated by Fern from our API Definition. - - import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js"; --import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.js"; -+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.js"; -+import { mergeHeaders } from "../../../../../../core/headers.js"; - import * as core from "../../../../../../core/index.js"; - import * as environments from "../../../../../../environments.js"; - import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.js"; -@@ -11,13 +12,13 @@ import * as Hume from "../../../../../index.js"; - import { ControlPlaneSocket } from "./Socket.js"; - - export declare namespace ControlPlaneClient { -- export interface Options extends BaseClientOptions {} -+ export type Options = BaseClientOptions; - - export interface RequestOptions extends BaseRequestOptions {} - - export interface ConnectArgs { -- chat_id: string; -- accessToken?: string | undefined; -+ chatId: string; -+ accessToken?: string; - /** Arbitrary headers to send with the websocket connect request. */ - headers?: Record; - /** Enable debug mode on the websocket. Defaults to false. */ -@@ -28,16 +29,16 @@ export declare namespace ControlPlaneClient { - } - - export class ControlPlaneClient { -- protected readonly _options: ControlPlaneClient.Options; -+ protected readonly _options: NormalizedClientOptionsWithAuth; - -- constructor(_options: ControlPlaneClient.Options = {}) { -- this._options = _options; -+ constructor(options: ControlPlaneClient.Options = {}) { -+ this._options = normalizeClientOptionsWithAuth(options); - } - - /** - * Send a message to a specific chat. - * -- * @param {string} chatId -+ * @param {string} chat_id - * @param {Hume.empathicVoice.ControlPlanePublishEvent} request - * @param {ControlPlaneClient.RequestOptions} requestOptions - Request-specific configuration. - * -@@ -49,28 +50,29 @@ export class ControlPlaneClient { - * }) - */ - public send( -- chatId: string, -+ chat_id: string, - request: Hume.empathicVoice.ControlPlanePublishEvent, - requestOptions?: ControlPlaneClient.RequestOptions, - ): core.HttpResponsePromise { -- return core.HttpResponsePromise.fromPromise(this.__send(chatId, request, requestOptions)); -+ return core.HttpResponsePromise.fromPromise(this.__send(chat_id, request, requestOptions)); - } - - private async __send( -- chatId: string, -+ chat_id: string, - request: Hume.empathicVoice.ControlPlanePublishEvent, - requestOptions?: ControlPlaneClient.RequestOptions, - ): Promise> { -+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( -+ _authRequest.headers, - this._options?.headers, -- mergeOnlyDefinedHeaders({ ...(await this._getCustomAuthorizationHeaders()) }), - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - ((await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Prod).base, -- `v0/evi/chat/${core.url.encodePathParam(chatId)}/send`, -+ `v0/evi/chat/${core.url.encodePathParam(chat_id)}/send`, - ), - method: "POST", - headers: _headers, -@@ -117,21 +119,16 @@ export class ControlPlaneClient { - } - - public async connect(args: ControlPlaneClient.ConnectArgs): Promise { -- const { chat_id, accessToken, headers, debug, reconnectAttempts } = args; -- const _queryParams: Record = {}; -- if (accessToken != null) { -- _queryParams.access_token = accessToken; -- } -- -- const _headers: Record = mergeHeaders( -- mergeOnlyDefinedHeaders({ ...(await this._getCustomAuthorizationHeaders()) }), -- headers, -- ); -+ const { chatId, accessToken, headers, debug, reconnectAttempts } = args; -+ const _queryParams: Record = { -+ access_token: accessToken, -+ }; -+ const _headers: Record = { ...headers }; - const socket = new core.ReconnectingWebSocket({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - ((await core.Supplier.get(this._options.environment)) ?? environments.HumeEnvironment.Prod).evi, -- `/chat/${core.url.encodePathParam(chat_id)}/connect`, -+ `/chat/${core.url.encodePathParam(chatId)}/connect`, - ), - protocols: [], - queryParameters: _queryParams, -@@ -140,12 +137,4 @@ export class ControlPlaneClient { - }); - return new ControlPlaneSocket({ socket }); - } -- protected async _getCustomAuthorizationHeaders(): Promise> { -- const apiKeyValue = core.Supplier.get(this._options.apiKey); -- // This `authHeaderValue` is manually added as if you don't provide it it will -- // be omitted from the headers which means it won't reach the logic in ws.ts that -- // extracts values from the headers and adds them to query parameters. -- const authHeaderValue = core.Supplier.get(this._options.headers?.authorization); -- return { "X-Hume-Api-Key": apiKeyValue, Authorization: authHeaderValue }; -- } - } diff --git a/src/api/resources/empathicVoice/resources/prompts/client/Client.ts b/src/api/resources/empathicVoice/resources/prompts/client/Client.ts index 23eb182a..6622b86a 100644 --- a/src/api/resources/empathicVoice/resources/prompts/client/Client.ts +++ b/src/api/resources/empathicVoice/resources/prompts/client/Client.ts @@ -24,6 +24,10 @@ export class PromptsClient { } /** + * Fetches a paginated list of **Prompts**. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * * @param {Hume.empathicVoice.PromptsListPromptsRequest} request * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -123,6 +127,10 @@ export class PromptsClient { } /** + * Creates a **Prompt** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * * @param {Hume.empathicVoice.PostedPrompt} request * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -211,6 +219,10 @@ export class PromptsClient { } /** + * Fetches a list of a **Prompt's** versions. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * * @param {string} id * @param {Hume.empathicVoice.PromptsListPromptVersionsRequest} request * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. @@ -299,7 +311,11 @@ export class PromptsClient { } /** - * @param {string} id - Identifier for a prompt. Formatted as a UUID. + * Updates a **Prompt** by creating a new version of the **Prompt**. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * + * @param {string} id - Identifier for a Prompt. Formatted as a UUID. * @param {Hume.empathicVoice.PostedPromptVersion} request * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -390,7 +406,11 @@ export class PromptsClient { } /** - * @param {string} id - Identifier for a prompt. Formatted as a UUID. + * Deletes a **Prompt** and its versions. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * + * @param {string} id - Identifier for a Prompt. Formatted as a UUID. * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -457,7 +477,11 @@ export class PromptsClient { } /** - * @param {string} id - Identifier for a prompt. Formatted as a UUID. + * Updates the name of a **Prompt**. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * + * @param {string} id - Identifier for a Prompt. Formatted as a UUID. * @param {Hume.empathicVoice.PostedPromptName} request * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -539,8 +563,16 @@ export class PromptsClient { } /** - * @param {string} id - Identifier for a prompt. Formatted as a UUID. - * @param {number} version - Version number for a prompt. Version numbers should be integers. + * Fetches a specified version of a **Prompt**. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * + * @param {string} id - Identifier for a Prompt. Formatted as a UUID. + * @param {number} version - Version number for a Prompt. + * + * Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number. * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -626,8 +658,16 @@ export class PromptsClient { } /** - * @param {string} id - Identifier for a prompt. Formatted as a UUID. - * @param {number} version - Version number for a prompt. Version numbers should be integers. + * Deletes a specified version of a **Prompt**. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * + * @param {string} id - Identifier for a Prompt. Formatted as a UUID. + * @param {number} version - Version number for a Prompt. + * + * Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number. * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -704,8 +744,16 @@ export class PromptsClient { } /** - * @param {string} id - Identifier for a prompt. Formatted as a UUID. - * @param {number} version - Version number for a prompt. Version numbers should be integers. + * Updates the description of a **Prompt**. + * + * See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. + * + * @param {string} id - Identifier for a Prompt. Formatted as a UUID. + * @param {number} version - Version number for a Prompt. + * + * Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number. * @param {Hume.empathicVoice.PostedPromptVersionDescription} request * @param {PromptsClient.RequestOptions} requestOptions - Request-specific configuration. * diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.ts index 28e4e162..d63417c5 100644 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.ts +++ b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.ts @@ -10,8 +10,12 @@ export interface PostedPrompt { /** Name applied to all versions of a particular Prompt. */ name: string; - /** Text used for this version of the Prompt. */ + /** + * Instructions used to shape EVI's behavior, responses, and style. + * + * You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). + */ text: string; - /** Description that is appended to a specific version of a Prompt. */ + /** An optional description of the Prompt version. */ versionDescription?: string; } diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.ts index 2915e4dd..a295d3ea 100644 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.ts +++ b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.ts @@ -8,8 +8,12 @@ * } */ export interface PostedPromptVersion { - /** Text used for this version of the Prompt. */ + /** + * Instructions used to shape EVI's behavior, responses, and style. + * + * You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). + */ text: string; - /** Description that is appended to a specific version of a Prompt. */ + /** An optional description of the Prompt version. */ versionDescription?: string; } diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts index 3573a037..6af15747 100644 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts +++ b/src/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.ts @@ -7,6 +7,6 @@ * } */ export interface PostedPromptVersionDescription { - /** Description that is appended to a specific version of a Prompt. */ + /** An optional description of the Prompt version. */ versionDescription?: string; } diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.ts index b0836b1a..bdaad4a6 100644 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.ts +++ b/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.ts @@ -17,6 +17,6 @@ export interface PromptsListPromptVersionsRequest { * For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. */ pageSize?: number; - /** Only include the most recent version of each prompt in the list. */ + /** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each prompt. To include all versions of each prompt in the list, set `restrict_to_most_recent` to false. */ restrictToMostRecent?: boolean; } diff --git a/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptsRequest.ts b/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptsRequest.ts index 77c501f4..8c741b3d 100644 --- a/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptsRequest.ts +++ b/src/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptsRequest.ts @@ -20,7 +20,7 @@ export interface PromptsListPromptsRequest { * For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. */ pageSize?: number; - /** Only include the most recent version of each prompt in the list. */ + /** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each prompt. To include all versions of each prompt in the list, set `restrict_to_most_recent` to false. */ restrictToMostRecent?: boolean; /** Filter to only include prompts with name. */ name?: string; diff --git a/src/api/resources/empathicVoice/resources/tools/client/Client.ts b/src/api/resources/empathicVoice/resources/tools/client/Client.ts index 3367e347..374cf8ec 100644 --- a/src/api/resources/empathicVoice/resources/tools/client/Client.ts +++ b/src/api/resources/empathicVoice/resources/tools/client/Client.ts @@ -24,6 +24,10 @@ export class ToolsClient { } /** + * Fetches a paginated list of **Tools**. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * * @param {Hume.empathicVoice.ToolsListToolsRequest} request * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -128,6 +132,10 @@ export class ToolsClient { } /** + * Creates a **Tool** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * * @param {Hume.empathicVoice.PostedUserDefinedTool} request * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -219,6 +227,10 @@ export class ToolsClient { } /** + * Fetches a list of a **Tool's** versions. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * * @param {string} id * @param {Hume.empathicVoice.ToolsListToolVersionsRequest} request * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. @@ -321,7 +333,11 @@ export class ToolsClient { } /** - * @param {string} id - Identifier for a tool. Formatted as a UUID. + * Updates a **Tool** by creating a new version of the **Tool**. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * + * @param {string} id - Identifier for a Tool. Formatted as a UUID. * @param {Hume.empathicVoice.PostedUserDefinedToolVersion} request * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -414,7 +430,11 @@ export class ToolsClient { } /** - * @param {string} id - Identifier for a tool. Formatted as a UUID. + * Deletes a **Tool** and its versions. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * + * @param {string} id - Identifier for a Tool. Formatted as a UUID. * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -481,7 +501,11 @@ export class ToolsClient { } /** - * @param {string} id - Identifier for a tool. Formatted as a UUID. + * Updates the name of a **Tool**. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * + * @param {string} id - Identifier for a Tool. Formatted as a UUID. * @param {Hume.empathicVoice.PostedUserDefinedToolName} request * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -563,8 +587,16 @@ export class ToolsClient { } /** - * @param {string} id - Identifier for a tool. Formatted as a UUID. - * @param {number} version - Version number for a tool. Version numbers should be integers. + * Fetches a specified version of a **Tool**. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * + * @param {string} id - Identifier for a Tool. Formatted as a UUID. + * @param {number} version - Version number for a Tool. + * + * Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -650,8 +682,16 @@ export class ToolsClient { } /** - * @param {string} id - Identifier for a tool. Formatted as a UUID. - * @param {number} version - Version number for a tool. Version numbers should be integers. + * Deletes a specified version of a **Tool**. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * + * @param {string} id - Identifier for a Tool. Formatted as a UUID. + * @param {number} version - Version number for a Tool. + * + * Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Hume.empathicVoice.BadRequestError} @@ -728,8 +768,16 @@ export class ToolsClient { } /** - * @param {string} id - Identifier for a tool. Formatted as a UUID. - * @param {number} version - Version number for a tool. Version numbers should be integers. + * Updates the description of a specified **Tool** version. + * + * Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. + * + * @param {string} id - Identifier for a Tool. Formatted as a UUID. + * @param {number} version - Version number for a Tool. + * + * Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. * @param {Hume.empathicVoice.PostedUserDefinedToolVersionDescription} request * @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration. * diff --git a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.ts b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.ts index d36c6242..0e312ccc 100644 --- a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.ts +++ b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.ts @@ -11,14 +11,25 @@ * } */ export interface PostedUserDefinedTool { - /** Text describing what the tool does. */ + /** An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. */ description?: string; - /** Text to use if the tool fails to generate content. */ + /** Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. */ fallbackContent?: string; - /** Name applied to all versions of a particular Tool. */ + /** + * Name of the built-in tool to use. Hume supports the following built-in tools: + * + * - **web_search:** enables EVI to search the web for up-to-date information when applicable. + * - **hang_up:** closes the WebSocket connection when appropriate (e.g., after detecting a farewell in the conversation). + * + * For more information, see our guide on [using built-in tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). + */ name: string; - /** Stringified JSON defining the parameters used by this version of the Tool. */ + /** + * Stringified JSON defining the parameters used by this version of the Tool. + * + * These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. + */ parameters: string; - /** Description that is appended to a specific version of a Tool. */ + /** An optional description of the Tool version. */ versionDescription?: string; } diff --git a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolName.ts b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolName.ts index 589576a5..c49c239a 100644 --- a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolName.ts +++ b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolName.ts @@ -7,6 +7,13 @@ * } */ export interface PostedUserDefinedToolName { - /** Name applied to all versions of a particular Tool. */ + /** + * Name of the built-in tool to use. Hume supports the following built-in tools: + * + * - **web_search:** enables EVI to search the web for up-to-date information when applicable. + * - **hang_up:** closes the WebSocket connection when appropriate (e.g., after detecting a farewell in the conversation). + * + * For more information, see our guide on [using built-in tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). + */ name: string; } diff --git a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.ts b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.ts index 2afdb19b..13d5877c 100644 --- a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.ts +++ b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.ts @@ -10,12 +10,16 @@ * } */ export interface PostedUserDefinedToolVersion { - /** Text describing what the tool does. */ + /** An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. */ description?: string; - /** Text to use if the tool fails to generate content. */ + /** Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. */ fallbackContent?: string; - /** Stringified JSON defining the parameters used by this version of the Tool. */ + /** + * Stringified JSON defining the parameters used by this version of the Tool. + * + * These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. + */ parameters: string; - /** Description that is appended to a specific version of a Tool. */ + /** An optional description of the Tool version. */ versionDescription?: string; } diff --git a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.ts b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.ts index 6ce48c45..4b436e47 100644 --- a/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.ts +++ b/src/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.ts @@ -7,6 +7,6 @@ * } */ export interface PostedUserDefinedToolVersionDescription { - /** Description that is appended to a specific version of a Tool. */ + /** An optional description of the Tool version. */ versionDescription?: string; } diff --git a/src/api/resources/empathicVoice/types/AssistantEnd.ts b/src/api/resources/empathicVoice/types/AssistantEnd.ts index 0add9f8e..174c3a22 100644 --- a/src/api/resources/empathicVoice/types/AssistantEnd.ts +++ b/src/api/resources/empathicVoice/types/AssistantEnd.ts @@ -1,7 +1,7 @@ // This file was auto-generated by Fern from our API Definition. /** - * When provided, the output is an assistant end message. + * **Indicates the conclusion of the assistant's response**, signaling that the assistant has finished speaking for the current conversational turn. */ export interface AssistantEnd { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/AssistantInput.ts b/src/api/resources/empathicVoice/types/AssistantInput.ts index 10ad51ca..5d501e21 100644 --- a/src/api/resources/empathicVoice/types/AssistantInput.ts +++ b/src/api/resources/empathicVoice/types/AssistantInput.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * When provided, the input is spoken by EVI. + * **Assistant text to synthesize into spoken audio and insert into the conversation.** EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. + * + * Our model adds appropriate emotional inflections and tones to the text based on the user's expressions and the context of the conversation. The synthesized audio is streamed back to the user as an Assistant Message. */ export interface AssistantInput { customSessionId?: string; diff --git a/src/api/resources/empathicVoice/types/AssistantMessage.ts b/src/api/resources/empathicVoice/types/AssistantMessage.ts index d2b6e550..cb67ec4e 100644 --- a/src/api/resources/empathicVoice/types/AssistantMessage.ts +++ b/src/api/resources/empathicVoice/types/AssistantMessage.ts @@ -3,7 +3,7 @@ import type * as Hume from "../../../index.js"; /** - * When provided, the output is an assistant message. + * **Transcript of the assistant's message.** Contains the message role, content, and optionally tool call information including the tool name, parameters, response requirement status, tool call ID, and tool type. */ export interface AssistantMessage { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/AssistantProsody.ts b/src/api/resources/empathicVoice/types/AssistantProsody.ts index bbb79bff..45d4dfb9 100644 --- a/src/api/resources/empathicVoice/types/AssistantProsody.ts +++ b/src/api/resources/empathicVoice/types/AssistantProsody.ts @@ -3,7 +3,7 @@ import type * as Hume from "../../../index.js"; /** - * When provided, the output is an Assistant Prosody message. + * **Expression measurement predictions of the assistant's audio output.** Contains inference model results including prosody scores for 48 emotions within the detected expression of the assistant's audio sample. */ export interface AssistantProsody { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/AudioInput.ts b/src/api/resources/empathicVoice/types/AudioInput.ts index 2413d7f6..3f335581 100644 --- a/src/api/resources/empathicVoice/types/AudioInput.ts +++ b/src/api/resources/empathicVoice/types/AudioInput.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * When provided, the input is audio. + * **Base64 encoded audio input to insert into the conversation.** The content is treated as the user's speech to EVI and must be streamed continuously. Pre-recorded audio files are not supported. + * + * For optimal transcription quality, the audio data should be transmitted in small chunks. Hume recommends streaming audio with a buffer window of `20` milliseconds (ms), or `100` milliseconds (ms) for web applications. See our [Audio Guide](/docs/speech-to-speech-evi/guides/audio) for more details on preparing and processing audio. */ export interface AudioInput { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/AudioOutput.ts b/src/api/resources/empathicVoice/types/AudioOutput.ts index 92e2562a..180c3a75 100644 --- a/src/api/resources/empathicVoice/types/AudioOutput.ts +++ b/src/api/resources/empathicVoice/types/AudioOutput.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * The type of message sent through the socket; for an Audio Output message, this must be `audio_output`. + * **Base64 encoded audio output.** This encoded audio is transmitted to the client, where it can be decoded and played back as part of the user interaction. The returned audio format is WAV and the sample rate is 48kHz. + * + * Contains the audio data, an ID to track and reference the audio output, and an index indicating the chunk position relative to the whole audio segment. See our [Audio Guide](/docs/speech-to-speech-evi/guides/audio) for more details on preparing and processing audio. */ export interface AudioOutput { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/ChatMetadata.ts b/src/api/resources/empathicVoice/types/ChatMetadata.ts index 5aebd9aa..bea3582a 100644 --- a/src/api/resources/empathicVoice/types/ChatMetadata.ts +++ b/src/api/resources/empathicVoice/types/ChatMetadata.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * When provided, the output is a chat metadata message. + * **The first message received after establishing a connection with EVI**, containing important identifiers for the current Chat session. + * + * Includes the Chat ID (which allows the Chat session to be tracked and referenced) and the Chat Group ID (used to resume a Chat when passed in the `resumed_chat_group_id` query parameter of a subsequent connection request, allowing EVI to continue the conversation from where it left off within the Chat Group). */ export interface ChatMetadata { /** diff --git a/src/api/resources/empathicVoice/types/ConnectSessionSettings.ts b/src/api/resources/empathicVoice/types/ConnectSessionSettings.ts index 1534f77f..8f5542a7 100644 --- a/src/api/resources/empathicVoice/types/ConnectSessionSettings.ts +++ b/src/api/resources/empathicVoice/types/ConnectSessionSettings.ts @@ -10,11 +10,11 @@ export interface ConnectSessionSettings { */ audio?: Hume.empathicVoice.ConnectSessionSettingsAudio; /** - * Allows developers to inject additional context into the conversation, which is appended to the end of user messages for the session. + * Field for injecting additional context into the conversation, which is appended to the end of user messages for the session. * * When included in a Session Settings message, the provided context can be used to remind the LLM of its role in every user message, prevent it from forgetting important details, or add new relevant information to the conversation. * - * Set to `null` to disable context injection. + * Set to `null` to clear injected context. */ context?: Hume.empathicVoice.ConnectSessionSettingsContext; /** @@ -25,6 +25,7 @@ export interface ConnectSessionSettings { * It is recommended to pass a `custom_session_id` if you are using a Custom Language Model. Please see our guide to [using a custom language model](/docs/empathic-voice-interface-evi/custom-language-model) with EVI to learn more. */ customSessionId?: string; + /** The maximum number of chat events to return from chat history. By default, the system returns up to 300 events (100 events per page × 3 pages). Set this parameter to a smaller value to limit the number of events returned. */ eventLimit?: number; /** * Third party API key for the supplemental language model. @@ -42,6 +43,7 @@ export interface ConnectSessionSettings { * For help writing a system prompt, see our [Prompting Guide](/docs/empathic-voice-interface-evi/prompting). */ systemPrompt?: string; + /** Allows you to change the voice during an active chat. Updating the voice does not affect chat context or conversation history. */ voiceId?: string; /** * This field allows you to assign values to dynamic variables referenced in your system prompt. diff --git a/src/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.ts b/src/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.ts index 9e905a63..71692689 100644 --- a/src/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.ts +++ b/src/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.ts @@ -8,10 +8,10 @@ import type * as Hume from "../../../index.js"; * This optional field is only required when the audio input is encoded in PCM Linear 16 (16-bit, little-endian, signed PCM WAV data). For detailed instructions on how to configure session settings for PCM Linear 16 audio, please refer to the [Session Settings section](/docs/empathic-voice-interface-evi/configuration#session-settings) on the EVI Configuration page. */ export interface ConnectSessionSettingsAudio { - /** Number of audio channels. */ + /** Sets number of audio channels for audio input. */ channels?: number; - /** Encoding format of the audio input, such as `linear16`. */ + /** Sets encoding format of the audio input, such as `linear16`. */ encoding?: Hume.empathicVoice.Encoding; - /** Audio sample rate. Number of samples per second in the audio input, measured in Hertz. */ + /** Sets the sample rate for audio input. (Number of samples per second in the audio input, measured in Hertz.) */ sampleRate?: number; } diff --git a/src/api/resources/empathicVoice/types/ConnectSessionSettingsContext.ts b/src/api/resources/empathicVoice/types/ConnectSessionSettingsContext.ts index dfe73fce..6d6f4559 100644 --- a/src/api/resources/empathicVoice/types/ConnectSessionSettingsContext.ts +++ b/src/api/resources/empathicVoice/types/ConnectSessionSettingsContext.ts @@ -3,31 +3,25 @@ import type * as Hume from "../../../index.js"; /** - * Allows developers to inject additional context into the conversation, which is appended to the end of user messages for the session. + * Field for injecting additional context into the conversation, which is appended to the end of user messages for the session. * * When included in a Session Settings message, the provided context can be used to remind the LLM of its role in every user message, prevent it from forgetting important details, or add new relevant information to the conversation. * - * Set to `null` to disable context injection. + * Set to `null` to clear injected context. */ export interface ConnectSessionSettingsContext { /** * The context to be injected into the conversation. Helps inform the LLM's response by providing relevant information about the ongoing conversation. * - * This text will be appended to the end of user messages based on the chosen persistence level. For example, if you want to remind EVI of its role as a helpful weather assistant, the context you insert will be appended to the end of user messages as `{Context: You are a helpful weather assistant}`. + * This text will be appended to the end of [user_messages](/reference/speech-to-speech-evi/chat#receive.UserMessage.message.content) based on the chosen persistence level. For example, if you want to remind EVI of its role as a helpful weather assistant, the context you insert will be appended to the end of user messages as `{Context: You are a helpful weather assistant}`. */ text?: string; /** * The persistence level of the injected context. Specifies how long the injected context will remain active in the session. * - * There are three possible context types: + * - **Temporary**: Context that is only applied to the following assistant response. * - * - **Persistent**: The context is appended to all user messages for the duration of the session. - * - * - **Temporary**: The context is appended only to the next user message. - * - * - **Editable**: The original context is updated to reflect the new context. - * - * If the type is not specified, it will default to `temporary`. + * - **Persistent**: Context that is applied to all subsequent assistant responses for the remainder of the Chat. */ type?: Hume.empathicVoice.ContextType; } diff --git a/src/api/resources/empathicVoice/types/PauseAssistantMessage.ts b/src/api/resources/empathicVoice/types/PauseAssistantMessage.ts index 461936a9..2165f71d 100644 --- a/src/api/resources/empathicVoice/types/PauseAssistantMessage.ts +++ b/src/api/resources/empathicVoice/types/PauseAssistantMessage.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * Pause responses from EVI. Chat history is still saved and sent after resuming. + * **Pause responses from EVI.** Chat history is still saved and sent after resuming. Once this message is sent, EVI will not respond until a Resume Assistant message is sent. + * + * When paused, EVI won't respond, but transcriptions of your audio inputs will still be recorded. See our [Pause Response Guide](/docs/speech-to-speech-evi/features/pause-responses) for further details. */ export interface PauseAssistantMessage { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/PostedBuiltinTool.ts b/src/api/resources/empathicVoice/types/PostedBuiltinTool.ts index 02829ddc..c167ca76 100644 --- a/src/api/resources/empathicVoice/types/PostedBuiltinTool.ts +++ b/src/api/resources/empathicVoice/types/PostedBuiltinTool.ts @@ -6,7 +6,7 @@ import type * as Hume from "../../../index.js"; * A configuration of a built-in tool to be posted to the server */ export interface PostedBuiltinTool { - /** Text to use if the tool fails to generate content. */ + /** Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. */ fallbackContent?: string; name: Hume.empathicVoice.PostedBuiltinToolName; } diff --git a/src/api/resources/empathicVoice/types/PostedEllmModel.ts b/src/api/resources/empathicVoice/types/PostedEllmModel.ts index 725aa244..a615f315 100644 --- a/src/api/resources/empathicVoice/types/PostedEllmModel.ts +++ b/src/api/resources/empathicVoice/types/PostedEllmModel.ts @@ -4,6 +4,10 @@ * A eLLM model configuration to be posted to the server */ export interface PostedEllmModel { - /** Boolean indicating if the model is allowed to generate short responses. */ + /** + * Boolean indicating if the eLLM is allowed to generate short responses. + * + * If omitted, short responses from the eLLM are enabled by default. + */ allowShortResponses?: boolean; } diff --git a/src/api/resources/empathicVoice/types/PostedEventMessageSpec.ts b/src/api/resources/empathicVoice/types/PostedEventMessageSpec.ts index 57f2ebd2..544bc02a 100644 --- a/src/api/resources/empathicVoice/types/PostedEventMessageSpec.ts +++ b/src/api/resources/empathicVoice/types/PostedEventMessageSpec.ts @@ -4,8 +4,12 @@ * Settings for a specific event_message to be posted to the server */ export interface PostedEventMessageSpec { - /** Boolean indicating if this event message is enabled. */ + /** + * Boolean indicating if this event message is enabled. + * + * If set to `true`, a message will be sent when the circumstances for the specific event are met. + */ enabled: boolean; - /** Optional text that will be used as a verbatim event message. If the text is null and the event message is enabled, the system will generate a message based using the language model. */ + /** Text to use as the event message when the corresponding event occurs. If no text is specified, EVI will generate an appropriate message based on its current context and the system prompt. */ text?: string; } diff --git a/src/api/resources/empathicVoice/types/PostedEventMessageSpecs.ts b/src/api/resources/empathicVoice/types/PostedEventMessageSpecs.ts index 42b475de..baaf410f 100644 --- a/src/api/resources/empathicVoice/types/PostedEventMessageSpecs.ts +++ b/src/api/resources/empathicVoice/types/PostedEventMessageSpecs.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * Collection of event_message specs to be posted to the server + * Collection of event messages returned by the server. + * + * Event messages are sent by the server when specific events occur during a chat session. These messages are used to configure behaviors for EVI, such as controlling how EVI starts a new conversation. */ export interface PostedEventMessageSpecs { onInactivityTimeout?: Hume.empathicVoice.PostedEventMessageSpec; diff --git a/src/api/resources/empathicVoice/types/PostedLanguageModel.ts b/src/api/resources/empathicVoice/types/PostedLanguageModel.ts index e03e7683..3ca6192b 100644 --- a/src/api/resources/empathicVoice/types/PostedLanguageModel.ts +++ b/src/api/resources/empathicVoice/types/PostedLanguageModel.ts @@ -8,6 +8,10 @@ import type * as Hume from "../../../index.js"; export interface PostedLanguageModel { modelProvider?: Hume.empathicVoice.ModelProviderEnum; modelResource?: Hume.empathicVoice.LanguageModelType; - /** Model temperature. */ + /** + * The model temperature, with values between 0 to 1 (inclusive). + * + * Controls the randomness of the LLM's output, with values closer to 0 yielding focused, deterministic responses and values closer to 1 producing more creative, diverse responses. + */ temperature?: number; } diff --git a/src/api/resources/empathicVoice/types/PostedNudgeSpec.ts b/src/api/resources/empathicVoice/types/PostedNudgeSpec.ts index 9e8252aa..0881466a 100644 --- a/src/api/resources/empathicVoice/types/PostedNudgeSpec.ts +++ b/src/api/resources/empathicVoice/types/PostedNudgeSpec.ts @@ -4,8 +4,8 @@ * A nudge specification posted to the server */ export interface PostedNudgeSpec { - /** EVI will nudge user after inactivity */ + /** If true, EVI will 'nudge' the user to speak after a determined interval of silence. */ enabled?: boolean; - /** Time interval in seconds after which the nudge will be sent. */ + /** The interval of inactivity (in seconds) before a nudge is triggered. */ intervalSecs?: number; } diff --git a/src/api/resources/empathicVoice/types/PostedTimeoutSpec.ts b/src/api/resources/empathicVoice/types/PostedTimeoutSpec.ts index dae6f42d..64697f9f 100644 --- a/src/api/resources/empathicVoice/types/PostedTimeoutSpec.ts +++ b/src/api/resources/empathicVoice/types/PostedTimeoutSpec.ts @@ -4,8 +4,12 @@ * Settings for a specific timeout to be posted to the server */ export interface PostedTimeoutSpec { - /** Duration in seconds for the timeout. */ + /** Duration in seconds for the timeout (e.g. 600 seconds represents 10 minutes). */ durationSecs?: number; - /** Boolean indicating if this event message is enabled. */ + /** + * Boolean indicating if this timeout is enabled. + * + * If set to false, EVI will not timeout due to a specified duration being reached. However, the conversation will eventually disconnect after 1,800 seconds (30 minutes), which is the maximum WebSocket duration limit for EVI. + */ enabled: boolean; } diff --git a/src/api/resources/empathicVoice/types/PostedTimeoutSpecs.ts b/src/api/resources/empathicVoice/types/PostedTimeoutSpecs.ts index 2f4af515..f38bc73a 100644 --- a/src/api/resources/empathicVoice/types/PostedTimeoutSpecs.ts +++ b/src/api/resources/empathicVoice/types/PostedTimeoutSpecs.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * Collection of timeout specs to be posted to the server + * Collection of timeout specifications returned by the server. + * + * Timeouts are sent by the server when specific time-based events occur during a chat session. These specifications set the inactivity timeout and the maximum duration an EVI WebSocket connection can stay open before it is automatically disconnected. */ export interface PostedTimeoutSpecs { inactivity?: Hume.empathicVoice.PostedTimeoutSpecsInactivity; diff --git a/src/api/resources/empathicVoice/types/PostedWebhookEventType.ts b/src/api/resources/empathicVoice/types/PostedWebhookEventType.ts index 6006c0a6..4d947a5c 100644 --- a/src/api/resources/empathicVoice/types/PostedWebhookEventType.ts +++ b/src/api/resources/empathicVoice/types/PostedWebhookEventType.ts @@ -1,6 +1,10 @@ // This file was auto-generated by Fern from our API Definition. -/** Events this URL is subscribed to */ +/** + * The list of events the specified URL is subscribed to. + * + * See our [webhooks guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) for more information on supported events. + */ export const PostedWebhookEventType = { ChatStarted: "chat_started", ChatEnded: "chat_ended", diff --git a/src/api/resources/empathicVoice/types/PostedWebhookSpec.ts b/src/api/resources/empathicVoice/types/PostedWebhookSpec.ts index 9afcd369..af858242 100644 --- a/src/api/resources/empathicVoice/types/PostedWebhookSpec.ts +++ b/src/api/resources/empathicVoice/types/PostedWebhookSpec.ts @@ -6,8 +6,12 @@ import type * as Hume from "../../../index.js"; * URL and settings for a specific webhook to be posted to the server */ export interface PostedWebhookSpec { - /** Events this URL is subscribed to */ + /** + * The list of events the specified URL is subscribed to. + * + * See our [webhooks guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) for more information on supported events. + */ events: Hume.empathicVoice.PostedWebhookEventType[]; - /** URL to send the webhook to */ + /** The URL where event payloads will be sent. This must be a valid https URL to ensure secure communication. The server at this URL must accept POST requests with a JSON payload. */ url: string; } diff --git a/src/api/resources/empathicVoice/types/ResumeAssistantMessage.ts b/src/api/resources/empathicVoice/types/ResumeAssistantMessage.ts index c8492519..ff7af21b 100644 --- a/src/api/resources/empathicVoice/types/ResumeAssistantMessage.ts +++ b/src/api/resources/empathicVoice/types/ResumeAssistantMessage.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * Resume responses from EVI. Chat history sent while paused will now be sent. + * **Resume responses from EVI.** Chat history sent while paused will now be sent. + * + * Upon resuming, if any audio input was sent during the pause, EVI will retain context from all messages sent but only respond to the last user message. See our [Pause Response Guide](/docs/speech-to-speech-evi/features/pause-responses) for further details. */ export interface ResumeAssistantMessage { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/ReturnBuiltinTool.ts b/src/api/resources/empathicVoice/types/ReturnBuiltinTool.ts index 182aec88..23cf574b 100644 --- a/src/api/resources/empathicVoice/types/ReturnBuiltinTool.ts +++ b/src/api/resources/empathicVoice/types/ReturnBuiltinTool.ts @@ -6,9 +6,16 @@ import type * as Hume from "../../../index.js"; * A specific builtin tool version returned from the server */ export interface ReturnBuiltinTool { - /** Text to use if the tool fails to generate content. */ + /** Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. */ fallbackContent?: string; - /** Name applied to all versions of a particular Tool. */ + /** + * Name of the built-in tool to use. Hume supports the following built-in tools: + * + * - **web_search:** enables EVI to search the web for up-to-date information when applicable. + * - **hang_up:** closes the WebSocket connection when appropriate (e.g., after detecting a farewell in the conversation). + * + * For more information, see our guide on [using built-in tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). + */ name: string; toolType: Hume.empathicVoice.ReturnBuiltinToolToolType; } diff --git a/src/api/resources/empathicVoice/types/ReturnChat.ts b/src/api/resources/empathicVoice/types/ReturnChat.ts index 51ce9406..5fd4d225 100644 --- a/src/api/resources/empathicVoice/types/ReturnChat.ts +++ b/src/api/resources/empathicVoice/types/ReturnChat.ts @@ -6,18 +6,18 @@ import type * as Hume from "../../../index.js"; * A description of chat and its status */ export interface ReturnChat { - /** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */ + /** Identifier for the Chat Group. Any chat resumed from this Chat will have the same `chat_group_id`. Formatted as a UUID. */ chatGroupId: string; config?: Hume.empathicVoice.ReturnConfigSpec; - /** The timestamp when the chat ended, formatted as a Unix epoch milliseconds. */ + /** Time at which the Chat ended. Measured in seconds since the Unix epoch. */ endTimestamp?: number; /** The total number of events currently in this chat. */ eventCount?: number; - /** Identifier for a chat. Formatted as a UUID. */ + /** Identifier for a Chat. Formatted as a UUID. */ id: string; /** Stringified JSON with additional metadata about the chat. */ metadata?: string; - /** The timestamp when the chat started, formatted as a Unix epoch milliseconds. */ + /** Time at which the Chat started. Measured in seconds since the Unix epoch. */ startTimestamp: number; status: Hume.empathicVoice.ReturnChatStatus; } diff --git a/src/api/resources/empathicVoice/types/ReturnChatEvent.ts b/src/api/resources/empathicVoice/types/ReturnChatEvent.ts index 8a9865bc..c2a2f5db 100644 --- a/src/api/resources/empathicVoice/types/ReturnChatEvent.ts +++ b/src/api/resources/empathicVoice/types/ReturnChatEvent.ts @@ -6,20 +6,24 @@ import type * as Hume from "../../../index.js"; * A description of a single event in a chat returned from the server */ export interface ReturnChatEvent { - /** Identifier for the chat this event occurred in. Formatted as a UUID. */ + /** Identifier for the Chat this event occurred in. Formatted as a UUID. */ chatId: string; - /** Stringified JSON with data about emotional content/prosody of the event. */ + /** + * Stringified JSON containing the prosody model inference results. + * + * EVI uses the prosody model to measure 48 expressions related to speech and vocal characteristics. These results contain a detailed emotional and tonal analysis of the audio. Scores typically range from 0 to 1, with higher values indicating a stronger confidence level in the measured attribute. + */ emotionFeatures?: string; - /** Identifier for a chat event. Formatted as a UUID. */ + /** Identifier for a Chat Event. Formatted as a UUID. */ id: string; - /** The text of the chat message, either transcribed from speaker audio or generated by the agent. */ + /** The text of the Chat Event. This field contains the message content for each event type listed in the `type` field. */ messageText?: string; /** Stringified JSON with additional metadata about the chat event. */ metadata?: string; /** Identifier for a related chat event. Currently only seen on ASSISTANT_PROSODY events, to point back to the ASSISTANT_MESSAGE that generated these prosody scores */ relatedEventId?: string; role: Hume.empathicVoice.ReturnChatEventRole; - /** The timestamp when the chat event occurred, formatted as a Unix epoch milliseconds. */ + /** Time at which the Chat Event occurred. Measured in seconds since the Unix epoch. */ timestamp: number; type: Hume.empathicVoice.ReturnChatEventType; } diff --git a/src/api/resources/empathicVoice/types/ReturnChatGroup.ts b/src/api/resources/empathicVoice/types/ReturnChatGroup.ts index a8e718ee..f7db3293 100644 --- a/src/api/resources/empathicVoice/types/ReturnChatGroup.ts +++ b/src/api/resources/empathicVoice/types/ReturnChatGroup.ts @@ -7,15 +7,15 @@ import type * as Hume from "../../../index.js"; */ export interface ReturnChatGroup { active?: boolean; - /** The timestamp when the first chat in this chat group started, formatted as a Unix epoch milliseconds. */ + /** Time at which the first Chat in this Chat Group was created. Measured in seconds since the Unix epoch. */ firstStartTimestamp: number; - /** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */ + /** Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. */ id: string; - /** The chat_id of the most recent chat in this chat group. Formatted as a UUID. */ + /** The `chat_id` of the most recent Chat in this Chat Group. Formatted as a UUID. */ mostRecentChatId?: string; mostRecentConfig?: Hume.empathicVoice.ReturnConfigSpec; - /** The timestamp when the most recent chat in this chat group started, formatted as a Unix epoch milliseconds. */ + /** Time at which the most recent Chat in this Chat Group was created. Measured in seconds since the Unix epoch. */ mostRecentStartTimestamp: number; - /** The total number of chats in this chat group. */ + /** The total number of Chats associated with this Chat Group. */ numChats: number; } diff --git a/src/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.ts b/src/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.ts index 4033ae5b..3e1043cf 100644 --- a/src/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.ts +++ b/src/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.ts @@ -12,7 +12,11 @@ export interface ReturnChatGroupPagedAudioReconstructions { id: string; /** Total number of chats in this chatgroup */ numChats: number; - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. diff --git a/src/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.ts b/src/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.ts index 81e9ba93..589026f5 100644 --- a/src/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.ts +++ b/src/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.ts @@ -7,17 +7,21 @@ import type * as Hume from "../../../index.js"; */ export interface ReturnChatGroupPagedChats { active?: boolean; - /** List of chats and their metadata returned for the specified page number and page size. */ + /** List of Chats and their metadata returned for the specified `page_number` and `page_size`. */ chatsPage: Hume.empathicVoice.ReturnChat[]; - /** The timestamp when the first chat in this chat group started, formatted as a Unix epoch milliseconds. */ + /** Time at which the first Chat in this Chat Group was created. Measured in seconds since the Unix epoch. */ firstStartTimestamp: number; - /** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */ + /** Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. */ id: string; - /** The timestamp when the most recent chat in this chat group started, formatted as a Unix epoch milliseconds. */ + /** Time at which the most recent Chat in this Chat Group was created. Measured in seconds since the Unix epoch. */ mostRecentStartTimestamp: number; - /** The total number of chats in this chat group. */ + /** The total number of Chats associated with this Chat Group. */ numChats: number; - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. diff --git a/src/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.ts b/src/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.ts index 5c0af62c..f1879118 100644 --- a/src/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.ts +++ b/src/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.ts @@ -6,11 +6,15 @@ import type * as Hume from "../../../index.js"; * A paginated list of chat events that occurred across chats in this chat_group from the server */ export interface ReturnChatGroupPagedEvents { - /** List of chat_events returned for the specified page number and page size. */ + /** List of Chat Events for the specified `page_number` and `page_size`. */ eventsPage: Hume.empathicVoice.ReturnChatEvent[]; - /** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */ + /** Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. */ id: string; - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. diff --git a/src/api/resources/empathicVoice/types/ReturnChatPagedEvents.ts b/src/api/resources/empathicVoice/types/ReturnChatPagedEvents.ts index 75b4ddae..b8c810db 100644 --- a/src/api/resources/empathicVoice/types/ReturnChatPagedEvents.ts +++ b/src/api/resources/empathicVoice/types/ReturnChatPagedEvents.ts @@ -6,18 +6,22 @@ import type * as Hume from "../../../index.js"; * A description of chat status with a paginated list of chat events returned from the server */ export interface ReturnChatPagedEvents { - /** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */ + /** Identifier for the Chat Group. Any chat resumed from this Chat will have the same `chat_group_id`. Formatted as a UUID. */ chatGroupId: string; config?: Hume.empathicVoice.ReturnConfigSpec; - /** The timestamp when the chat ended, formatted as a Unix epoch milliseconds. */ + /** Time at which the Chat ended. Measured in seconds since the Unix epoch. */ endTimestamp?: number; - /** List of chat events with the specified page number and page size. */ + /** List of Chat Events for the specified `page_number` and `page_size`. */ eventsPage: Hume.empathicVoice.ReturnChatEvent[]; - /** Identifier for a chat. Formatted as a UUID. */ + /** Identifier for a Chat. Formatted as a UUID. */ id: string; /** Stringified JSON with additional metadata about the chat. */ metadata?: string; - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. @@ -26,7 +30,7 @@ export interface ReturnChatPagedEvents { */ pageSize: number; paginationDirection: Hume.empathicVoice.ReturnChatPagedEventsPaginationDirection; - /** The timestamp when the chat started, formatted as a Unix epoch milliseconds. */ + /** Time at which the Chat started. Measured in seconds since the Unix epoch. */ startTimestamp: number; status: Hume.empathicVoice.ReturnChatPagedEventsStatus; /** The total number of pages in the collection. */ diff --git a/src/api/resources/empathicVoice/types/ReturnConfig.ts b/src/api/resources/empathicVoice/types/ReturnConfig.ts index bca1809d..a737a884 100644 --- a/src/api/resources/empathicVoice/types/ReturnConfig.ts +++ b/src/api/resources/empathicVoice/types/ReturnConfig.ts @@ -6,29 +6,39 @@ import type * as Hume from "../../../index.js"; * A specific config version returned from the server */ export interface ReturnConfig { - /** List of built-in tools associated with this config */ + /** List of built-in tools associated with this Config. */ builtinTools?: (Hume.empathicVoice.ReturnBuiltinTool | undefined)[]; - /** The timestamp when the first version of this config was created. */ + /** Time at which the Config was created. Measured in seconds since the Unix epoch. */ createdOn?: number; ellmModel?: Hume.empathicVoice.ReturnEllmModel; eventMessages?: Hume.empathicVoice.ReturnEventMessageSpecs; - /** The version of the EVI used with this config. */ + /** + * Specifies the EVI version to use. See our [EVI Version Guide](/docs/speech-to-speech-evi/configuration/evi-version) for differences between versions. + * + * **We're officially sunsetting EVI versions 1 and 2 on August 30, 2025**. To keep things running smoothly, be sure to [migrate to EVI 3](/docs/speech-to-speech-evi/configuration/evi-version#migrating-to-evi-3) before then. + */ eviVersion?: string; /** Identifier for a Config. Formatted as a UUID. */ id?: string; languageModel?: Hume.empathicVoice.ReturnLanguageModel; - /** The timestamp when this version of the config was created. */ + /** Time at which the Config was last modified. Measured in seconds since the Unix epoch. */ modifiedOn?: number; /** Name applied to all versions of a particular Config. */ name?: string; nudges?: Hume.empathicVoice.ReturnNudgeSpec; prompt?: Hume.empathicVoice.ReturnPrompt; timeouts?: Hume.empathicVoice.ReturnTimeoutSpecs; - /** List of user-defined tools associated with this config. */ + /** List of user-defined tools associated with this Config. */ tools?: (Hume.empathicVoice.ReturnUserDefinedTool | undefined)[]; - /** Version number for a Config. Version numbers should be integers. The combination of configId and version number is unique. */ + /** + * Version number for a Config. + * + * Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number. + */ version?: number; - /** Description that is appended to a specific version of a Config. */ + /** An optional description of the Config version. */ versionDescription?: string; voice?: Hume.empathicVoice.ReturnVoice; /** Map of webhooks associated with this config. */ diff --git a/src/api/resources/empathicVoice/types/ReturnConfigSpec.ts b/src/api/resources/empathicVoice/types/ReturnConfigSpec.ts index 5e810722..a8033acf 100644 --- a/src/api/resources/empathicVoice/types/ReturnConfigSpec.ts +++ b/src/api/resources/empathicVoice/types/ReturnConfigSpec.ts @@ -1,11 +1,17 @@ // This file was auto-generated by Fern from our API Definition. /** - * An id/version number for a specific config version + * The Config associated with this Chat. */ export interface ReturnConfigSpec { /** Identifier for a Config. Formatted as a UUID. */ id: string; - /** Version number for a Config. Version numbers should be integers. The combination of configId and version number is unique. */ + /** + * Version number for a Config. + * + * Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. + * + * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number. + */ version?: number; } diff --git a/src/api/resources/empathicVoice/types/ReturnEllmModel.ts b/src/api/resources/empathicVoice/types/ReturnEllmModel.ts index 2e58a4db..080f61ad 100644 --- a/src/api/resources/empathicVoice/types/ReturnEllmModel.ts +++ b/src/api/resources/empathicVoice/types/ReturnEllmModel.ts @@ -4,6 +4,10 @@ * A specific eLLM Model configuration */ export interface ReturnEllmModel { - /** Boolean indicating if the model is allowed to generate short responses. */ + /** + * Boolean indicating if the eLLM is allowed to generate short responses. + * + * If omitted, short responses from the eLLM are enabled by default. + */ allowShortResponses: boolean; } diff --git a/src/api/resources/empathicVoice/types/ReturnEventMessageSpec.ts b/src/api/resources/empathicVoice/types/ReturnEventMessageSpec.ts index 8b8d119c..f2985170 100644 --- a/src/api/resources/empathicVoice/types/ReturnEventMessageSpec.ts +++ b/src/api/resources/empathicVoice/types/ReturnEventMessageSpec.ts @@ -4,8 +4,12 @@ * A specific event message configuration to be returned from the server */ export interface ReturnEventMessageSpec { - /** Boolean indicating if this event message is enabled. */ + /** + * Boolean indicating if this event message is enabled. + * + * If set to `true`, a message will be sent when the circumstances for the specific event are met. + */ enabled: boolean; - /** Optional text that will be used as a verbatim event message. If the text is null and the event message is enabled, the system will generate a message based using the language model. */ + /** Text to use as the event message when the corresponding event occurs. If no text is specified, EVI will generate an appropriate message based on its current context and the system prompt. */ text?: string; } diff --git a/src/api/resources/empathicVoice/types/ReturnEventMessageSpecs.ts b/src/api/resources/empathicVoice/types/ReturnEventMessageSpecs.ts index 4e359fa4..4cf927d2 100644 --- a/src/api/resources/empathicVoice/types/ReturnEventMessageSpecs.ts +++ b/src/api/resources/empathicVoice/types/ReturnEventMessageSpecs.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * Collection of event_message specs to be returned from the server + * Collection of event messages returned by the server. + * + * Event messages are sent by the server when specific events occur during a chat session. These messages are used to configure behaviors for EVI, such as controlling how EVI starts a new conversation. */ export interface ReturnEventMessageSpecs { onInactivityTimeout?: Hume.empathicVoice.ReturnEventMessageSpec; diff --git a/src/api/resources/empathicVoice/types/ReturnLanguageModel.ts b/src/api/resources/empathicVoice/types/ReturnLanguageModel.ts index 1f77a4b6..6bb08157 100644 --- a/src/api/resources/empathicVoice/types/ReturnLanguageModel.ts +++ b/src/api/resources/empathicVoice/types/ReturnLanguageModel.ts @@ -8,6 +8,10 @@ import type * as Hume from "../../../index.js"; export interface ReturnLanguageModel { modelProvider?: Hume.empathicVoice.ModelProviderEnum; modelResource?: Hume.empathicVoice.LanguageModelType; - /** Model temperature. */ + /** + * The model temperature, with values between 0 to 1 (inclusive). + * + * Controls the randomness of the LLM's output, with values closer to 0 yielding focused, deterministic responses and values closer to 1 producing more creative, diverse responses. + */ temperature?: number; } diff --git a/src/api/resources/empathicVoice/types/ReturnNudgeSpec.ts b/src/api/resources/empathicVoice/types/ReturnNudgeSpec.ts index 60d23fd2..8e5ac3a1 100644 --- a/src/api/resources/empathicVoice/types/ReturnNudgeSpec.ts +++ b/src/api/resources/empathicVoice/types/ReturnNudgeSpec.ts @@ -4,8 +4,8 @@ * A specific nudge configuration returned from the server */ export interface ReturnNudgeSpec { - /** EVI will nudge user after inactivity */ + /** If true, EVI will 'nudge' the user to speak after a determined interval of silence. */ enabled: boolean; - /** Time interval in seconds after which the nudge will be sent. */ + /** The interval of inactivity (in seconds) before a nudge is triggered. */ intervalSecs?: number; } diff --git a/src/api/resources/empathicVoice/types/ReturnPagedChatGroups.ts b/src/api/resources/empathicVoice/types/ReturnPagedChatGroups.ts index 51943ba9..122a4c13 100644 --- a/src/api/resources/empathicVoice/types/ReturnPagedChatGroups.ts +++ b/src/api/resources/empathicVoice/types/ReturnPagedChatGroups.ts @@ -6,9 +6,13 @@ import type * as Hume from "../../../index.js"; * A paginated list of chat_groups returned from the server */ export interface ReturnPagedChatGroups { - /** List of chat_groups and their metadata returned for the specified page number and page size. */ + /** List of Chat Groups and their metadata returned for the specified `page_number` and `page_size`. */ chatGroupsPage: Hume.empathicVoice.ReturnChatGroup[]; - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. diff --git a/src/api/resources/empathicVoice/types/ReturnPagedChats.ts b/src/api/resources/empathicVoice/types/ReturnPagedChats.ts index 4d5bdf7e..1f6fb061 100644 --- a/src/api/resources/empathicVoice/types/ReturnPagedChats.ts +++ b/src/api/resources/empathicVoice/types/ReturnPagedChats.ts @@ -6,9 +6,13 @@ import type * as Hume from "../../../index.js"; * A paginated list of chats returned from the server */ export interface ReturnPagedChats { - /** List of chats and their metadata returned for the specified page number and page size. */ + /** List of Chats and their metadata returned for the specified `page_number` and `page_size`. */ chatsPage: Hume.empathicVoice.ReturnChat[]; - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. diff --git a/src/api/resources/empathicVoice/types/ReturnPagedConfigs.ts b/src/api/resources/empathicVoice/types/ReturnPagedConfigs.ts index a1c48109..000d1062 100644 --- a/src/api/resources/empathicVoice/types/ReturnPagedConfigs.ts +++ b/src/api/resources/empathicVoice/types/ReturnPagedConfigs.ts @@ -6,9 +6,13 @@ import type * as Hume from "../../../index.js"; * A paginated list of config versions returned from the server */ export interface ReturnPagedConfigs { - /** List of prompts returned for the specified page number and page size. */ + /** List of configs returned for the specified `page_number` and `page_size`. */ configsPage?: Hume.empathicVoice.ReturnConfig[]; - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber?: number; /** * The maximum number of items returned per page. diff --git a/src/api/resources/empathicVoice/types/ReturnPagedPrompts.ts b/src/api/resources/empathicVoice/types/ReturnPagedPrompts.ts index 5ca80efb..79482900 100644 --- a/src/api/resources/empathicVoice/types/ReturnPagedPrompts.ts +++ b/src/api/resources/empathicVoice/types/ReturnPagedPrompts.ts @@ -6,7 +6,11 @@ import type * as Hume from "../../../index.js"; * A paginated list of prompt versions returned from the server */ export interface ReturnPagedPrompts { - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. @@ -14,7 +18,7 @@ export interface ReturnPagedPrompts { * This value corresponds to the `page_size` parameter specified in the request. */ pageSize: number; - /** List of prompts returned for the specified page number and page size. */ + /** List of prompts returned for the specified `page_number` and `page_size`. */ promptsPage: (Hume.empathicVoice.ReturnPrompt | undefined)[]; /** The total number of pages in the collection. */ totalPages: number; diff --git a/src/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.ts b/src/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.ts index 381f638e..e11099f8 100644 --- a/src/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.ts +++ b/src/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.ts @@ -6,7 +6,11 @@ import type * as Hume from "../../../index.js"; * A paginated list of user defined tool versions returned from the server */ export interface ReturnPagedUserDefinedTools { - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. @@ -14,7 +18,7 @@ export interface ReturnPagedUserDefinedTools { * This value corresponds to the `page_size` parameter specified in the request. */ pageSize: number; - /** List of tools returned for the specified page number and page size. */ + /** List of tools returned for the specified `page_number` and `page_size`. */ toolsPage: (Hume.empathicVoice.ReturnUserDefinedTool | undefined)[]; /** The total number of pages in the collection. */ totalPages: number; diff --git a/src/api/resources/empathicVoice/types/ReturnPrompt.ts b/src/api/resources/empathicVoice/types/ReturnPrompt.ts index e6c440d8..c2e3f126 100644 --- a/src/api/resources/empathicVoice/types/ReturnPrompt.ts +++ b/src/api/resources/empathicVoice/types/ReturnPrompt.ts @@ -4,19 +4,23 @@ * A specific prompt version returned from the server */ export interface ReturnPrompt { - /** The timestamp when the first version of this prompt was created. */ + /** Time at which the Prompt was created. Measured in seconds since the Unix epoch. */ createdOn: number; /** Identifier for a Prompt. Formatted as a UUID. */ id: string; - /** The timestamp when this version of the prompt was created. */ + /** Time at which the Prompt was last modified. Measured in seconds since the Unix epoch. */ modifiedOn: number; /** Name applied to all versions of a particular Prompt. */ name: string; - /** Text used for this version of the Prompt. */ + /** + * Instructions used to shape EVI's behavior, responses, and style. + * + * You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). + */ text: string; /** Version number for a Prompt. Version numbers should be integers. The combination of configId and version number is unique. */ version: number; - /** Description that is appended to a specific version of a Prompt. */ + /** An optional description of the Prompt version. */ versionDescription?: string; /** Indicates whether this prompt is using a fixed version number or auto-updating to the latest version. Values from the VersionType enum. */ versionType: string; diff --git a/src/api/resources/empathicVoice/types/ReturnTimeoutSpec.ts b/src/api/resources/empathicVoice/types/ReturnTimeoutSpec.ts index 9feda9fb..241557e6 100644 --- a/src/api/resources/empathicVoice/types/ReturnTimeoutSpec.ts +++ b/src/api/resources/empathicVoice/types/ReturnTimeoutSpec.ts @@ -4,8 +4,12 @@ * A specific timeout configuration to be returned from the server */ export interface ReturnTimeoutSpec { - /** Duration in seconds for the timeout. */ + /** Duration in seconds for the timeout (e.g. 600 seconds represents 10 minutes). */ durationSecs?: number; - /** Boolean indicating if this event message is enabled. */ + /** + * Boolean indicating if this timeout is enabled. + * + * If set to false, EVI will not timeout due to a specified duration being reached. However, the conversation will eventually disconnect after 1,800 seconds (30 minutes), which is the maximum WebSocket duration limit for EVI. + */ enabled: boolean; } diff --git a/src/api/resources/empathicVoice/types/ReturnTimeoutSpecs.ts b/src/api/resources/empathicVoice/types/ReturnTimeoutSpecs.ts index 02d9c486..7a61cef2 100644 --- a/src/api/resources/empathicVoice/types/ReturnTimeoutSpecs.ts +++ b/src/api/resources/empathicVoice/types/ReturnTimeoutSpecs.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * Collection of timeout specs to be returned from the server + * Collection of timeout specifications returned by the server. + * + * Timeouts are sent by the server when specific time-based events occur during a chat session. These specifications set the inactivity timeout and the maximum duration an EVI WebSocket connection can stay open before it is automatically disconnected. */ export interface ReturnTimeoutSpecs { inactivity: Hume.empathicVoice.ReturnTimeoutSpec; diff --git a/src/api/resources/empathicVoice/types/ReturnUserDefinedTool.ts b/src/api/resources/empathicVoice/types/ReturnUserDefinedTool.ts index 77a97058..c9192402 100644 --- a/src/api/resources/empathicVoice/types/ReturnUserDefinedTool.ts +++ b/src/api/resources/empathicVoice/types/ReturnUserDefinedTool.ts @@ -8,22 +8,33 @@ import type * as Hume from "../../../index.js"; export interface ReturnUserDefinedTool { /** The timestamp when the first version of this tool was created. */ createdOn: number; - /** Text describing what the tool does. */ + /** An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. */ description?: string; - /** Text to use if the tool fails to generate content. */ + /** Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. */ fallbackContent?: string; /** Identifier for a Tool. Formatted as a UUID. */ id: string; /** The timestamp when this version of the tool was created. */ modifiedOn: number; - /** Name applied to all versions of a particular Tool. */ + /** + * Name of the built-in tool to use. Hume supports the following built-in tools: + * + * - **web_search:** enables EVI to search the web for up-to-date information when applicable. + * - **hang_up:** closes the WebSocket connection when appropriate (e.g., after detecting a farewell in the conversation). + * + * For more information, see our guide on [using built-in tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). + */ name: string; - /** Stringified JSON defining the parameters used by this version of the Tool. */ + /** + * Stringified JSON defining the parameters used by this version of the Tool. + * + * These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. + */ parameters: string; toolType: Hume.empathicVoice.ReturnUserDefinedToolToolType; /** Version number for a Tool. Version numbers should be integers. The combination of configId and version number is unique. */ version: number; - /** Description that is appended to a specific version of a Tool. */ + /** An optional description of the Tool version. */ versionDescription?: string; versionType: Hume.empathicVoice.ReturnUserDefinedToolVersionType; } diff --git a/src/api/resources/empathicVoice/types/ReturnWebhookEventType.ts b/src/api/resources/empathicVoice/types/ReturnWebhookEventType.ts index b9081fbf..ec644636 100644 --- a/src/api/resources/empathicVoice/types/ReturnWebhookEventType.ts +++ b/src/api/resources/empathicVoice/types/ReturnWebhookEventType.ts @@ -1,6 +1,10 @@ // This file was auto-generated by Fern from our API Definition. -/** Events this URL is subscribed to */ +/** + * The list of events the specified URL is subscribed to. + * + * See our [webhooks guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) for more information on supported events. + */ export const ReturnWebhookEventType = { ChatStarted: "chat_started", ChatEnded: "chat_ended", diff --git a/src/api/resources/empathicVoice/types/ReturnWebhookSpec.ts b/src/api/resources/empathicVoice/types/ReturnWebhookSpec.ts index 2901c105..ee443faf 100644 --- a/src/api/resources/empathicVoice/types/ReturnWebhookSpec.ts +++ b/src/api/resources/empathicVoice/types/ReturnWebhookSpec.ts @@ -6,8 +6,12 @@ import type * as Hume from "../../../index.js"; * Collection of webhook URL endpoints to be returned from the server */ export interface ReturnWebhookSpec { - /** Events this URL is subscribed to */ + /** + * The list of events the specified URL is subscribed to. + * + * See our [webhooks guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) for more information on supported events. + */ events: Hume.empathicVoice.ReturnWebhookEventType[]; - /** Webhook URL to send the event updates to */ + /** The URL where event payloads will be sent. This must be a valid https URL to ensure secure communication. The server at this URL must accept POST requests with a JSON payload. */ url: string; } diff --git a/src/api/resources/empathicVoice/types/SessionSettings.ts b/src/api/resources/empathicVoice/types/SessionSettings.ts index 121f618e..18888a3b 100644 --- a/src/api/resources/empathicVoice/types/SessionSettings.ts +++ b/src/api/resources/empathicVoice/types/SessionSettings.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * Settings for this chat session. + * **Settings for this chat session.** Session settings are temporary and apply only to the current Chat session. + * + * These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience. See our [Session Settings Guide](/docs/speech-to-speech-evi/configuration/session-settings) for a complete list of configurable settings. */ export interface SessionSettings { /** @@ -21,11 +23,11 @@ export interface SessionSettings { */ builtinTools?: Hume.empathicVoice.BuiltinToolConfig[]; /** - * Allows developers to inject additional context into the conversation, which is appended to the end of user messages for the session. + * Field for injecting additional context into the conversation, which is appended to the end of user messages for the session. * * When included in a Session Settings message, the provided context can be used to remind the LLM of its role in every user message, prevent it from forgetting important details, or add new relevant information to the conversation. * - * Set to `null` to disable context injection. + * Set to `null` to clear injected context. */ context?: Hume.empathicVoice.Context; /** @@ -67,7 +69,14 @@ export interface SessionSettings { * For more information, please refer to the [Session Settings section](/docs/empathic-voice-interface-evi/configuration#session-settings) on the EVI Configuration page. */ type: "session_settings"; - /** Dynamic values that can be used to populate EVI prompts. */ + /** + * This field allows you to assign values to dynamic variables referenced in your system prompt. + * + * Each key represents the variable name, and the corresponding value is the specific content you wish to assign to that variable within the session. While the values for variables can be strings, numbers, or booleans, the value will ultimately be converted to a string when injected into your system prompt. + * + * Using this field, you can personalize responses based on session-specific details. For more guidance, see our [guide on using dynamic variables](/docs/speech-to-speech-evi/features/dynamic-variables). + */ variables?: Record; + /** Allows you to change the voice during an active chat. Updating the voice does not affect chat context or conversation history. */ voiceId?: string; } diff --git a/src/api/resources/empathicVoice/types/ToolCallMessage.ts b/src/api/resources/empathicVoice/types/ToolCallMessage.ts index b66a143a..5738686c 100644 --- a/src/api/resources/empathicVoice/types/ToolCallMessage.ts +++ b/src/api/resources/empathicVoice/types/ToolCallMessage.ts @@ -3,14 +3,20 @@ import type * as Hume from "../../../index.js"; /** - * When provided, the output is a tool call. + * **Indicates that the supplemental LLM has detected a need to invoke the specified tool.** This message is only received for user-defined function tools. + * + * Contains the tool name, parameters (as a stringified JSON schema), whether a response is required from the developer (either in the form of a `ToolResponseMessage` or a `ToolErrorMessage`), the unique tool call ID for tracking the request and response, and the tool type. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */ export interface ToolCallMessage { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ customSessionId?: string; /** Name of the tool called. */ name: string; - /** Parameters of the tool call. Is a stringified JSON schema. */ + /** + * Parameters of the tool. + * + * These parameters define the inputs needed for the tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the tool receives data in the expected format. + */ parameters: string; /** Indicates whether a response to the tool call is required from the developer, either in the form of a [Tool Response message](/reference/empathic-voice-interface-evi/chat/chat#send.Tool%20Response%20Message.type) or a [Tool Error message](/reference/empathic-voice-interface-evi/chat/chat#send.Tool%20Error%20Message.type). */ responseRequired: boolean; diff --git a/src/api/resources/empathicVoice/types/ToolErrorMessage.ts b/src/api/resources/empathicVoice/types/ToolErrorMessage.ts index 5d6cd90b..fa283e43 100644 --- a/src/api/resources/empathicVoice/types/ToolErrorMessage.ts +++ b/src/api/resources/empathicVoice/types/ToolErrorMessage.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * When provided, the output is a function call error. + * **Error message from the tool call**, not exposed to the LLM or user. Upon receiving a Tool Call message and failing to invoke the function, this message is sent to notify EVI of the tool's failure. + * + * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage` if the tool fails. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */ export interface ToolErrorMessage { /** Error code. Identifies the type of error encountered. */ diff --git a/src/api/resources/empathicVoice/types/ToolResponseMessage.ts b/src/api/resources/empathicVoice/types/ToolResponseMessage.ts index 305fc085..39f444f6 100644 --- a/src/api/resources/empathicVoice/types/ToolResponseMessage.ts +++ b/src/api/resources/empathicVoice/types/ToolResponseMessage.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * When provided, the output is a function call response. + * **Return value of the tool call.** Contains the output generated by the tool to pass back to EVI. Upon receiving a Tool Call message and successfully invoking the function, this message is sent to convey the result of the function call back to EVI. + * + * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage`. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */ export interface ToolResponseMessage { /** Return value of the tool call. Contains the output generated by the tool to pass back to EVI. */ diff --git a/src/api/resources/empathicVoice/types/UserInput.ts b/src/api/resources/empathicVoice/types/UserInput.ts index 267a7a04..0cb7d172 100644 --- a/src/api/resources/empathicVoice/types/UserInput.ts +++ b/src/api/resources/empathicVoice/types/UserInput.ts @@ -1,7 +1,7 @@ // This file was auto-generated by Fern from our API Definition. /** - * User text to insert into the conversation. Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response. + * **User text to insert into the conversation.** Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response. * * Expression measurement results are not available for User Input messages, as the prosody model relies on audio input and cannot process text alone. */ diff --git a/src/api/resources/empathicVoice/types/UserInterruption.ts b/src/api/resources/empathicVoice/types/UserInterruption.ts index 9b701b5e..8b299bb1 100644 --- a/src/api/resources/empathicVoice/types/UserInterruption.ts +++ b/src/api/resources/empathicVoice/types/UserInterruption.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * When provided, the output is an interruption. + * **Indicates the user has interrupted the assistant's response.** EVI detects the interruption in real-time and sends this message to signal the interruption event. + * + * This message allows the system to stop the current audio playback, clear the audio queue, and prepare to handle new user input. Contains a Unix timestamp of when the user interruption was detected. For more details, see our [Interruptibility Guide](/docs/speech-to-speech-evi/features/interruptibility) */ export interface UserInterruption { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/UserMessage.ts b/src/api/resources/empathicVoice/types/UserMessage.ts index 18dd4c98..c5ebd407 100644 --- a/src/api/resources/empathicVoice/types/UserMessage.ts +++ b/src/api/resources/empathicVoice/types/UserMessage.ts @@ -3,7 +3,9 @@ import type * as Hume from "../../../index.js"; /** - * When provided, the output is a user message. + * **Transcript of the user's message.** Contains the message role and content, along with a `from_text` field indicating if this message was inserted into the conversation as text from a `UserInput` message. + * + * Includes an `interim` field indicating whether the transcript is provisional (words may be repeated or refined in subsequent `UserMessage` responses as additional audio is processed) or final and complete. Interim transcripts are only sent when the `verbose_transcription` query parameter is set to true in the initial handshake. */ export interface UserMessage { /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */ diff --git a/src/api/resources/empathicVoice/types/VoiceId.ts b/src/api/resources/empathicVoice/types/VoiceId.ts index 5a2596cf..c5a1561b 100644 --- a/src/api/resources/empathicVoice/types/VoiceId.ts +++ b/src/api/resources/empathicVoice/types/VoiceId.ts @@ -8,7 +8,7 @@ export interface VoiceId { /** * Specifies the source provider associated with the chosen voice. * - * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/voices), containing a variety of preset, shared voices. + * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/tts/voice-library), containing a variety of preset, shared voices. * - **`CUSTOM_VOICE`**: Select from voices you've personally generated and saved in your account. * * If no provider is explicitly set, the default provider is `CUSTOM_VOICE`. When using voices from Hume's **Voice Library**, you must explicitly set the provider to `HUME_AI`. diff --git a/src/api/resources/empathicVoice/types/VoiceName.ts b/src/api/resources/empathicVoice/types/VoiceName.ts index fd292d68..29201087 100644 --- a/src/api/resources/empathicVoice/types/VoiceName.ts +++ b/src/api/resources/empathicVoice/types/VoiceName.ts @@ -8,7 +8,7 @@ export interface VoiceName { /** * Specifies the source provider associated with the chosen voice. * - * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/voices), containing a variety of preset, shared voices. + * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/tts/voice-library), containing a variety of preset, shared voices. * - **`CUSTOM_VOICE`**: Select from voices you've personally generated and saved in your account. * * If no provider is explicitly set, the default provider is `CUSTOM_VOICE`. When using voices from Hume's **Voice Library**, you must explicitly set the provider to `HUME_AI`. diff --git a/src/api/resources/empathicVoice/types/WebSocketError.ts b/src/api/resources/empathicVoice/types/WebSocketError.ts index 9864cf83..850b6b2d 100644 --- a/src/api/resources/empathicVoice/types/WebSocketError.ts +++ b/src/api/resources/empathicVoice/types/WebSocketError.ts @@ -1,7 +1,9 @@ // This file was auto-generated by Fern from our API Definition. /** - * When provided, the output is an error message. + * **Indicates a disruption in the WebSocket connection**, such as an unexpected disconnection, protocol error, or data transmission issue. + * + * Contains an error code identifying the type of error encountered, a detailed description of the error, and a short, human-readable identifier and description (slug) for the error. */ export interface WebSocketError { /** Error code. Identifies the type of error encountered. */ diff --git a/src/api/resources/empathicVoice/types/WebhookEventChatEnded.ts b/src/api/resources/empathicVoice/types/WebhookEventChatEnded.ts index 1371f1fc..d34231fa 100644 --- a/src/api/resources/empathicVoice/types/WebhookEventChatEnded.ts +++ b/src/api/resources/empathicVoice/types/WebhookEventChatEnded.ts @@ -15,4 +15,6 @@ export interface WebhookEventChatEnded extends Hume.empathicVoice.WebhookEventBa endTime: number; /** Always `chat_ended`. */ eventName?: "chat_ended"; + /** Twilio metadata associated with the chat. This field is included only if the Chat was created via the [Twilio phone calling](/docs/empathic-voice-interface-evi/phone-calling) integration. Fields may include `call_sid`, `account_sid`, `from_number`, `to_number`, `caller_name`, `caller_number`, `from_city`, `from_state`, `from_zip`, `from_country`, `to_city`, `to_state`, `to_zip`, and `to_country`.If a specific metadata is not available, this field will be set to an empty string. */ + twilioMetadata?: Record; } diff --git a/src/api/resources/empathicVoice/types/WebhookEventChatStarted.ts b/src/api/resources/empathicVoice/types/WebhookEventChatStarted.ts index 8e36eeb9..155ddb01 100644 --- a/src/api/resources/empathicVoice/types/WebhookEventChatStarted.ts +++ b/src/api/resources/empathicVoice/types/WebhookEventChatStarted.ts @@ -13,4 +13,6 @@ export interface WebhookEventChatStarted extends Hume.empathicVoice.WebhookEvent eventName?: "chat_started"; /** Unix timestamp (in milliseconds) indicating when the session started. */ startTime: number; + /** Twilio metadata associated with the chat. This field is included only if the Chat was created via the [Twilio phone calling](/docs/empathic-voice-interface-evi/phone-calling) integration. Fields may include `call_sid`, `account_sid`, `from_number`, `to_number`, `caller_name`, `caller_number`, `from_city`, `from_state`, `from_zip`, `from_country`, `to_city`, `to_state`, `to_zip`, and `to_country`. If a specific metadata is not available, this field will be set to an empty string. */ + twilioMetadata?: Record; } diff --git a/src/api/resources/empathicVoice/types/WebhookEventToolCall.ts b/src/api/resources/empathicVoice/types/WebhookEventToolCall.ts index 4fcc3f58..03e5ad45 100644 --- a/src/api/resources/empathicVoice/types/WebhookEventToolCall.ts +++ b/src/api/resources/empathicVoice/types/WebhookEventToolCall.ts @@ -13,4 +13,6 @@ export interface WebhookEventToolCall extends Hume.empathicVoice.WebhookEventBas timestamp: number; /** The tool call. */ toolCallMessage: Hume.empathicVoice.ToolCallMessage; + /** Twilio metadata associated with the chat. This field is included only if the Chat was created via the [Twilio phone calling](/docs/empathic-voice-interface-evi/phone-calling) integration. Fields may include `call_sid`, `account_sid`, `from_number`, `to_number`, `caller_name`, `caller_number`, `from_city`, `from_state`, `from_zip`, `from_country`, `to_city`, `to_state`, `to_zip`, and `to_country`.If a specific metadata is not available, this field will be set to an empty string. */ + twilioMetadata?: Record; } diff --git a/src/api/resources/tts/resources/streamInput/client/Client.ts.diff b/src/api/resources/tts/resources/streamInput/client/Client.ts.diff deleted file mode 100644 index 1b74ccfa..00000000 --- a/src/api/resources/tts/resources/streamInput/client/Client.ts.diff +++ /dev/null @@ -1,140 +0,0 @@ -diff --git a/src/api/resources/tts/resources/streamInput/client/Client.ts b/src/api/resources/tts/resources/streamInput/client/Client.ts -index e8477c1..4e3ef08 100644 ---- a/src/api/resources/tts/resources/streamInput/client/Client.ts -+++ b/src/api/resources/tts/resources/streamInput/client/Client.ts -@@ -2,7 +2,6 @@ - - import type { BaseClientOptions } from "../../../../../../BaseClient.js"; - import { type NormalizedClientOptions, normalizeClientOptions } from "../../../../../../BaseClient.js"; --import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.js"; - import * as core from "../../../../../../core/index.js"; - import * as environments from "../../../../../../environments.js"; - import * as serializers from "../../../../../../serialization/index.js"; -@@ -10,7 +9,7 @@ import type * as Hume from "../../../../../index.js"; - import { StreamInputSocket } from "./Socket.js"; - - export declare namespace StreamInputClient { -- export interface Options extends BaseClientOptions {} -+ export type Options = BaseClientOptions; - - export interface ConnectArgs { - accessToken?: string; -@@ -53,70 +52,42 @@ export class StreamInputClient { - debug, - reconnectAttempts, - } = args; -- const _queryParams: Record = {}; -- if (accessToken != null) { -- _queryParams.access_token = accessToken; -- } -- -- if (contextGenerationId != null) { -- _queryParams.context_generation_id = contextGenerationId; -- } -- -- if (formatType != null) { -- _queryParams.format_type = serializers.tts.AudioFormatType.jsonOrThrow(formatType, { -- unrecognizedObjectKeys: "strip", -- omitUndefined: true, -- }); -- } -- -- if (includeTimestampTypes != null) { -- if (Array.isArray(includeTimestampTypes)) { -- _queryParams.include_timestamp_types = includeTimestampTypes.map((item) => -- serializers.tts.TimestampType.jsonOrThrow(item, { -+ const _queryParams: Record = { -+ access_token: accessToken, -+ context_generation_id: contextGenerationId, -+ format_type: -+ formatType != null -+ ? serializers.tts.AudioFormatType.jsonOrThrow(formatType, { -+ unrecognizedObjectKeys: "strip", -+ omitUndefined: true, -+ }) -+ : undefined, -+ include_timestamp_types: Array.isArray(includeTimestampTypes) -+ ? includeTimestampTypes.map((item) => -+ serializers.tts.TimestampType.jsonOrThrow(item, { -+ unrecognizedObjectKeys: "strip", -+ omitUndefined: true, -+ }), -+ ) -+ : includeTimestampTypes != null -+ ? serializers.tts.TimestampType.jsonOrThrow(includeTimestampTypes, { - unrecognizedObjectKeys: "strip", - omitUndefined: true, -- }), -- ); -- } else { -- _queryParams.include_timestamp_types = serializers.tts.TimestampType.jsonOrThrow( -- includeTimestampTypes, -- { -- unrecognizedObjectKeys: "strip", -- omitUndefined: true, -- }, -- ); -- } -- } -- -- if (instantMode != null) { -- _queryParams.instant_mode = instantMode.toString(); -- } -- -- if (noBinary != null) { -- _queryParams.no_binary = noBinary.toString(); -- } -- -- if (stripHeaders != null) { -- _queryParams.strip_headers = stripHeaders.toString(); -- } -- -- if (version != null) { -- _queryParams.version = serializers.tts.OctaveVersion.jsonOrThrow(version, { -- unrecognizedObjectKeys: "strip", -- omitUndefined: true, -- }); -- } -- -- if (apiKey != null) { -- _queryParams.api_key = apiKey; -- } -- -- const _headers: Record = mergeHeaders( -- mergeOnlyDefinedHeaders({ -- ...(await this._getCustomAuthorizationHeaders()), -- }), -- headers, -- ); -+ }) -+ : undefined, -+ instant_mode: instantMode, -+ no_binary: noBinary, -+ strip_headers: stripHeaders, -+ version: -+ version != null -+ ? serializers.tts.OctaveVersion.jsonOrThrow(version, { -+ unrecognizedObjectKeys: "strip", -+ omitUndefined: true, -+ }) -+ : undefined, -+ api_key: apiKey, -+ }; -+ const _headers: Record = { ...headers }; - const socket = new core.ReconnectingWebSocket({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? -@@ -130,13 +101,4 @@ export class StreamInputClient { - }); - return new StreamInputSocket({ socket }); - } -- -- protected async _getCustomAuthorizationHeaders(): Promise> { -- const apiKeyValue = core.Supplier.get(this._options.apiKey); -- // This `authHeaderValue` is manually added as if you don't provide it it will -- // be omitted from the headers which means it won't reach the logic in ws.ts that -- // extracts values from the headers and adds them to query parameters. -- const authHeaderValue = core.Supplier.get(this._options.headers?.authorization); -- return { "X-Hume-Api-Key": apiKeyValue, Authorization: authHeaderValue }; -- } - } diff --git a/src/api/resources/tts/resources/voices/client/Client.ts b/src/api/resources/tts/resources/voices/client/Client.ts index a31a13ec..804e92e9 100644 --- a/src/api/resources/tts/resources/voices/client/Client.ts +++ b/src/api/resources/tts/resources/voices/client/Client.ts @@ -24,7 +24,7 @@ export class VoicesClient { } /** - * Lists voices you have saved in your account, or voices from the [Voice Library](https://app.hume.ai/voices). + * Lists voices you have saved in your account, or voices from the [Voice Library](https://app.hume.ai/tts/voice-library). * * @param {Hume.tts.VoicesListRequest} request * @param {VoicesClient.RequestOptions} requestOptions - Request-specific configuration. diff --git a/src/api/resources/tts/resources/voices/client/requests/VoicesListRequest.ts b/src/api/resources/tts/resources/voices/client/requests/VoicesListRequest.ts index ccef8a6a..80c938f9 100644 --- a/src/api/resources/tts/resources/voices/client/requests/VoicesListRequest.ts +++ b/src/api/resources/tts/resources/voices/client/requests/VoicesListRequest.ts @@ -12,7 +12,7 @@ export interface VoicesListRequest { /** * Specify the voice provider to filter voices returned by the endpoint: * - * - **`HUME_AI`**: Lists preset, shared voices from Hume's [Voice Library](https://app.hume.ai/voices). + * - **`HUME_AI`**: Lists preset, shared voices from Hume's [Voice Library](https://app.hume.ai/tts/voice-library). * - **`CUSTOM_VOICE`**: Lists custom voices created and saved to your account. */ provider: Hume.tts.VoiceProvider; diff --git a/src/api/resources/tts/types/PostedUtteranceVoiceWithId.ts b/src/api/resources/tts/types/PostedUtteranceVoiceWithId.ts index 79cb47fa..9f0312da 100644 --- a/src/api/resources/tts/types/PostedUtteranceVoiceWithId.ts +++ b/src/api/resources/tts/types/PostedUtteranceVoiceWithId.ts @@ -8,7 +8,7 @@ export interface PostedUtteranceVoiceWithId { /** * Specifies the source provider associated with the chosen voice. * - * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/voices), containing a variety of preset, shared voices. + * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/tts/voice-library), containing a variety of preset, shared voices. * - **`CUSTOM_VOICE`**: Select from voices you've personally generated and saved in your account. * * If no provider is explicitly set, the default provider is `CUSTOM_VOICE`. When using voices from Hume's **Voice Library**, you must explicitly set the provider to `HUME_AI`. diff --git a/src/api/resources/tts/types/PostedUtteranceVoiceWithName.ts b/src/api/resources/tts/types/PostedUtteranceVoiceWithName.ts index 09a44f3d..c84268d0 100644 --- a/src/api/resources/tts/types/PostedUtteranceVoiceWithName.ts +++ b/src/api/resources/tts/types/PostedUtteranceVoiceWithName.ts @@ -8,7 +8,7 @@ export interface PostedUtteranceVoiceWithName { /** * Specifies the source provider associated with the chosen voice. * - * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/voices), containing a variety of preset, shared voices. + * - **`HUME_AI`**: Select voices from Hume's [Voice Library](https://app.hume.ai/tts/voice-library), containing a variety of preset, shared voices. * - **`CUSTOM_VOICE`**: Select from voices you've personally generated and saved in your account. * * If no provider is explicitly set, the default provider is `CUSTOM_VOICE`. When using voices from Hume's **Voice Library**, you must explicitly set the provider to `HUME_AI`. diff --git a/src/api/resources/tts/types/ReturnPagedVoices.ts b/src/api/resources/tts/types/ReturnPagedVoices.ts index e5e5e886..c65abc5a 100644 --- a/src/api/resources/tts/types/ReturnPagedVoices.ts +++ b/src/api/resources/tts/types/ReturnPagedVoices.ts @@ -6,7 +6,11 @@ import type * as Hume from "../../../index.js"; * A paginated list Octave voices available for text-to-speech */ export interface ReturnPagedVoices { - /** The page number of the returned results. */ + /** + * The page number of the returned list. + * + * This value corresponds to the `page_number` parameter specified in the request. Pagination uses zero-based indexing. + */ pageNumber: number; /** * The maximum number of items returned per page. diff --git a/src/auth/HeaderAuthProvider.ts.diff b/src/auth/HeaderAuthProvider.ts.diff deleted file mode 100644 index 4790eb75..00000000 --- a/src/auth/HeaderAuthProvider.ts.diff +++ /dev/null @@ -1,96 +0,0 @@ -diff --git a/src/auth/HeaderAuthProvider.ts b/src/auth/HeaderAuthProvider.ts -index 8089bcc..83c2e42 100644 ---- a/src/auth/HeaderAuthProvider.ts -+++ b/src/auth/HeaderAuthProvider.ts -@@ -1,24 +1,10 @@ --/** -- * THIS FILE IS MANUALLY MAINTAINED: see .fernignore -- * -- * Custom HeaderAuthProvider that supports both apiKey and accessToken authentication. -- * When accessToken is provided to HumeClient, the wrapper converts it to an -- * Authorization: Bearer header. This provider checks for both apiKey and the -- * Authorization header to support both auth methods. -- */ -+// This file was auto-generated by Fern from our API Definition. - - import * as core from "../core/index.js"; - import * as errors from "../errors/index.js"; - --export namespace HeaderAuthProvider { -- export type AuthOptions = { -- apiKey?: core.Supplier; -- }; -- -- export type Options = { -- headers?: Record | null | undefined>; -- } & AuthOptions; --} -+const PARAM_KEY = "apiKey" as const; -+const HEADER_NAME = "X-Hume-Api-Key" as const; - - export class HeaderAuthProvider implements core.AuthProvider { - private readonly options: HeaderAuthProvider.Options; -@@ -27,37 +13,36 @@ export class HeaderAuthProvider implements core.AuthProvider { - this.options = options; - } - -- public static canCreate(options: HeaderAuthProvider.Options): boolean { -- return options.apiKey != null || HeaderAuthProvider.hasAuthorizationHeader(options.headers); -- } -- -- private static hasAuthorizationHeader( -- headers: Record | null | undefined> | undefined, -- ): boolean { -- if (!headers) return false; -- return Object.keys(headers).some((key) => key.toLowerCase() === "authorization"); -+ public static canCreate(options: Partial): boolean { -+ return options?.[PARAM_KEY] != null; - } - -- public async getAuthRequest(_arg?: { endpointMetadata?: core.EndpointMetadata }): Promise { -- // Check apiKey first (preferred method) -- const apiKey = await core.Supplier.get(this.options.apiKey); -- if (apiKey != null) { -- return { headers: { "X-Hume-Api-Key": apiKey } }; -+ public async getAuthRequest({ -+ endpointMetadata, -+ }: { -+ endpointMetadata?: core.EndpointMetadata; -+ } = {}): Promise { -+ const headerValue = await core.Supplier.get(this.options[PARAM_KEY]); -+ if (headerValue == null) { -+ throw new errors.HumeError({ -+ message: HeaderAuthProvider.AUTH_CONFIG_ERROR_MESSAGE, -+ }); - } - -- // Check for Authorization header (from accessToken) -- if (this.options.headers) { -- const authKey = Object.keys(this.options.headers).find((key) => key.toLowerCase() === "authorization"); -- if (authKey) { -- const authValue = await core.Supplier.get(this.options.headers[authKey]); -- if (authValue != null) { -- return { headers: { Authorization: authValue } }; -- } -- } -- } -+ return { -+ headers: { [HEADER_NAME]: headerValue }, -+ }; -+ } -+} - -- throw new errors.HumeError({ -- message: "Please provide either 'apiKey' or 'accessToken' when initializing the client", -- }); -+export namespace HeaderAuthProvider { -+ export const AUTH_SCHEME = "HeaderAuthScheme" as const; -+ export const AUTH_CONFIG_ERROR_MESSAGE: string = -+ `Please provide '${PARAM_KEY}' when initializing the client` as const; -+ export type Options = AuthOptions; -+ export type AuthOptions = { [PARAM_KEY]: core.Supplier }; -+ -+ export function createInstance(options: Options): core.AuthProvider { -+ return new HeaderAuthProvider(options); - } - } diff --git a/src/core/fetcher/Supplier.ts.diff b/src/core/fetcher/Supplier.ts.diff deleted file mode 100644 index 2700e2d3..00000000 --- a/src/core/fetcher/Supplier.ts.diff +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/core/fetcher/Supplier.ts b/src/core/fetcher/Supplier.ts -index aa95dd8..867c931 100644 ---- a/src/core/fetcher/Supplier.ts -+++ b/src/core/fetcher/Supplier.ts -@@ -1,19 +1,11 @@ --/** THIS FILE IS MANUALLY MAINAINED: see .fernignore */ --export type Supplier = T | (() => T); -+export type Supplier = T | Promise | (() => T | Promise); - - export const Supplier = { -- get: (supplier: Supplier): T => { -+ get: async (supplier: Supplier): Promise => { - if (typeof supplier === "function") { - return (supplier as () => T)(); - } else { - return supplier; - } - }, -- map: (supplier: Supplier, f: (value: T) => R): Supplier => { -- if (typeof supplier === "function") { -- return () => f(Supplier.get(supplier)); -- } else { -- return f(supplier); -- } -- }, - }; diff --git a/src/core/websocket/ws.ts.diff b/src/core/websocket/ws.ts.diff deleted file mode 100644 index ee301b08..00000000 --- a/src/core/websocket/ws.ts.diff +++ /dev/null @@ -1,146 +0,0 @@ -diff --git a/src/core/websocket/ws.ts b/src/core/websocket/ws.ts -index 9a16477..6089558 100644 ---- a/src/core/websocket/ws.ts -+++ b/src/core/websocket/ws.ts -@@ -3,7 +3,6 @@ import { WebSocket as NodeWebSocket } from "ws"; - import { RUNTIME } from "../runtime/index.js"; - import { toQueryString } from "../url/qs.js"; - import * as Events from "./events.js"; --import { SDK_VERSION } from "../../version.js"; - - const getGlobalWebSocket = (): WebSocket | undefined => { - if (typeof WebSocket !== "undefined") { -@@ -30,7 +29,7 @@ export declare namespace ReconnectingWebSocket { - protocols?: string | string[]; - options?: ReconnectingWebSocket.Options; - headers?: Record; -- queryParameters?: Record; -+ queryParameters?: Record; - } - - export type Options = { -@@ -70,49 +69,6 @@ const DEFAULT_OPTIONS = { - debug: false, - }; - --function addApiKeyFromHeader({ -- headers, -- queryParameters, --}: { -- headers: Record | undefined; -- queryParameters: Record | undefined; --}) { -- const apiKeyValue = Object.entries(headers ?? {}).find(([k]) => k.toLowerCase() === "x-hume-api-key")?.[1]; -- if (apiKeyValue && !queryParameters?.["api_key"]) { -- return { ...queryParameters, api_key: apiKeyValue }; -- } -- return queryParameters; --} -- --function addAccessTokenFromHeader({ -- headers, -- queryParameters, --}: { -- headers: Record | undefined; -- queryParameters: Record | undefined; --}) { -- const authHeaderValue = headers?.["Authorization"] || headers?.["authorization"]; -- if (!authHeaderValue) { -- return queryParameters; -- } -- if (!authHeaderValue.startsWith("Bearer ")) { -- return queryParameters; -- } -- if (queryParameters?.["access_token"]) { -- return queryParameters; -- } -- const token = authHeaderValue.substring("Bearer ".length); -- return { ...queryParameters, access_token: token }; --} -- --function addSdkTracking(queryParameters: Record | undefined) { -- return { -- ...queryParameters, -- fernSdkLanguage: "JavaScript", -- fernSdkVersion: SDK_VERSION, -- }; --} -- - export class ReconnectingWebSocket { - private _ws?: WebSocket; - private _listeners: ReconnectingWebSocket.ListenersMap = { -@@ -141,47 +97,22 @@ export class ReconnectingWebSocket { - this._protocols = protocols; - this._options = options ?? DEFAULT_OPTIONS; - this._headers = headers; -- this._queryParameters = addSdkTracking( -- addAccessTokenFromHeader({ -- headers, -- queryParameters: addApiKeyFromHeader({ -- headers, -- queryParameters, -- }), -- }), -- ); -- -+ this._queryParameters = queryParameters; - if (this._options.startClosed) { - this._shouldReconnect = false; - } - this._connect(); - } - -- static get CONNECTING() { -- return 0; -- } -- static get OPEN() { -- return 1; -- } -- static get CLOSING() { -- return 2; -- } -- static get CLOSED() { -- return 3; -- } -+ public static readonly CONNECTING = 0; -+ public static readonly OPEN = 1; -+ public static readonly CLOSING = 2; -+ public static readonly CLOSED = 3; - -- get CONNECTING(): number { -- return ReconnectingWebSocket.CONNECTING; -- } -- get OPEN(): number { -- return ReconnectingWebSocket.OPEN; -- } -- get CLOSING(): number { -- return ReconnectingWebSocket.CLOSING; -- } -- get CLOSED(): number { -- return ReconnectingWebSocket.CLOSED; -- } -+ public readonly CONNECTING: typeof ReconnectingWebSocket.CONNECTING = ReconnectingWebSocket.CONNECTING; -+ public readonly OPEN: typeof ReconnectingWebSocket.OPEN = ReconnectingWebSocket.OPEN; -+ public readonly CLOSING: typeof ReconnectingWebSocket.CLOSING = ReconnectingWebSocket.CLOSING; -+ public readonly CLOSED: typeof ReconnectingWebSocket.CLOSED = ReconnectingWebSocket.CLOSED; - - get binaryType() { - return this._ws ? this._ws.binaryType : this._binaryType; -@@ -383,7 +314,7 @@ export class ReconnectingWebSocket { - } = this._options; - let delay = 0; - if (this._retryCount > 0) { -- delay = minReconnectionDelay * Math.pow(reconnectionDelayGrowFactor, this._retryCount - 1); -+ delay = minReconnectionDelay * reconnectionDelayGrowFactor ** (this._retryCount - 1); - if (delay > maxReconnectionDelay) { - delay = maxReconnectionDelay; - } -@@ -478,7 +409,7 @@ export class ReconnectingWebSocket { - try { - this._ws.close(code, reason); - this._handleClose(new Events.CloseEvent(code, reason, this)); -- } catch (error) { -+ } catch (_error) { - // ignore - } - } diff --git a/src/index.ts.diff b/src/index.ts.diff deleted file mode 100644 index 66b05aa1..00000000 --- a/src/index.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/index.ts b/src/index.ts -index 4d19902..c814670 100644 ---- a/src/index.ts -+++ b/src/index.ts -@@ -1,8 +1,7 @@ - export * as Hume from "./api/index.js"; --export * as serialization from "./serialization/index.js"; -+export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js"; -+export { HumeClient } from "./Client.js"; -+export { HumeEnvironment, type HumeEnvironmentUrls } from "./environments.js"; - export { HumeError, HumeTimeoutError } from "./errors/index.js"; --export { HumeEnvironment } from "./environments.js"; --export type { HumeEnvironmentUrls } from "./environments.js"; - export * from "./exports.js"; -- --export * from "./wrapper/index.js"; -+export * as serialization from "./serialization/index.js"; diff --git a/src/serialization/resources/empathicVoice/resources/chat/index.ts.diff b/src/serialization/resources/empathicVoice/resources/chat/index.ts.diff deleted file mode 100644 index 4ddb2df8..00000000 --- a/src/serialization/resources/empathicVoice/resources/chat/index.ts.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/serialization/resources/empathicVoice/resources/chat/index.ts b/src/serialization/resources/empathicVoice/resources/chat/index.ts -index f5ca113..d9adb1a 100644 ---- a/src/serialization/resources/empathicVoice/resources/chat/index.ts -+++ b/src/serialization/resources/empathicVoice/resources/chat/index.ts -@@ -1,7 +1,2 @@ - export * from "./client/index.js"; - export * from "./types/index.js"; --/** -- * @deprecated Use `serialization.empathicVoice.SubscribeEvent` instead. -- * This serializer alias will be removed in a future version. -- */ --export { SubscribeEvent } from "./types/SubscribeEvent.js"; diff --git a/src/serialization/resources/empathicVoice/types/WebhookEventChatEnded.ts b/src/serialization/resources/empathicVoice/types/WebhookEventChatEnded.ts index 89aab57a..a23b1b4f 100644 --- a/src/serialization/resources/empathicVoice/types/WebhookEventChatEnded.ts +++ b/src/serialization/resources/empathicVoice/types/WebhookEventChatEnded.ts @@ -17,6 +17,10 @@ export const WebhookEventChatEnded: core.serialization.ObjectSchema< endReason: core.serialization.property("end_reason", WebhookEventChatStatus), endTime: core.serialization.property("end_time", core.serialization.number()), eventName: core.serialization.property("event_name", core.serialization.stringLiteral("chat_ended").optional()), + twilioMetadata: core.serialization.property( + "twilio_metadata", + core.serialization.record(core.serialization.string(), core.serialization.string().optional()).optional(), + ), }) .extend(WebhookEventBase); @@ -28,5 +32,6 @@ export declare namespace WebhookEventChatEnded { end_reason: WebhookEventChatStatus.Raw; end_time: number; event_name?: "chat_ended" | null; + twilio_metadata?: Record | null; } } diff --git a/src/serialization/resources/empathicVoice/types/WebhookEventChatStarted.ts b/src/serialization/resources/empathicVoice/types/WebhookEventChatStarted.ts index 792f31de..aa3aabdd 100644 --- a/src/serialization/resources/empathicVoice/types/WebhookEventChatStarted.ts +++ b/src/serialization/resources/empathicVoice/types/WebhookEventChatStarted.ts @@ -19,6 +19,10 @@ export const WebhookEventChatStarted: core.serialization.ObjectSchema< core.serialization.stringLiteral("chat_started").optional(), ), startTime: core.serialization.property("start_time", core.serialization.number()), + twilioMetadata: core.serialization.property( + "twilio_metadata", + core.serialization.record(core.serialization.string(), core.serialization.string().optional()).optional(), + ), }) .extend(WebhookEventBase); @@ -29,5 +33,6 @@ export declare namespace WebhookEventChatStarted { custom_session_id?: string | null; event_name?: "chat_started" | null; start_time: number; + twilio_metadata?: Record | null; } } diff --git a/src/serialization/resources/empathicVoice/types/WebhookEventToolCall.ts b/src/serialization/resources/empathicVoice/types/WebhookEventToolCall.ts index 37a63776..8ac43d42 100644 --- a/src/serialization/resources/empathicVoice/types/WebhookEventToolCall.ts +++ b/src/serialization/resources/empathicVoice/types/WebhookEventToolCall.ts @@ -16,6 +16,10 @@ export const WebhookEventToolCall: core.serialization.ObjectSchema< eventName: core.serialization.property("event_name", core.serialization.stringLiteral("tool_call").optional()), timestamp: core.serialization.number(), toolCallMessage: core.serialization.property("tool_call_message", ToolCallMessage), + twilioMetadata: core.serialization.property( + "twilio_metadata", + core.serialization.record(core.serialization.string(), core.serialization.string().optional()).optional(), + ), }) .extend(WebhookEventBase); @@ -26,5 +30,6 @@ export declare namespace WebhookEventToolCall { event_name?: "tool_call" | null; timestamp: number; tool_call_message: ToolCallMessage.Raw; + twilio_metadata?: Record | null; } } diff --git a/src/version.ts b/src/version.ts index 9210e654..3138d194 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.15.11"; +export const SDK_VERSION = "0.15.12";