hume 0.15.8 → 0.15.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.d.ts +13 -4
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +13 -13
- package/dist/cjs/Client.js +8 -49
- package/dist/cjs/api/resources/empathicVoice/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/empathicVoice/client/Client.js +13 -12
- package/dist/cjs/api/resources/empathicVoice/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/empathicVoice/errors/UnprocessableEntityError.js +5 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/Client.js +3 -3
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/index.js +2 -2
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +17 -26
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/Client.js +48 -136
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/Client.d.ts +13 -20
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/Client.js +32 -95
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/Client.d.ts +34 -83
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/Client.js +64 -245
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +4 -16
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +3 -14
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/controlPlane/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/empathicVoice/resources/controlPlane/client/Client.js +6 -19
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +34 -83
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/Client.js +64 -245
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.ts +2 -8
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.ts +2 -8
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/Client.d.ts +34 -83
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/Client.js +64 -245
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.d.ts +4 -8
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.d.ts +4 -8
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/types/AssistantInput.d.ts +2 -5
- package/dist/cjs/api/resources/empathicVoice/types/AssistantMessage.d.ts +2 -2
- package/dist/cjs/api/resources/empathicVoice/types/AssistantProsody.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/types/AudioInput.d.ts +6 -4
- package/dist/cjs/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -4
- package/dist/cjs/api/resources/empathicVoice/types/ChatMetadata.d.ts +3 -5
- package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettings.d.ts +8 -4
- package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.d.ts +3 -3
- package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettingsContext.d.ts +9 -3
- package/dist/cjs/api/resources/empathicVoice/types/Context.d.ts +9 -3
- package/dist/cjs/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.ts +1 -36
- package/dist/cjs/api/resources/empathicVoice/types/JsonMessage.d.ts +1 -50
- package/dist/cjs/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +2 -4
- package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinTool.d.ts +1 -9
- package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinToolName.d.ts +0 -8
- package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinToolName.js +0 -8
- package/dist/cjs/api/resources/empathicVoice/types/PostedEllmModel.d.ts +1 -5
- package/dist/cjs/api/resources/empathicVoice/types/PostedEventMessageSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/PostedEventMessageSpecs.d.ts +1 -14
- package/dist/cjs/api/resources/empathicVoice/types/PostedLanguageModel.d.ts +1 -7
- package/dist/cjs/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +2 -2
- package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecs.d.ts +1 -13
- package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecsInactivity.d.ts +0 -11
- package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecsMaxDuration.d.ts +0 -11
- package/dist/cjs/api/resources/empathicVoice/types/PostedUserDefinedToolSpec.d.ts +1 -7
- package/dist/cjs/api/resources/empathicVoice/types/PostedWebhookSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -3
- package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinTool.d.ts +1 -2
- package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChat.d.ts +4 -19
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstruction.d.ts +0 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.d.ts +0 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.js +0 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +5 -30
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventRole.d.ts +0 -7
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventRole.js +0 -7
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventType.d.ts +0 -14
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventType.js +0 -14
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroup.d.ts +5 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.d.ts +1 -10
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +6 -16
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +3 -12
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +6 -30
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.d.ts +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.js +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatStatus.d.ts +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatStatus.js +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnConfigSpec.d.ts +2 -8
- package/dist/cjs/api/resources/empathicVoice/types/ReturnEllmModel.d.ts +1 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnEventMessageSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnEventMessageSpecs.d.ts +1 -14
- package/dist/cjs/api/resources/empathicVoice/types/ReturnLanguageModel.d.ts +1 -7
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +2 -11
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChats.d.ts +2 -11
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedConfigs.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedPrompts.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPromptVersionType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPromptVersionType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnTimeoutSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnTimeoutSpecs.d.ts +1 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +7 -19
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnVoice.d.ts +5 -3
- package/dist/cjs/api/resources/empathicVoice/types/ReturnWebhookSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/SessionSettings.d.ts +10 -19
- package/dist/cjs/api/resources/empathicVoice/types/SubscribeEvent.d.ts +1 -55
- package/dist/cjs/api/resources/empathicVoice/types/ToolCallMessage.d.ts +3 -9
- package/dist/cjs/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +3 -5
- package/dist/cjs/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -11
- package/dist/cjs/api/resources/empathicVoice/types/UserInput.d.ts +6 -2
- package/dist/cjs/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -3
- package/dist/cjs/api/resources/empathicVoice/types/UserMessage.d.ts +3 -17
- package/dist/cjs/api/resources/empathicVoice/types/VoiceId.d.ts +11 -2
- package/dist/cjs/api/resources/empathicVoice/types/VoiceName.d.ts +11 -2
- package/dist/cjs/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -3
- package/dist/cjs/api/resources/expressionMeasurement/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/expressionMeasurement/client/Client.js +7 -6
- package/dist/cjs/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +17 -18
- package/dist/cjs/api/resources/expressionMeasurement/resources/batch/client/Client.js +63 -151
- package/dist/cjs/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +7 -8
- package/dist/cjs/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.js +7 -12
- package/dist/cjs/api/resources/tts/client/Client.d.ts +19 -20
- package/dist/cjs/api/resources/tts/client/Client.js +56 -138
- package/dist/cjs/api/resources/tts/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/tts/errors/UnprocessableEntityError.js +5 -1
- package/dist/cjs/api/resources/tts/resources/streamInput/client/Client.d.ts +15 -14
- package/dist/cjs/api/resources/tts/resources/streamInput/client/Client.js +10 -6
- package/dist/cjs/api/resources/tts/resources/voices/client/Client.d.ts +13 -14
- package/dist/cjs/api/resources/tts/resources/voices/client/Client.js +33 -87
- package/dist/cjs/api/resources/tts/resources/voices/client/requests/PostedVoice.d.ts +1 -1
- package/dist/cjs/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tts/types/OctaveVersion.d.ts +7 -3
- package/dist/cjs/api/resources/tts/types/OctaveVersion.js +7 -3
- package/dist/cjs/api/resources/tts/types/PostedTts.d.ts +0 -6
- package/dist/cjs/api/resources/tts/types/PostedUtteranceVoiceWithId.d.ts +1 -1
- package/dist/cjs/api/resources/tts/types/PostedUtteranceVoiceWithName.d.ts +1 -1
- package/dist/cjs/api/resources/tts/types/PublishTts.d.ts +14 -4
- package/dist/cjs/api/resources/tts/types/ReturnPagedVoices.d.ts +5 -9
- package/dist/cjs/api/resources/tts/types/ReturnVoice.d.ts +3 -3
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +26 -0
- package/dist/cjs/auth/HeaderAuthProvider.js +91 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -3
- package/dist/cjs/core/fetcher/Fetcher.js +42 -24
- package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +2 -0
- package/dist/cjs/core/logging/logger.js +1 -1
- package/dist/cjs/core/pagination/CustomPager.d.ts +67 -0
- package/dist/cjs/core/pagination/CustomPager.js +194 -0
- package/dist/cjs/core/pagination/index.d.ts +1 -0
- package/dist/cjs/core/pagination/index.js +4 -1
- package/dist/cjs/core/runtime/runtime.js +11 -10
- package/dist/cjs/core/schemas/Schema.d.ts +1 -0
- package/dist/cjs/core/schemas/Schema.js +1 -0
- package/dist/cjs/core/schemas/builders/object/object.js +14 -1
- package/dist/cjs/core/schemas/builders/primitives/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/primitives/index.js +3 -1
- package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/errors/HumeError.js +5 -1
- package/dist/cjs/errors/HumeTimeoutError.js +5 -1
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/serialization/resources/empathicVoice/types/ReturnVoice.d.ts +3 -3
- package/dist/cjs/serialization/resources/empathicVoice/types/ReturnVoice.js +3 -3
- package/dist/cjs/serialization/resources/tts/types/ReturnPagedVoices.d.ts +4 -4
- package/dist/cjs/serialization/resources/tts/types/ReturnPagedVoices.js +4 -4
- package/dist/cjs/serialization/resources/tts/types/ReturnVoice.d.ts +3 -3
- package/dist/cjs/serialization/resources/tts/types/ReturnVoice.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/SilenceFiller.d.ts +64 -10
- package/dist/cjs/wrapper/SilenceFiller.js +109 -26
- package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.ts +1 -1
- package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +1 -1
- package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.d.ts +1 -1
- package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.js +1 -1
- package/dist/cjs/wrapper/fetchAccessToken.js +3 -0
- package/dist/cjs/wrapper/index.d.ts +5 -0
- package/dist/cjs/wrapper/index.js +6 -6
- package/dist/esm/BaseClient.d.mts +13 -4
- package/dist/esm/BaseClient.mjs +24 -1
- package/dist/esm/Client.d.mts +13 -13
- package/dist/esm/Client.mjs +11 -19
- package/dist/esm/api/resources/empathicVoice/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/empathicVoice/client/Client.mjs +18 -17
- package/dist/esm/api/resources/empathicVoice/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/empathicVoice/errors/UnprocessableEntityError.mjs +5 -1
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.mjs +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.mjs +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.d.mts +17 -26
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.mjs +47 -135
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.d.mts +13 -20
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.mjs +31 -94
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.d.mts +34 -83
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.mjs +63 -244
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.mts +4 -16
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.mts +3 -14
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.mjs +4 -17
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.d.mts +34 -83
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.mjs +63 -244
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.mts +2 -8
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.mts +2 -8
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.d.mts +34 -83
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.mjs +63 -244
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.d.mts +4 -8
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.d.mts +4 -8
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/types/AssistantEnd.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/types/AssistantInput.d.mts +2 -5
- package/dist/esm/api/resources/empathicVoice/types/AssistantMessage.d.mts +2 -2
- package/dist/esm/api/resources/empathicVoice/types/AssistantProsody.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/types/AudioInput.d.mts +6 -4
- package/dist/esm/api/resources/empathicVoice/types/AudioOutput.d.mts +1 -4
- package/dist/esm/api/resources/empathicVoice/types/ChatMetadata.d.mts +3 -5
- package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettings.d.mts +8 -4
- package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.d.mts +3 -3
- package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsContext.d.mts +9 -3
- package/dist/esm/api/resources/empathicVoice/types/Context.d.mts +9 -3
- package/dist/esm/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.mts +1 -36
- package/dist/esm/api/resources/empathicVoice/types/JsonMessage.d.mts +1 -50
- package/dist/esm/api/resources/empathicVoice/types/PauseAssistantMessage.d.mts +2 -4
- package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinTool.d.mts +1 -9
- package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.d.mts +0 -8
- package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.mjs +0 -8
- package/dist/esm/api/resources/empathicVoice/types/PostedEllmModel.d.mts +1 -5
- package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpecs.d.mts +1 -14
- package/dist/esm/api/resources/empathicVoice/types/PostedLanguageModel.d.mts +1 -7
- package/dist/esm/api/resources/empathicVoice/types/PostedNudgeSpec.d.mts +2 -2
- package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecs.d.mts +1 -13
- package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsInactivity.d.mts +0 -11
- package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsMaxDuration.d.mts +0 -11
- package/dist/esm/api/resources/empathicVoice/types/PostedUserDefinedToolSpec.d.mts +1 -7
- package/dist/esm/api/resources/empathicVoice/types/PostedWebhookSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ResumeAssistantMessage.d.mts +1 -3
- package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinTool.d.mts +1 -2
- package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnChat.d.mts +4 -19
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstruction.d.mts +0 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.d.mts +0 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.mjs +0 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEvent.d.mts +5 -30
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.d.mts +0 -7
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.mjs +0 -7
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.d.mts +0 -14
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.mjs +0 -14
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroup.d.mts +5 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.d.mts +1 -10
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.mts +6 -16
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.mts +3 -12
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.mts +6 -30
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.d.mts +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.mjs +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.d.mts +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.mjs +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnConfigSpec.d.mts +2 -8
- package/dist/esm/api/resources/empathicVoice/types/ReturnEllmModel.d.mts +1 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpecs.d.mts +1 -14
- package/dist/esm/api/resources/empathicVoice/types/ReturnLanguageModel.d.mts +1 -7
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.mts +2 -11
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChats.d.mts +2 -11
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedConfigs.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedPrompts.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpecs.d.mts +1 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.mts +7 -19
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnVoice.d.mts +5 -3
- package/dist/esm/api/resources/empathicVoice/types/ReturnWebhookSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/SessionSettings.d.mts +10 -19
- package/dist/esm/api/resources/empathicVoice/types/SubscribeEvent.d.mts +1 -55
- package/dist/esm/api/resources/empathicVoice/types/ToolCallMessage.d.mts +3 -9
- package/dist/esm/api/resources/empathicVoice/types/ToolErrorMessage.d.mts +3 -5
- package/dist/esm/api/resources/empathicVoice/types/ToolResponseMessage.d.mts +3 -11
- package/dist/esm/api/resources/empathicVoice/types/UserInput.d.mts +6 -2
- package/dist/esm/api/resources/empathicVoice/types/UserInterruption.d.mts +1 -3
- package/dist/esm/api/resources/empathicVoice/types/UserMessage.d.mts +3 -17
- package/dist/esm/api/resources/empathicVoice/types/VoiceId.d.mts +11 -2
- package/dist/esm/api/resources/empathicVoice/types/VoiceName.d.mts +11 -2
- package/dist/esm/api/resources/empathicVoice/types/WebSocketError.d.mts +1 -3
- package/dist/esm/api/resources/expressionMeasurement/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/expressionMeasurement/client/Client.mjs +6 -5
- package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.d.mts +17 -18
- package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.mjs +61 -149
- package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.mts +7 -8
- package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.mjs +5 -10
- package/dist/esm/api/resources/tts/client/Client.d.mts +19 -20
- package/dist/esm/api/resources/tts/client/Client.mjs +56 -138
- package/dist/esm/api/resources/tts/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/tts/errors/UnprocessableEntityError.mjs +5 -1
- package/dist/esm/api/resources/tts/resources/streamInput/client/Client.d.mts +15 -14
- package/dist/esm/api/resources/tts/resources/streamInput/client/Client.mjs +8 -4
- package/dist/esm/api/resources/tts/resources/voices/client/Client.d.mts +13 -14
- package/dist/esm/api/resources/tts/resources/voices/client/Client.mjs +32 -86
- package/dist/esm/api/resources/tts/resources/voices/client/requests/PostedVoice.d.mts +1 -1
- package/dist/esm/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.mts +1 -1
- package/dist/esm/api/resources/tts/types/OctaveVersion.d.mts +7 -3
- package/dist/esm/api/resources/tts/types/OctaveVersion.mjs +7 -3
- package/dist/esm/api/resources/tts/types/PostedTts.d.mts +0 -6
- package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithId.d.mts +1 -1
- package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithName.d.mts +1 -1
- package/dist/esm/api/resources/tts/types/PublishTts.d.mts +14 -4
- package/dist/esm/api/resources/tts/types/ReturnPagedVoices.d.mts +5 -9
- package/dist/esm/api/resources/tts/types/ReturnVoice.d.mts +3 -3
- package/dist/esm/auth/HeaderAuthProvider.d.mts +26 -0
- package/dist/esm/auth/HeaderAuthProvider.mjs +54 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +6 -3
- package/dist/esm/core/fetcher/Fetcher.mjs +42 -24
- package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/index.d.mts +2 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/logging/logger.mjs +1 -1
- package/dist/esm/core/pagination/CustomPager.d.mts +67 -0
- package/dist/esm/core/pagination/CustomPager.mjs +189 -0
- package/dist/esm/core/pagination/index.d.mts +1 -0
- package/dist/esm/core/pagination/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.mjs +11 -10
- package/dist/esm/core/schemas/Schema.d.mts +1 -0
- package/dist/esm/core/schemas/Schema.mjs +1 -0
- package/dist/esm/core/schemas/builders/object/object.mjs +14 -1
- package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/errors/HumeError.mjs +5 -1
- package/dist/esm/errors/HumeTimeoutError.mjs +5 -1
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.d.mts +3 -3
- package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.mjs +3 -3
- package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.d.mts +4 -4
- package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.mjs +4 -4
- package/dist/esm/serialization/resources/tts/types/ReturnVoice.d.mts +3 -3
- package/dist/esm/serialization/resources/tts/types/ReturnVoice.mjs +3 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/SilenceFiller.d.mts +64 -10
- package/dist/esm/wrapper/SilenceFiller.mjs +109 -26
- package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.mts +1 -1
- package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.mjs +1 -1
- package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.d.mts +1 -1
- package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.mjs +1 -1
- package/dist/esm/wrapper/fetchAccessToken.mjs +3 -0
- package/dist/esm/wrapper/index.d.mts +5 -0
- package/dist/esm/wrapper/index.mjs +4 -5
- package/package.json +5 -2
- package/reference.md +621 -1205
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
|
@@ -8,23 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
13
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
14
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
15
17
|
import * as serializers from "../../../../../../serialization/index.mjs";
|
|
16
18
|
import * as Hume from "../../../../../index.mjs";
|
|
17
|
-
export class
|
|
18
|
-
constructor(
|
|
19
|
-
this._options =
|
|
19
|
+
export class ToolsClient {
|
|
20
|
+
constructor(options = {}) {
|
|
21
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
|
-
* Fetches a paginated list of **Tools**.
|
|
23
|
-
*
|
|
24
|
-
* 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.
|
|
25
|
-
*
|
|
26
24
|
* @param {Hume.empathicVoice.ToolsListToolsRequest} request
|
|
27
|
-
* @param {
|
|
25
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
26
|
*
|
|
29
27
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
30
28
|
*
|
|
@@ -39,20 +37,14 @@ export class Tools {
|
|
|
39
37
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
40
38
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
41
39
|
const { pageNumber, pageSize, restrictToMostRecent, name } = request;
|
|
42
|
-
const _queryParams = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
_queryParams.restrict_to_most_recent = restrictToMostRecent.toString();
|
|
51
|
-
}
|
|
52
|
-
if (name != null) {
|
|
53
|
-
_queryParams.name = name;
|
|
54
|
-
}
|
|
55
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
40
|
+
const _queryParams = {
|
|
41
|
+
page_number: pageNumber,
|
|
42
|
+
page_size: pageSize,
|
|
43
|
+
restrict_to_most_recent: restrictToMostRecent,
|
|
44
|
+
name,
|
|
45
|
+
};
|
|
46
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
47
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
56
48
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
57
49
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
|
|
58
50
|
.base, "v0/evi/tools"),
|
|
@@ -95,21 +87,7 @@ export class Tools {
|
|
|
95
87
|
});
|
|
96
88
|
}
|
|
97
89
|
}
|
|
98
|
-
|
|
99
|
-
case "non-json":
|
|
100
|
-
throw new errors.HumeError({
|
|
101
|
-
statusCode: _response.error.statusCode,
|
|
102
|
-
body: _response.error.rawBody,
|
|
103
|
-
rawResponse: _response.rawResponse,
|
|
104
|
-
});
|
|
105
|
-
case "timeout":
|
|
106
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/tools.");
|
|
107
|
-
case "unknown":
|
|
108
|
-
throw new errors.HumeError({
|
|
109
|
-
message: _response.error.errorMessage,
|
|
110
|
-
rawResponse: _response.rawResponse,
|
|
111
|
-
});
|
|
112
|
-
}
|
|
90
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/evi/tools");
|
|
113
91
|
}));
|
|
114
92
|
let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
|
|
115
93
|
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
@@ -126,12 +104,8 @@ export class Tools {
|
|
|
126
104
|
});
|
|
127
105
|
}
|
|
128
106
|
/**
|
|
129
|
-
* Creates a **Tool** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config).
|
|
130
|
-
*
|
|
131
|
-
* 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.
|
|
132
|
-
*
|
|
133
107
|
* @param {Hume.empathicVoice.PostedUserDefinedTool} request
|
|
134
|
-
* @param {
|
|
108
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
135
109
|
*
|
|
136
110
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
137
111
|
*
|
|
@@ -150,7 +124,8 @@ export class Tools {
|
|
|
150
124
|
__createTool(request, requestOptions) {
|
|
151
125
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
126
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
153
|
-
const
|
|
127
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
128
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
154
129
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
155
130
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, "v0/evi/tools"),
|
|
156
131
|
method: "POST",
|
|
@@ -198,31 +173,13 @@ export class Tools {
|
|
|
198
173
|
});
|
|
199
174
|
}
|
|
200
175
|
}
|
|
201
|
-
|
|
202
|
-
case "non-json":
|
|
203
|
-
throw new errors.HumeError({
|
|
204
|
-
statusCode: _response.error.statusCode,
|
|
205
|
-
body: _response.error.rawBody,
|
|
206
|
-
rawResponse: _response.rawResponse,
|
|
207
|
-
});
|
|
208
|
-
case "timeout":
|
|
209
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/tools.");
|
|
210
|
-
case "unknown":
|
|
211
|
-
throw new errors.HumeError({
|
|
212
|
-
message: _response.error.errorMessage,
|
|
213
|
-
rawResponse: _response.rawResponse,
|
|
214
|
-
});
|
|
215
|
-
}
|
|
176
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/evi/tools");
|
|
216
177
|
});
|
|
217
178
|
}
|
|
218
179
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* 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.
|
|
222
|
-
*
|
|
223
|
-
* @param {string} id - Identifier for a Tool. Formatted as a UUID.
|
|
180
|
+
* @param {string} id
|
|
224
181
|
* @param {Hume.empathicVoice.ToolsListToolVersionsRequest} request
|
|
225
|
-
* @param {
|
|
182
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
226
183
|
*
|
|
227
184
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
228
185
|
*
|
|
@@ -234,17 +191,13 @@ export class Tools {
|
|
|
234
191
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
235
192
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
236
193
|
const { pageNumber, pageSize, restrictToMostRecent } = request;
|
|
237
|
-
const _queryParams = {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
if (restrictToMostRecent != null) {
|
|
245
|
-
_queryParams.restrict_to_most_recent = restrictToMostRecent.toString();
|
|
246
|
-
}
|
|
247
|
-
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
194
|
+
const _queryParams = {
|
|
195
|
+
page_number: pageNumber,
|
|
196
|
+
page_size: pageSize,
|
|
197
|
+
restrict_to_most_recent: restrictToMostRecent,
|
|
198
|
+
};
|
|
199
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
200
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
248
201
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
249
202
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
|
|
250
203
|
.base, `v0/evi/tools/${core.url.encodePathParam(id)}`),
|
|
@@ -287,21 +240,7 @@ export class Tools {
|
|
|
287
240
|
});
|
|
288
241
|
}
|
|
289
242
|
}
|
|
290
|
-
|
|
291
|
-
case "non-json":
|
|
292
|
-
throw new errors.HumeError({
|
|
293
|
-
statusCode: _response.error.statusCode,
|
|
294
|
-
body: _response.error.rawBody,
|
|
295
|
-
rawResponse: _response.rawResponse,
|
|
296
|
-
});
|
|
297
|
-
case "timeout":
|
|
298
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/tools/{id}.");
|
|
299
|
-
case "unknown":
|
|
300
|
-
throw new errors.HumeError({
|
|
301
|
-
message: _response.error.errorMessage,
|
|
302
|
-
rawResponse: _response.rawResponse,
|
|
303
|
-
});
|
|
304
|
-
}
|
|
243
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/evi/tools/{id}");
|
|
305
244
|
}));
|
|
306
245
|
let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
|
|
307
246
|
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
@@ -318,13 +257,9 @@ export class Tools {
|
|
|
318
257
|
});
|
|
319
258
|
}
|
|
320
259
|
/**
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
* 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.
|
|
324
|
-
*
|
|
325
|
-
* @param {string} id - Identifier for a Tool. Formatted as a UUID.
|
|
260
|
+
* @param {string} id - Identifier for a tool. Formatted as a UUID.
|
|
326
261
|
* @param {Hume.empathicVoice.PostedUserDefinedToolVersion} request
|
|
327
|
-
* @param {
|
|
262
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
328
263
|
*
|
|
329
264
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
330
265
|
*
|
|
@@ -342,7 +277,8 @@ export class Tools {
|
|
|
342
277
|
__createToolVersion(id, request, requestOptions) {
|
|
343
278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
344
279
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
345
|
-
const
|
|
280
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
281
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
346
282
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
347
283
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/tools/${core.url.encodePathParam(id)}`),
|
|
348
284
|
method: "POST",
|
|
@@ -390,30 +326,12 @@ export class Tools {
|
|
|
390
326
|
});
|
|
391
327
|
}
|
|
392
328
|
}
|
|
393
|
-
|
|
394
|
-
case "non-json":
|
|
395
|
-
throw new errors.HumeError({
|
|
396
|
-
statusCode: _response.error.statusCode,
|
|
397
|
-
body: _response.error.rawBody,
|
|
398
|
-
rawResponse: _response.rawResponse,
|
|
399
|
-
});
|
|
400
|
-
case "timeout":
|
|
401
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/tools/{id}.");
|
|
402
|
-
case "unknown":
|
|
403
|
-
throw new errors.HumeError({
|
|
404
|
-
message: _response.error.errorMessage,
|
|
405
|
-
rawResponse: _response.rawResponse,
|
|
406
|
-
});
|
|
407
|
-
}
|
|
329
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/evi/tools/{id}");
|
|
408
330
|
});
|
|
409
331
|
}
|
|
410
332
|
/**
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
* 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.
|
|
414
|
-
*
|
|
415
|
-
* @param {string} id - Identifier for a Tool. Formatted as a UUID.
|
|
416
|
-
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
333
|
+
* @param {string} id - Identifier for a tool. Formatted as a UUID.
|
|
334
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
417
335
|
*
|
|
418
336
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
419
337
|
*
|
|
@@ -426,7 +344,8 @@ export class Tools {
|
|
|
426
344
|
__deleteTool(id, requestOptions) {
|
|
427
345
|
return __awaiter(this, void 0, void 0, function* () {
|
|
428
346
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
429
|
-
const
|
|
347
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
348
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
430
349
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
431
350
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/tools/${core.url.encodePathParam(id)}`),
|
|
432
351
|
method: "DELETE",
|
|
@@ -459,31 +378,13 @@ export class Tools {
|
|
|
459
378
|
});
|
|
460
379
|
}
|
|
461
380
|
}
|
|
462
|
-
|
|
463
|
-
case "non-json":
|
|
464
|
-
throw new errors.HumeError({
|
|
465
|
-
statusCode: _response.error.statusCode,
|
|
466
|
-
body: _response.error.rawBody,
|
|
467
|
-
rawResponse: _response.rawResponse,
|
|
468
|
-
});
|
|
469
|
-
case "timeout":
|
|
470
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/tools/{id}.");
|
|
471
|
-
case "unknown":
|
|
472
|
-
throw new errors.HumeError({
|
|
473
|
-
message: _response.error.errorMessage,
|
|
474
|
-
rawResponse: _response.rawResponse,
|
|
475
|
-
});
|
|
476
|
-
}
|
|
381
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/evi/tools/{id}");
|
|
477
382
|
});
|
|
478
383
|
}
|
|
479
384
|
/**
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
* 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.
|
|
483
|
-
*
|
|
484
|
-
* @param {string} id - Identifier for a Tool. Formatted as a UUID.
|
|
385
|
+
* @param {string} id - Identifier for a tool. Formatted as a UUID.
|
|
485
386
|
* @param {Hume.empathicVoice.PostedUserDefinedToolName} request
|
|
486
|
-
* @param {
|
|
387
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
487
388
|
*
|
|
488
389
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
489
390
|
*
|
|
@@ -498,7 +399,8 @@ export class Tools {
|
|
|
498
399
|
__updateToolName(id, request, requestOptions) {
|
|
499
400
|
return __awaiter(this, void 0, void 0, function* () {
|
|
500
401
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
501
|
-
const
|
|
402
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
403
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
502
404
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
503
405
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/tools/${core.url.encodePathParam(id)}`),
|
|
504
406
|
method: "PATCH",
|
|
@@ -538,35 +440,13 @@ export class Tools {
|
|
|
538
440
|
});
|
|
539
441
|
}
|
|
540
442
|
}
|
|
541
|
-
|
|
542
|
-
case "non-json":
|
|
543
|
-
throw new errors.HumeError({
|
|
544
|
-
statusCode: _response.error.statusCode,
|
|
545
|
-
body: _response.error.rawBody,
|
|
546
|
-
rawResponse: _response.rawResponse,
|
|
547
|
-
});
|
|
548
|
-
case "timeout":
|
|
549
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/tools/{id}.");
|
|
550
|
-
case "unknown":
|
|
551
|
-
throw new errors.HumeError({
|
|
552
|
-
message: _response.error.errorMessage,
|
|
553
|
-
rawResponse: _response.rawResponse,
|
|
554
|
-
});
|
|
555
|
-
}
|
|
443
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/evi/tools/{id}");
|
|
556
444
|
});
|
|
557
445
|
}
|
|
558
446
|
/**
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
* @param {string} id - Identifier for a Tool. Formatted as a UUID.
|
|
564
|
-
* @param {number} version - Version number for a Tool.
|
|
565
|
-
*
|
|
566
|
-
* 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.
|
|
567
|
-
*
|
|
568
|
-
* Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
|
|
569
|
-
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
447
|
+
* @param {string} id - Identifier for a tool. Formatted as a UUID.
|
|
448
|
+
* @param {number} version - Version number for a tool. Version numbers should be integers.
|
|
449
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
570
450
|
*
|
|
571
451
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
572
452
|
*
|
|
@@ -579,7 +459,8 @@ export class Tools {
|
|
|
579
459
|
__getToolVersion(id, version, requestOptions) {
|
|
580
460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
581
461
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
582
|
-
const
|
|
462
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
463
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
583
464
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
584
465
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/tools/${core.url.encodePathParam(id)}/version/${core.url.encodePathParam(version)}`),
|
|
585
466
|
method: "GET",
|
|
@@ -621,35 +502,13 @@ export class Tools {
|
|
|
621
502
|
});
|
|
622
503
|
}
|
|
623
504
|
}
|
|
624
|
-
|
|
625
|
-
case "non-json":
|
|
626
|
-
throw new errors.HumeError({
|
|
627
|
-
statusCode: _response.error.statusCode,
|
|
628
|
-
body: _response.error.rawBody,
|
|
629
|
-
rawResponse: _response.rawResponse,
|
|
630
|
-
});
|
|
631
|
-
case "timeout":
|
|
632
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/tools/{id}/version/{version}.");
|
|
633
|
-
case "unknown":
|
|
634
|
-
throw new errors.HumeError({
|
|
635
|
-
message: _response.error.errorMessage,
|
|
636
|
-
rawResponse: _response.rawResponse,
|
|
637
|
-
});
|
|
638
|
-
}
|
|
505
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/evi/tools/{id}/version/{version}");
|
|
639
506
|
});
|
|
640
507
|
}
|
|
641
508
|
/**
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
* @param {string} id - Identifier for a Tool. Formatted as a UUID.
|
|
647
|
-
* @param {number} version - Version number for a Tool.
|
|
648
|
-
*
|
|
649
|
-
* 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.
|
|
650
|
-
*
|
|
651
|
-
* Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
|
|
652
|
-
* @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
|
|
509
|
+
* @param {string} id - Identifier for a tool. Formatted as a UUID.
|
|
510
|
+
* @param {number} version - Version number for a tool. Version numbers should be integers.
|
|
511
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
653
512
|
*
|
|
654
513
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
655
514
|
*
|
|
@@ -662,7 +521,8 @@ export class Tools {
|
|
|
662
521
|
__deleteToolVersion(id, version, requestOptions) {
|
|
663
522
|
return __awaiter(this, void 0, void 0, function* () {
|
|
664
523
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
665
|
-
const
|
|
524
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
525
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
666
526
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
667
527
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/tools/${core.url.encodePathParam(id)}/version/${core.url.encodePathParam(version)}`),
|
|
668
528
|
method: "DELETE",
|
|
@@ -695,36 +555,14 @@ export class Tools {
|
|
|
695
555
|
});
|
|
696
556
|
}
|
|
697
557
|
}
|
|
698
|
-
|
|
699
|
-
case "non-json":
|
|
700
|
-
throw new errors.HumeError({
|
|
701
|
-
statusCode: _response.error.statusCode,
|
|
702
|
-
body: _response.error.rawBody,
|
|
703
|
-
rawResponse: _response.rawResponse,
|
|
704
|
-
});
|
|
705
|
-
case "timeout":
|
|
706
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/tools/{id}/version/{version}.");
|
|
707
|
-
case "unknown":
|
|
708
|
-
throw new errors.HumeError({
|
|
709
|
-
message: _response.error.errorMessage,
|
|
710
|
-
rawResponse: _response.rawResponse,
|
|
711
|
-
});
|
|
712
|
-
}
|
|
558
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/evi/tools/{id}/version/{version}");
|
|
713
559
|
});
|
|
714
560
|
}
|
|
715
561
|
/**
|
|
716
|
-
*
|
|
717
|
-
*
|
|
718
|
-
* 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.
|
|
719
|
-
*
|
|
720
|
-
* @param {string} id - Identifier for a Tool. Formatted as a UUID.
|
|
721
|
-
* @param {number} version - Version number for a Tool.
|
|
722
|
-
*
|
|
723
|
-
* 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.
|
|
724
|
-
*
|
|
725
|
-
* Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
|
|
562
|
+
* @param {string} id - Identifier for a tool. Formatted as a UUID.
|
|
563
|
+
* @param {number} version - Version number for a tool. Version numbers should be integers.
|
|
726
564
|
* @param {Hume.empathicVoice.PostedUserDefinedToolVersionDescription} request
|
|
727
|
-
* @param {
|
|
565
|
+
* @param {ToolsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
728
566
|
*
|
|
729
567
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
730
568
|
*
|
|
@@ -739,7 +577,8 @@ export class Tools {
|
|
|
739
577
|
__updateToolDescription(id_1, version_1) {
|
|
740
578
|
return __awaiter(this, arguments, void 0, function* (id, version, request = {}, requestOptions) {
|
|
741
579
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
742
|
-
const
|
|
580
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
581
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
743
582
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
744
583
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/tools/${core.url.encodePathParam(id)}/version/${core.url.encodePathParam(version)}`),
|
|
745
584
|
method: "PATCH",
|
|
@@ -787,27 +626,7 @@ export class Tools {
|
|
|
787
626
|
});
|
|
788
627
|
}
|
|
789
628
|
}
|
|
790
|
-
|
|
791
|
-
case "non-json":
|
|
792
|
-
throw new errors.HumeError({
|
|
793
|
-
statusCode: _response.error.statusCode,
|
|
794
|
-
body: _response.error.rawBody,
|
|
795
|
-
rawResponse: _response.rawResponse,
|
|
796
|
-
});
|
|
797
|
-
case "timeout":
|
|
798
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/tools/{id}/version/{version}.");
|
|
799
|
-
case "unknown":
|
|
800
|
-
throw new errors.HumeError({
|
|
801
|
-
message: _response.error.errorMessage,
|
|
802
|
-
rawResponse: _response.rawResponse,
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
_getCustomAuthorizationHeaders() {
|
|
808
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
809
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
810
|
-
return { "X-Hume-Api-Key": apiKeyValue };
|
|
629
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/evi/tools/{id}/version/{version}");
|
|
811
630
|
});
|
|
812
631
|
}
|
|
813
632
|
}
|
|
@@ -9,18 +9,14 @@
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface PostedUserDefinedTool {
|
|
12
|
-
/**
|
|
12
|
+
/** Text describing what the tool does. */
|
|
13
13
|
description?: string;
|
|
14
|
-
/**
|
|
14
|
+
/** Text to use if the tool fails to generate content. */
|
|
15
15
|
fallbackContent?: string;
|
|
16
16
|
/** Name applied to all versions of a particular Tool. */
|
|
17
17
|
name: string;
|
|
18
|
-
/**
|
|
19
|
-
* Stringified JSON defining the parameters used by this version of the Tool.
|
|
20
|
-
*
|
|
21
|
-
* 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.
|
|
22
|
-
*/
|
|
18
|
+
/** Stringified JSON defining the parameters used by this version of the Tool. */
|
|
23
19
|
parameters: string;
|
|
24
|
-
/**
|
|
20
|
+
/** Description that is appended to a specific version of a Tool. */
|
|
25
21
|
versionDescription?: string;
|
|
26
22
|
}
|
|
@@ -8,16 +8,12 @@
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface PostedUserDefinedToolVersion {
|
|
11
|
-
/**
|
|
11
|
+
/** Text describing what the tool does. */
|
|
12
12
|
description?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** Text to use if the tool fails to generate content. */
|
|
14
14
|
fallbackContent?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Stringified JSON defining the parameters used by this version of the Tool.
|
|
17
|
-
*
|
|
18
|
-
* 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.
|
|
19
|
-
*/
|
|
15
|
+
/** Stringified JSON defining the parameters used by this version of the Tool. */
|
|
20
16
|
parameters: string;
|
|
21
|
-
/**
|
|
17
|
+
/** Description that is appended to a specific version of a Tool. */
|
|
22
18
|
versionDescription?: string;
|
|
23
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* When provided, the output is an assistant end message.
|
|
3
3
|
*/
|
|
4
4
|
export interface AssistantEnd {
|
|
5
5
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* 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.
|
|
2
|
+
* When provided, the input is spoken by EVI.
|
|
5
3
|
*/
|
|
6
4
|
export interface AssistantInput {
|
|
7
|
-
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
8
5
|
customSessionId?: string;
|
|
9
6
|
/**
|
|
10
7
|
* Assistant text to synthesize into spoken audio and insert into the conversation.
|
|
11
8
|
*
|
|
12
|
-
* 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](/reference/
|
|
9
|
+
* 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](/reference/empathic-voice-interface-evi/chat/chat#receive.Assistant%20Message.type).
|
|
13
10
|
*/
|
|
14
11
|
text: string;
|
|
15
12
|
/** The type of message sent through the socket; must be `assistant_input` for our server to correctly identify and process it as an Assistant Input message. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type * as Hume from "../../../index.mjs";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* When provided, the output is an assistant message.
|
|
4
4
|
*/
|
|
5
5
|
export interface AssistantMessage {
|
|
6
6
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
7
7
|
customSessionId?: string;
|
|
8
|
-
/** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/
|
|
8
|
+
/** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/empathic-voice-interface-evi/chat/chat#send.Assistant%20Input.text). */
|
|
9
9
|
fromText: boolean;
|
|
10
10
|
/** ID of the assistant message. Allows the Assistant Message to be tracked and referenced. */
|
|
11
11
|
id?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Hume from "../../../index.mjs";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* When provided, the output is an Assistant Prosody message.
|
|
4
4
|
*/
|
|
5
5
|
export interface AssistantProsody {
|
|
6
6
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* 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.
|
|
2
|
+
* When provided, the input is audio.
|
|
5
3
|
*/
|
|
6
4
|
export interface AudioInput {
|
|
7
5
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
@@ -16,6 +14,10 @@ export interface AudioInput {
|
|
|
16
14
|
* Hume recommends streaming audio with a buffer window of 20 milliseconds (ms), or 100 milliseconds (ms) for web applications.
|
|
17
15
|
*/
|
|
18
16
|
data: string;
|
|
19
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The type of message sent through the socket; must be `audio_input` for our server to correctly identify and process it as an Audio Input message.
|
|
19
|
+
*
|
|
20
|
+
* This message is used for sending audio input data to EVI for processing and expression measurement. Audio data should be sent as a continuous stream, encoded in Base64.
|
|
21
|
+
*/
|
|
20
22
|
type: "audio_input";
|
|
21
23
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* 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.
|
|
2
|
+
* The type of message sent through the socket; for an Audio Output message, this must be `audio_output`.
|
|
5
3
|
*/
|
|
6
4
|
export interface AudioOutput {
|
|
7
5
|
/** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
|
|
@@ -12,6 +10,5 @@ export interface AudioOutput {
|
|
|
12
10
|
id: string;
|
|
13
11
|
/** Index of the chunk of audio relative to the whole audio segment. */
|
|
14
12
|
index: number;
|
|
15
|
-
/** The type of message sent through the socket; for an Audio Output message, this must be `audio_output`. */
|
|
16
13
|
type: "audio_output";
|
|
17
14
|
}
|