From e98fdcb901ae9a067896e1b073cf177bdff7ce4c Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:38:17 +0000 Subject: [PATCH] SDK regeneration --- .../definition/empathic-voice/__package__.yml | 30 +++++++++++++++---- pyproject.toml | 2 +- reference.md | 2 ++ src/hume/empathic_voice/__init__.py | 4 +++ src/hume/empathic_voice/configs/client.py | 4 +++ src/hume/empathic_voice/types/__init__.py | 4 +++ src/hume/empathic_voice/types/posted_voice.py | 7 +++-- .../types/posted_voice_provider.py | 5 ++++ src/hume/empathic_voice/types/return_voice.py | 7 +++-- .../types/return_voice_provider.py | 5 ++++ tests/empathic_voice/test_configs.py | 8 ++--- 11 files changed, 61 insertions(+), 17 deletions(-) create mode 100644 src/hume/empathic_voice/types/posted_voice_provider.py create mode 100644 src/hume/empathic_voice/types/return_voice_provider.py diff --git a/.mock/definition/empathic-voice/__package__.yml b/.mock/definition/empathic-voice/__package__.yml index a967a3c..008fa5b 100644 --- a/.mock/definition/empathic-voice/__package__.yml +++ b/.mock/definition/empathic-voice/__package__.yml @@ -784,14 +784,23 @@ types: of the Tool. Each update to the Tool increments its version number. source: openapi: stenographer-openapi.json + PostedVoiceProvider: + enum: + - HUME_AI + - CUSTOM_VOICE + docs: >- + The provider of the voice to use. Supported values are `HUME_AI` and + `CUSTOM_VOICE`. + source: + openapi: stenographer-openapi.json PostedVoice: docs: A Voice specification posted to the server properties: provider: - type: literal<"HUME_AI"> + type: PostedVoiceProvider docs: >- - The provider of the voice to use. Currently, only `HUME_AI` is - supported as the voice provider. + The provider of the voice to use. Supported values are `HUME_AI` and + `CUSTOM_VOICE`. name: type: optional docs: >- @@ -1071,14 +1080,23 @@ types: seconds. source: openapi: stenographer-openapi.json + ReturnVoiceProvider: + enum: + - HUME_AI + - CUSTOM_VOICE + docs: >- + The provider of the voice to use. Supported values are `HUME_AI` and + `CUSTOM_VOICE`. + source: + openapi: stenographer-openapi.json ReturnVoice: docs: A specific voice specification properties: provider: - type: literal<"HUME_AI"> + type: ReturnVoiceProvider docs: >- - The provider of the voice to use. Currently, only `HUME_AI` is - supported as the voice provider. + The provider of the voice to use. Supported values are `HUME_AI` and + `CUSTOM_VOICE`. name: type: optional docs: >- diff --git a/pyproject.toml b/pyproject.toml index eb7b5be..9357d1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "hume" -version = "0.7.3" +version = "0.7.4" description = "A Python SDK for Hume AI" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index d84b76a..38a0abf 100644 --- a/reference.md +++ b/reference.md @@ -2753,6 +2753,7 @@ client.empathic_voice.configs.create_config( ), evi_version="2", voice=PostedVoice( + provider="HUME_AI", name="SAMPLE VOICE", ), language_model=PostedLanguageModel( @@ -3053,6 +3054,7 @@ client.empathic_voice.configs.create_config_version( version=0, ), voice=PostedVoice( + provider="HUME_AI", name="ITO", ), language_model=PostedLanguageModel( diff --git a/src/hume/empathic_voice/__init__.py b/src/hume/empathic_voice/__init__.py index 1499252..c530766 100644 --- a/src/hume/empathic_voice/__init__.py +++ b/src/hume/empathic_voice/__init__.py @@ -42,6 +42,7 @@ PostedTimeoutSpecsMaxDuration, PostedUserDefinedToolSpec, PostedVoice, + PostedVoiceProvider, ProsodyInference, ResumeAssistantMessage, ReturnActiveChatCount, @@ -87,6 +88,7 @@ ReturnUserDefinedToolToolType, ReturnUserDefinedToolVersionType, ReturnVoice, + ReturnVoiceProvider, Role, SessionSettings, TextInput, @@ -151,6 +153,7 @@ "PostedTimeoutSpecsMaxDuration", "PostedUserDefinedToolSpec", "PostedVoice", + "PostedVoiceProvider", "ProsodyInference", "PublishEvent", "ResumeAssistantMessage", @@ -197,6 +200,7 @@ "ReturnUserDefinedToolToolType", "ReturnUserDefinedToolVersionType", "ReturnVoice", + "ReturnVoiceProvider", "Role", "SessionSettings", "SubscribeEvent", diff --git a/src/hume/empathic_voice/configs/client.py b/src/hume/empathic_voice/configs/client.py index 04b2905..b09577e 100644 --- a/src/hume/empathic_voice/configs/client.py +++ b/src/hume/empathic_voice/configs/client.py @@ -204,6 +204,7 @@ def create_config( ), evi_version="2", voice=PostedVoice( + provider="HUME_AI", name="SAMPLE VOICE", ), language_model=PostedLanguageModel( @@ -464,6 +465,7 @@ def create_config_version( version=0, ), voice=PostedVoice( + provider="HUME_AI", name="ITO", ), language_model=PostedLanguageModel( @@ -1070,6 +1072,7 @@ async def main() -> None: ), evi_version="2", voice=PostedVoice( + provider="HUME_AI", name="SAMPLE VOICE", ), language_model=PostedLanguageModel( @@ -1346,6 +1349,7 @@ async def main() -> None: version=0, ), voice=PostedVoice( + provider="HUME_AI", name="ITO", ), language_model=PostedLanguageModel( diff --git a/src/hume/empathic_voice/types/__init__.py b/src/hume/empathic_voice/types/__init__.py index 94bf2b4..db1a362 100644 --- a/src/hume/empathic_voice/types/__init__.py +++ b/src/hume/empathic_voice/types/__init__.py @@ -41,6 +41,7 @@ from .posted_timeout_specs_max_duration import PostedTimeoutSpecsMaxDuration from .posted_user_defined_tool_spec import PostedUserDefinedToolSpec from .posted_voice import PostedVoice +from .posted_voice_provider import PostedVoiceProvider from .prosody_inference import ProsodyInference from .resume_assistant_message import ResumeAssistantMessage from .return_active_chat_count import ReturnActiveChatCount @@ -86,6 +87,7 @@ from .return_user_defined_tool_tool_type import ReturnUserDefinedToolToolType from .return_user_defined_tool_version_type import ReturnUserDefinedToolVersionType from .return_voice import ReturnVoice +from .return_voice_provider import ReturnVoiceProvider from .role import Role from .session_settings import SessionSettings from .text_input import TextInput @@ -145,6 +147,7 @@ "PostedTimeoutSpecsMaxDuration", "PostedUserDefinedToolSpec", "PostedVoice", + "PostedVoiceProvider", "ProsodyInference", "ResumeAssistantMessage", "ReturnActiveChatCount", @@ -190,6 +193,7 @@ "ReturnUserDefinedToolToolType", "ReturnUserDefinedToolVersionType", "ReturnVoice", + "ReturnVoiceProvider", "Role", "SessionSettings", "TextInput", diff --git a/src/hume/empathic_voice/types/posted_voice.py b/src/hume/empathic_voice/types/posted_voice.py index 9d48eeb..603047b 100644 --- a/src/hume/empathic_voice/types/posted_voice.py +++ b/src/hume/empathic_voice/types/posted_voice.py @@ -1,8 +1,9 @@ # This file was auto-generated by Fern from our API Definition. from ...core.pydantic_utilities import UniversalBaseModel -import typing +from .posted_voice_provider import PostedVoiceProvider import pydantic +import typing from .posted_custom_voice import PostedCustomVoice from ...core.pydantic_utilities import IS_PYDANTIC_V2 @@ -12,9 +13,9 @@ class PostedVoice(UniversalBaseModel): A Voice specification posted to the server """ - provider: typing.Literal["HUME_AI"] = pydantic.Field(default="HUME_AI") + provider: PostedVoiceProvider = pydantic.Field() """ - The provider of the voice to use. Currently, only `HUME_AI` is supported as the voice provider. + The provider of the voice to use. Supported values are `HUME_AI` and `CUSTOM_VOICE`. """ name: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/hume/empathic_voice/types/posted_voice_provider.py b/src/hume/empathic_voice/types/posted_voice_provider.py new file mode 100644 index 0000000..e3895de --- /dev/null +++ b/src/hume/empathic_voice/types/posted_voice_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +PostedVoiceProvider = typing.Union[typing.Literal["HUME_AI", "CUSTOM_VOICE"], typing.Any] diff --git a/src/hume/empathic_voice/types/return_voice.py b/src/hume/empathic_voice/types/return_voice.py index aa1ef68..9079ec0 100644 --- a/src/hume/empathic_voice/types/return_voice.py +++ b/src/hume/empathic_voice/types/return_voice.py @@ -1,8 +1,9 @@ # This file was auto-generated by Fern from our API Definition. from ...core.pydantic_utilities import UniversalBaseModel -import typing +from .return_voice_provider import ReturnVoiceProvider import pydantic +import typing from .return_custom_voice import ReturnCustomVoice from ...core.pydantic_utilities import IS_PYDANTIC_V2 @@ -12,9 +13,9 @@ class ReturnVoice(UniversalBaseModel): A specific voice specification """ - provider: typing.Literal["HUME_AI"] = pydantic.Field(default="HUME_AI") + provider: ReturnVoiceProvider = pydantic.Field() """ - The provider of the voice to use. Currently, only `HUME_AI` is supported as the voice provider. + The provider of the voice to use. Supported values are `HUME_AI` and `CUSTOM_VOICE`. """ name: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/hume/empathic_voice/types/return_voice_provider.py b/src/hume/empathic_voice/types/return_voice_provider.py new file mode 100644 index 0000000..e68946d --- /dev/null +++ b/src/hume/empathic_voice/types/return_voice_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ReturnVoiceProvider = typing.Union[typing.Literal["HUME_AI", "CUSTOM_VOICE"], typing.Any] diff --git a/tests/empathic_voice/test_configs.py b/tests/empathic_voice/test_configs.py index ce2c915..33e9e94 100644 --- a/tests/empathic_voice/test_configs.py +++ b/tests/empathic_voice/test_configs.py @@ -282,7 +282,7 @@ async def test_create_config(client: HumeClient, async_client: AsyncHumeClient) name="Weather Assistant Config", prompt=PostedConfigPromptSpec(id="af699d45-2985-42cc-91b9-af9e5da3bac5", version=0), evi_version="2", - voice=PostedVoice(name="SAMPLE VOICE"), + voice=PostedVoice(provider="HUME_AI", name="SAMPLE VOICE"), language_model=PostedLanguageModel( model_provider="ANTHROPIC", model_resource="claude-3-5-sonnet-20240620", temperature=1.0 ), @@ -298,7 +298,7 @@ async def test_create_config(client: HumeClient, async_client: AsyncHumeClient) name="Weather Assistant Config", prompt=PostedConfigPromptSpec(id="af699d45-2985-42cc-91b9-af9e5da3bac5", version=0), evi_version="2", - voice=PostedVoice(name="SAMPLE VOICE"), + voice=PostedVoice(provider="HUME_AI", name="SAMPLE VOICE"), language_model=PostedLanguageModel( model_provider="ANTHROPIC", model_resource="claude-3-5-sonnet-20240620", temperature=1.0 ), @@ -584,7 +584,7 @@ async def test_create_config_version(client: HumeClient, async_client: AsyncHume version_description="This is an updated version of the Weather Assistant Config.", evi_version="2", prompt=PostedConfigPromptSpec(id="af699d45-2985-42cc-91b9-af9e5da3bac5", version=0), - voice=PostedVoice(name="ITO"), + voice=PostedVoice(provider="HUME_AI", name="ITO"), language_model=PostedLanguageModel( model_provider="ANTHROPIC", model_resource="claude-3-5-sonnet-20240620", temperature=1.0 ), @@ -602,7 +602,7 @@ async def test_create_config_version(client: HumeClient, async_client: AsyncHume version_description="This is an updated version of the Weather Assistant Config.", evi_version="2", prompt=PostedConfigPromptSpec(id="af699d45-2985-42cc-91b9-af9e5da3bac5", version=0), - voice=PostedVoice(name="ITO"), + voice=PostedVoice(provider="HUME_AI", name="ITO"), language_model=PostedLanguageModel( model_provider="ANTHROPIC", model_resource="claude-3-5-sonnet-20240620", temperature=1.0 ),